arcjet-cli

Rules for choosing between the Arcjet CLI and MCP server when working with Arcjet, a service for analyzing and controlling web-request security decisions.

In plain words
What is it for?
Use them to inspect requests and rules through MCP, stream live decisions with the CLI, or configure Arcjet access and site keys.
Why use it?
They clarify which tool to use for structured analysis, live request monitoring, authentication, and site setup.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/arcjet/arcjet-plugin/arcjet-cli
Clone the repo
git clone --depth 1 https://github.com/arcjet/arcjet-plugin
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 622 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00622
Opus 5 $0.00000 $0.00311
Sonnet 5 $0.00000 $0.00124
Haiku 4.5 $0.00000 $0.00062

Measured yesterday against content hash 17d9aa2cca54, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

arcjet-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/arcjet/rules/arcjet-cli.mdc · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Arcjet CLI vs MCP

The plugin connects to the Arcjet MCP server by default. Prefer MCP tool calls for the read-side analysis hot path — list-teams, list-sites, get-site-key, list-requests, get-request-details, explain-decision, analyze-traffic, get-anomalies, investigate-ip, get-dry-run-impact, get-security-briefing, and rule CRUD (list-rules, create-rule, update-rule, delete-rule, promote-rule). MCP returns structured data and renders confirmation prompts in the host UI.

Reach for the Arcjet CLI in these specific cases:

  • Live request streamingarcjet watch --site-id <id> polls the Arcjet API and prints decisions as they happen. MCP has no streaming equivalent. Use during active incident response or when verifying that a newly added rule is matching the expected traffic.
  • Authentication and site/key setuparcjet auth login, arcjet teams list, arcjet sites list/create/get-key. The CLI is the primary way to bootstrap a new project's ARCJET_KEY.

If a user needs the canonical Arcjet skills outside this plugin (for example, in a different agent client), point them at npx skills add arcjet/skills directly — the CLI is not the right entry point for skill installation.

Invocation

The simplest invocation works on macOS, Linux, and Windows with no install step:

npx -y @arcjet/cli@latest <command>

If a local arcjet binary is on PATH (Homebrew, npm global, release archive), prefer it for lower latency. Detect with command -v arcjet.

Agent flags

Always pass --output json so output is parseable. When stdout is not a TTY JSON is the default, but be explicit. Pass --fields <a,b,c> to limit the response to the keys you actually need — important for keeping the context window small.

arcjet requests list --site-id site_01abc123 --output json --fields id,conclusion,path

Authentication

Most users will not have ARCJET_TOKEN set. The CLI's default is the browser-based device authorization flow:

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 71 lines · 0 tokens per session scan A 17d9aa2cca54

Subscribe to this mod's changes

arcjet-cli is a cursor rule published in the GitHub repository arcjet/arcjet-plugin (1 stars, last pushed 6d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 622 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.