Available commands

Full reference for every bitoarch-local subcommand, flag, and environment variable. For install + quick start, see the main documentation.


index β€” Index Git Repositories

bitoarch-local index -i <repos-dir> [options]

Scans <repos-dir> one level deep and indexes every entry that looks like a git repo (has a .git/ subdirectory). <repos-dir> can also be a single repo path β€” if the directory itself has a .git/, it's indexed as a single repo. For large repos-dir with many unrelated repos, use --repos "name1, name2" to narrow the scope.

Re-running index is cheap: it hashes each repo and skips unchanged ones. No --force needed for normal workflows.

Flag

Description

Default

-i, --input <dir>

Required. Directory of git repos (one level deep) OR a single repo path

β€”

-o, --output <dir>

Output directory for index data

~/.bito/bitoarch/index

--repos <names>

Comma-separated repo names to index (quote the value)

all repos in <dir>

--skip-metadata

Skip metadata extraction

false

--skip-tfidf

Skip TF-IDF generation

false

--skip-project-info

Skip project-info extraction

false

--skip-edges

Skip dependency extraction

false

--skip-clusters

Skip cluster generation

false

--force

Re-index even if data exists (wipes state, re-runs every phase)

false

--yes

Skip --force --repos confirmation prompt

false

-v, --verbose

Verbose output

false

-d, --debug

Debug mode

false

Examples:

Indexing phases (run in order):

  1. Code search index

  2. Symbol index

  3. Local metadata extraction

  4. Local edges / dependency extraction

  5. Project-info generation

  6. Edges finalization

  7. TF-IDF index generation

  8. Repository clustering

Incremental behavior. On re-run, the tool compares each repo's current hash (git HEAD + file mtimes) against the stored hash from the last run. New or changed repos are reprocessed; unchanged repos are skipped. To force a full re-index of everything, add --force.


serve β€” Start MCP Server

Starts the MCP server that AI assistants connect to. Stdio mode (the default) is what AI assistants use; HTTP mode is for testing, scripting, or fronting with a reverse proxy.

Flag

Description

Default

-m, --mode <mode>

Transport: stdio or http

stdio

-p, --port <port>

Port for HTTP mode

3000

--data <dir>

Directory containing the pre-built index data

~/.bito/bitoarch/index

--repos <dir>

Directory containing the original git source trees (enables getCode)

β€”

-v, --verbose

Verbose logging

false

-d, --debug

Debug logging

false

--data vs --repos. --data points at the already-indexed data produced by index; you rarely need to change this unless you indexed to a custom -o location. --repos points at the original git source trees (where the .git/ dirs live) so the getCode tool can read source files on demand. Without --repos, getCode returns errors. Without --data, the server has no indexed data to serve.

Examples:

HTTP mode health check:

Network-exposed deployments. There is no built-in HTTPS mode (TLS on 127.0.0.1 adds nothing). If you need HTTPS, put a reverse proxy (Caddy, nginx) in front for TLS termination.

MCP tools served (13 total):

Tool

Description

getCapabilities

Discover available analysis capabilities

listRepositories

Browse all indexed repositories

searchRepositories

Natural language search across repos

getRepositoryInfo

Get repo metadata, structure, dependencies

getRepositorySchema

Discover repo data structure

getFieldPath

Extract specific nested fields

queryFieldAcrossRepositories

Compare same field across repos

searchWithinRepository

Search within a single repo's data

searchCode

Search code across indexed repos

searchSymbols

Symbol search (functions, classes, etc.)

getCode

Read actual source code from files

listClusters

View repository clusters

getClusterInfo

Examine a specific cluster


status β€” Check Indexing Status

Reads .indexer-state.json and reports which repos are indexed, their last-updated timestamps, and the current indexing status. Does not probe the server β€” it's a pure state-file read.

Flag

Description

Default

-o, --output <dir>

Index directory to check

~/.bito/bitoarch/index

--json

JSON output

false


resume β€” Resume Interrupted Indexing

If a previous index run was interrupted (Ctrl+C, crash, power loss), resume picks up where it left off. If the previous run completed successfully, resume prints a message showing the original input directory and exits.

Flag

Description

Default

-o, --output <dir>

Output directory with the interrupted state

~/.bito/bitoarch/index

--concurrency <n>

Number of parallel indexing operations

2

-v, --verbose

Verbose output

false

-d, --debug

Debug mode

false


clean β€” Remove Index Data

Flag

Description

Default

-o, --output <dir>

Index directory to clean

~/.bito/bitoarch/index

--repo <name>

Remove a single repository from the index (not plural)

β€”

--all

Remove everything: state + per-repo data + TF-IDF + clusters (requires --force)

false

--force

Required only with --all. Accepted (but no-op) with --repo and default state-only clean, for back-compat with existing scripts.

false

Confirmation policy. --repo <name> and the default state-only clean run without prompting β€” the user named a specific repo (intent is explicit), and the state-only clean is trivially reversible (just re-run index). --all is the only destructive path that needs a full re-index to recover, so it keeps the --force gate.

Behavior by flag combination:

Command

What it removes

clean (no flags)

Only the state file (.indexer-state.json + repos.json). Next index starts fresh but reuses existing data on disk.

clean --repo <name>

Just that one repo's data: project-info/<name>.json, edges/<name>.json, ctags-indices/<name>.tags, zoekt-indices/<name>_v*.zoekt, and the repo's state entry. TF-IDF and clusters.json are NOT regenerated automatically β€” re-run index to refresh them.

clean --all

Refuses without --force. Prints a warning explaining recovery requires a full re-index.

clean --all --force

Everything: state + all per-repo data + TF-IDF + clusters. Full wipe.

Examples:


config mcp-config β€” Configure MCP Clients

Detects installed AI assistants on your machine and configures them to use bitoarch-local as an MCP server. Creates timestamped backups of existing configs before modifying.

Flag

Description

Default

--all

Configure every detected MCP client

β€”

--client <name>

Configure a specific client

β€”

--dry-run

Preview changes without modifying files

false

--list-clients

List supported clients and their detection status

β€”

--remove

Remove bitoarch-local from configs instead of adding

false

--repos <dir>

Repos directory for the serve command in the generated config

β€”

--yes

Skip the "Configure for N clients?" confirmation prompt (for scripts / CI)

false

Supported clients (9 total):

claude-desktop Β· claude-code Β· cursor Β· windsurf Β· cline Β· vscode-copilot Β· zed Β· amazon-q Β· xcode

Most clients are file-based β€” the command writes/merges an entry into a JSON config file on disk. claude-code is CLI-based β€” the command invokes claude mcp add-json bitoarch-local '<json>' via the claude CLI rather than writing a config file directly.

Examples:

What this does:

  1. Detects installed MCP clients on your system

  2. Creates a timestamped backup of existing configs

  3. Adds/updates the bitoarch-local MCP server entry

  4. Preserves all other existing MCP server configurations


update β€” Self-update the binary

Fetches the release manifest from the CDN, downloads the latest binary for your platform, verifies its SHA256 against the manifest, re-applies the ad-hoc code signature (macOS), and atomically replaces the running binary.

Flag

Description

Default

--force

Re-download even if the manifest says you're already at the latest version

false

Examples:

Env var override β€” point update at a different CDN (mirrors, staging, internal hosts):

If your binary's version is below the published minimum in the manifest, update is exempt from the version-check block β€” so you can always upgrade out of a blocked state.


setup β€” One-time post-install setup

On macOS and Linux there are no one-time setup tasks β€” the installer handles everything. This command exists so setup is discoverable; running it prints a "no setup needed" message and exits.


info β€” Show Binary Information

Prints version, build ID, build time, platform, and the binary path. Useful for bug reports and verifying which binary is on $PATH.

Flag

Description

--json

JSON output

Example:


Global options and env vars

These apply to every command.

Global flags:

Flag

Description

-V, --version

Print version string and exit

--skip-update-check

Skip the remote version check (useful for offline / CI / air-gapped environments)

-h, --help

Print help for the current command

Environment variables:

Variable

Purpose

BITO_DOWNLOAD_URL

Base URL for the release CDN. Overrides the baked-in default in install.sh / the update command. Use this for enterprise mirrors, staging tests, or internal hosts.

BITO_SKIP_UPDATE_CHECK

Set to 1 to skip the version check on every command (same effect as --skip-update-check but globally).

BITO_INSTALL_DIR

Where install.sh places the binary. Defaults to ~/.bito/bitoarch/bin.

BITO_LOCAL_BINARY

Path to a local binary for install.sh --local. Alternative to passing the path as an argument.

Exit codes:

Code

Meaning

0

Success

1

User error, validation failure, or version-check block

126

Binary not executable (missing chmod +x)

127

Binary not found on PATH

137

SIGKILL β€” OS killed the process

139

SIGSEGV β€” arch mismatch, GLIBC mismatch, truncated binary

Last updated