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, lifts the client-side repository size limits, and downloads the local inference runtime and models without asking. 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-client-id, --jcp-org-service-client-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. See Index repositories in CI.
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.- --only-incremental
Refresh only a repository that already has an index, and skip one that doesn't, exiting 0. The hooks that
jbcontext setup-agentinstalls use this option.- --silent
Suppress progress and success output; errors are still reported. Useful for hooks and background execution.
- --no-share
Index locally without checking the share point set in
share.url. See jbcontext share.
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).
jbcontext watch
Manage the watch daemon, a background process that keeps your local changes searchable between indexing runs. See Local changes in search.
- watch status
Show whether the daemon is running, the watched repositories, and the repositories removed with
watch remove.- watch add
Watch the current repository and start the daemon. Use the command for a checkout where you haven't run
jbcontext index.- watch remove
Stop watching the current repository.
jbcontext indexdoesn't add it back;watch adddoes.- watch stop
Stop the daemon. It stays stopped until you run
watch start.- watch start
Start the daemon in the background, or in the terminal with
--foreground.
jbcontext share
Exchange locally stored indexes through a share point: a Git repository with Git LFS, set in the share.url setting. The commands work with local storage only and need git and git-lfs. See Share local indexes.
- share push [revision]
Publish the local index of a revision to the share point. Defaults to
HEAD; the revision must be indexed locally.--keepsets how many of the most recently published revisions of the repository the share point keeps, this one included. Default 10; older ones are removed.- share pull
Replace the local index of the repository with the shared index of
HEADor, if it isn't shared, of the shared revision nearest to it in history. Asks before replacing an existing index;-y/--yesskips the question.- share list
List the shared revisions of the current repository.
- share delete <revision>
Remove a shared revision for everyone, given as a commit SHA, a unique prefix of it, or a local ref.
--allremoves every shared revision of the repository instead;-y/--yesskips the confirmation prompt. The revisions are removed from the repository tree, while the Git LFS host keeps the stored objects.- --share-url
Git LFS repository to use for this call instead of the
share.urlsetting.
Configuration
jbcontext config
Read and change the CLI settings. For example, to keep the indexes of all projects on your machine:
Run jbcontext config without arguments to list the effective values, or jbcontext config get <key> to print one. The most commonly used keys:
- storage
Where the index is stored:
local(on your machine) orremote(on the Air Context server). When unset, the CLI chooses by account and repository size. Add--projectto set the value for the current project only, or--sharedto save it to the project's .jbcontext.json file.- inference
Where the embedding model runs:
remote(the Air Context server, default),llamacpp(llama.cpp on this machine), ormlx(MLX on this machine, for macOS with Apple silicon only).llamacppandmlxrequire local storage and select it. Applies to all projects on this machine; theJBCONTEXT_INFERENCEenvironment variable overrides it for one run. See Local indexing.- share.url
URL of the share point: a Git repository with Git LFS through which locally stored indexes are exchanged. Add
--sharedto save the value to the project's .jbcontext.json file, which you commit so that it applies to everyone who works on the project. See jbcontext share.- force-local-overlay
Whether search over local changes stays on in very large repositories:
false(default) ortrue. Withtrue, every check for changes scans the whole working tree. Applies to all projects on this machine. See Local changes in search.
jbcontext inference
Manage local inference. With inference set to llamacpp or mlx, the CLI runs the embedding model and the reranker as background servers on this machine. They start with the first index or search that needs them and stop after a period without requests.
- inference install
Download the runtime and the models without indexing, for example to prepare a CI image. In a terminal, the command asks before downloading; elsewhere it needs
--yesor--ci.--runtime llamacppor--runtime mlxselects the runtime; the default is theinferencesetting.- inference status
List the running local inference servers and their memory use.
- inference stop
Stop the local inference servers. The next
indexorsearchstarts them again.
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, local changes, and search. With local inference, the command also checks the local inference servers.
For more information, see Diagnose a problem and Local indexing.
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.