CosmicCode for VS Code
Pre-release, private pilot. CosmicCode is available to invited developers
only. Without pilot access and an API key the extension can't connect.
Request access.
CosmicCode gives your AI assistant (GitHub Copilot agent mode, or any MCP
client in VS Code) tools to search your repository by meaning, look up
signatures, trace dependencies and see its architecture, from an index of your
code hosted by PanSynapse.
Get started
- Get access and an API key at app.pansynapse.com.
- Install the extension, run CosmicCode: Set API Key and paste the key. It's
kept in VS Code's secret storage on this machine.
- Open a repository. CosmicCode asks before indexing it: its source files are
uploaded to PanSynapse, and each repository counts toward your repository
limit.
- In Copilot Chat (agent mode), the CosmicCode tools appear under the
CosmicCode server.
The status bar shows the index state. Click it for actions.
What gets uploaded
Files CosmicCode can parse (Python, TypeScript/JavaScript, Go, Rust, C) that
git doesn't ignore: tracked and untracked files, honouring .gitignore. Files
over 1 MB or not UTF-8 are skipped. Outside git, everything except
node_modules, virtualenvs, dist/build and similar folders.
After the first index, only changed files are sent: on save, branch switch,
pull or rebase, and on a check every 30 minutes.
Commands
| Command |
What it does |
| CosmicCode: Set API Key / Remove API Key |
Store or remove your key on this machine |
| CosmicCode: Index This Repository |
Start indexing the current folder |
| CosmicCode: Re-index Repository |
Upload everything again |
| CosmicCode: Delete This Repository's Index |
Delete the uploaded code and index from PanSynapse; frees a repository slot |
| CosmicCode: Copy Repository ID |
The ID PanSynapse uses for this repository |
| CosmicCode: Show Status / Show Log |
Details and troubleshooting |
Settings
cosmiccode.serverUrl: the CosmicCode endpoint. Leave as is unless PanSynapse asks.
cosmiccode.sync.enabled: keep indexes in sync as you work (default on).
cosmiccode.sync.maxFiles: stop syncing repositories with more files than this (default 20,000).
Development
npm install
npm test # compile + unit tests (node:test)
npm run package # builds cosmiccode-<version>.vsix
Press F5 ("Run CosmicCode") to try it in an Extension Development Host. To use
the dev environment, set cosmiccode.serverUrl to
https://cosmiccode-mcp-6hzc45ruba-uc.a.run.app/code and use a key from
app-dev.
Repository IDs must match pansynapse-mcp/scripts/push_index.py;
test/fixtures/repo-id-vectors.json is generated from it. Regenerate the
vectors if either side changes.
Design: gcp/cosmiccode-mcp.md (VS Code extension) and
gcp/cosmiccode-indexing.md (keeping the index fresh) in the PanSynapse
planning docs.