xanther-cli
v0.3.0
Published
Index your codebase and supercharge your coding agent with Xanther Context Engine
Downloads
381
Maintainers
Readme
Xanther CLI
What is Xanther CLI?
Xanther CLI indexes your codebase into the Xanther Context Engine (XCE), giving your coding agent deep architectural understanding of your code. It works with any git repository — public, private, GitHub, GitLab, Bitbucket, or local-only.
Install
npm install -g xanther-cliOr use directly with npx:
npx xanther-cli init --api-key xce_your_key_hereQuick Start
1. Get your API key
Sign up at xanther.ai/signup and generate an API key from the dashboard.
2. Initialize and index your repo
cd your-project
npx xanther-cli init --api-key xce_your_key_hereThis does three things:
- Uploads your codebase (respecting
.gitignore) - Triggers full indexing (AST parsing, embeddings, architecture docs)
- Installs a
post-commitgit hook for automatic incremental updates
3. Connect your coding agent
Add XCE to your agent's MCP config — see XCE MCP Server for setup instructions.
That's it. Your agent now has deep codebase context on every interaction.
Commands
xanther-cli init
Initialize and perform a full index of the current repository.
xanther-cli init --api-key xce_your_key_hereOptions:
--api-key— Your Xanther API key (required on first run, saved for future use)--branch— Branch to index (default: current branch)--no-hook— Skip installing the git post-commit hook
xanther-cli sync
Manually sync changes since the last index. Performs incremental indexing — only changed files are re-processed.
xanther-cli syncOptions:
--full— Force a full re-index instead of incremental
xanther-cli status
Check the indexing status of the current repository.
xanther-cli statusOutput:
Repository: owner/my-project (main)
Status: Indexed
Nodes: 12,450
Last sync: 2 hours ago
Plan: Pro (8,234 / 10,000 queries used)xanther-cli uninstall
Remove the git hook and local configuration.
xanther-cli uninstallHow Auto-Sync Works
When you run xanther-cli init, it installs a post-commit git hook:
git commit → post-commit hook fires → xanther-cli sync --incremental (background)The incremental sync:
- Gets changed files from the commit (
git diff --name-only HEAD~1) - Uploads only those files
- Re-indexes affected graph nodes (the changed files + their dependencies)
This runs in the background and typically takes 2-5 seconds for a normal commit.
Configuration
Xanther CLI stores its config in .xanther/config.json in your project root:
{
"api_key": "xce_...",
"repo_id": "user-id:my-project",
"api_url": "https://api.xanther.ai",
"last_sync": "2026-04-26T10:00:00Z",
"last_commit": "abc123"
}Add .xanther/ to your .gitignore — it contains your API key.
Works Everywhere
| Git Host | Supported | Auto-update | |---|---|---| | GitHub (public) | Yes | post-commit hook | | GitHub (private) | Yes | post-commit hook | | GitLab | Yes | post-commit hook | | Bitbucket | Yes | post-commit hook | | Self-hosted git | Yes | post-commit hook | | Local (no remote) | Yes | post-commit hook |
Privacy
- Your code is uploaded over HTTPS to Xanther's servers for indexing
- Code is processed and stored as graph nodes (not raw source)
.gitignorepatterns are respected — ignored files are never uploaded- You can delete your indexed data anytime from the dashboard
Links
- XCE MCP Server — Connect your coding agent
- Xanther Website — Learn more
- Dashboard — Manage repos, API keys, usage
- Discord — Community and support
- Benchmark Results — SWE-bench performance data
License
MIT — see LICENSE for details.
