CLI reference
The Air Context CLI is invoked as jbcontext. This page lists the most commonly used options for each command; run any command with -h/--help to see the full set.
Global options
- --version
Show the installed version, build, and release channel.
- --enable-local-logging
Enable logging for commands that don't log by themselves, such as
logoutorconfig. Can also be enabled with theJBCONTEXT_LOCAL_LOGGINGenvironment variable.- --ci
--cimarks the run as unattended, for build agents: logs stream to stderr so that the build log keeps them, andindexreports progress as plain log lines, uses all available CPU, and lifts the client-side repository size limits. It is a global option, so it goes before the command; theJBCONTEXT_CI=trueenvironment variable does the same. The server lifts its own size limit only for runs authenticated with an organization service account.
Most commands also accept the following options, which aren't repeated in the sections below: --project-path (path to a local project), --git-remote-url (repository URL, overriding the repository ID derived from the project path), --json-output (output results as JSON), and -v/--verbose (raise the log level to DEBUG).
Authentication
jbcontext login
Log in with your JetBrains Account.
Run without options to log in with your JetBrains Account. If you're logged in to a JetBrains IDE or JetBrains Toolbox, the CLI can use that account; otherwise, you log in in the browser. For unattended use, the CLI also accepts token-based options; the most common one is described below, and the full list is in jbcontext login --help.
- --jcp-org-service-id, --jcp-org-service-secret
Authenticate with an organization service account (client ID and secret). Intended for CI and other unattended runs; the CLI mints and renews short-lived tokens itself. The CLI also picks the credentials up from the
JCP_ORG_SERVICE_CLIENT_IDandJCP_ORG_SERVICE_CLIENT_SECRETenvironment variables, so no login step is needed.
jbcontext logout
Log out and clear stored credentials.
- --env
Environment to log out from. If omitted, all sessions are cleared.
Indexing and search
jbcontext index
Index a project directory for semantic search.
- --revision
Specific revision to index. Defaults to
HEAD.- --silent
Suppress progress and success output; errors are still reported. Useful for hooks and background execution.
jbcontext search
Search for code using semantic search.
- --limit
Number of results to return. Default 50.
- -p, --path-filter
File path filter for narrowing down the search scope.
- --branch
Limit search to a specific remote branch (case-insensitive, partial match).
- --revision
Limit search to a specific revision. By default, the snapshot indexed for the current branch is searched, falling back to the default branch and then to the most recent snapshot.
- --enable-remote-logging
Allow search operations to be logged on the server.
jbcontext status
Show indexing status for the current repository.
jbcontext remove-index
Remove your indexed snapshots for the current repository.
- -y, --yes
Skip the confirmation prompt before removing (required with
--json-output).
Agent integration
jbcontext setup-agent
Set up Air Context for AI coding agents: skills, subagents, hooks, instructions, and MCP. Run without options for an interactive setup, or select an agent and components explicitly. See Agent integrations for what each component does.
- --agent
Specific agent to set up:
claude,codex,junie, orgeneric.- --scope
Where to install:
user(default) orproject.- --auto
Install the recommended bundle: instructions, skills (except for OpenAI Codex), subagents and session hooks where supported, minimal MCP registration (Claude Code only), and execution-policy rules (OpenAI Codex only). Tool-watching hooks aren't included; add
--hooks. This is the default when an agent is given without component flags.- --skills, --subagents, --hooks, --instructions, --mcp, --mcp-minimal, --rules
Install exactly the selected components instead of the recommended bundle.
--mcp-minimalregisters the MCP server without switching the instructions to MCP-first guidance;--mcpdoes both.- --no-session-hooks
Don't install the session hooks. Tool-watching hooks still follow
--hooks.- --dump-auto
Print the current
--autoinstall plan for all recognized agents as Markdown and exit. Add--print-instructionsto include the exact instruction block.- --strong
Install instructions that strongly prioritize semantic search over text search.
- --non-interactive
Run without prompts (requires
--agent).
jbcontext remove-agent
Remove Air Context integration components from AI coding agents. Without component options, all components are removed.
- --agent, --scope, --non-interactive
Same meaning as for
setup-agent. Without--scope, both user and project scopes are checked.- --skills, --subagents, --hooks, --instructions, --mcp, --rules
Remove only the selected components.
jbcontext mcp
Start an MCP server over stdio for AI agent integration. Normally registered in the agent's MCP configuration by setup-agent rather than run by hand.
- --enable-remote-logging
Allow search operations to be logged on the server.
Insights
jbcontext stats
Watch local search, repository, and indexing activity. Alias: jbcontext dashboard.
- --days
Show stats for the last N days. Default 10; use 0 for all available history.
- --errors
Include recent error messages below the dashboard.
jbcontext analyze
Estimate the cost and token saving Air Context brings to your mix of agent tasks. Reads local agent session data from Claude Code, OpenAI Codex, and Junie CLI.
- --agent
Restrict to one agent:
claude,codex, orjunie. Default: all agents.- --min-tool-calls
Drop sessions with fewer total tool calls than N. Default 5.
Maintenance
jbcontext upgrade
Check for updates and upgrade the Air Context CLI to the latest version, refreshing the installed agents' skills, hooks, and instructions. Alias: jbcontext update.
- --check
Only check for updates, don't install.
- --force
Force the upgrade even if already on the latest version.
- --version
Upgrade to a specific version instead of the latest.
- --skip-agents
Don't refresh the installed agents' prompts after the binary upgrade.
jbcontext doctor
Run end-to-end self-tests: version, authentication, repository, index, and search.
jbcontext send-feedback
Report an issue or send feedback; opens a pre-filled form in your browser. Use --print-url to print the form URL instead. Alias: jbcontext report-issue.