Quickstart
Usage
CodeGraph
CoDev uses CodeGraph, a lightweight tool that builds a pre-indexed knowledge graph of your codebase. With it, the AI agents don't have to scan and grep your files on every read — which shortens response times and saves tokens.
To use CodeGraph, cd into the project you're working on and run this command once:
codevhub initcodevhub init builds the knowledge graph for the current project. CodeGraph then watches your codebase and auto-syncs whenever files change.
This creates a local .codegraph/ directory. You can commit it if you'd like to share the knowledge graph with your team.
Code files only
CodeGraph only works on programming-language files (e.g. .py, .js/.ts, .java, etc.); it does not work on unstructured files like documents (.md, .pdf, .docx, …). In other words, if your working folder contains only documents, CodeGraph won't help.
Start the CLI
- Open a new terminal/PowerShell window.
cdinto your project and typeclaudeoropencode.- Trust the folder when prompted.
- If asked whether to use an API key, choose Yes. Note: Claude Code defaults this to No (recommended) — you need to switch it to Yes.
- Once you're in the CLI, you do not need to run
/login. Test with a prompt like "hi"; if the model replies, you're connected and can start using it normally.
If Claude Code asks you to log in
If Claude Code forces a login when you prompt, it's because you didn't choose Yes above. Run codevhub config to reconfigure.
Language hallucination
A common issue with today's Chinese open-source models is language hallucination — they sometimes insert Chinese into the answer. To avoid this, say "use English only" explicitly in your prompt.
Select a model in the CLI
- For OpenCode, if it isn't already set to MiniMax or GLM, type
/modeland choose MiniMax or GLM from the AI Gateway (only the first time — OpenCode remembers your choice afterward). - Claude Code and Codex don't let you pick an external model inside their CLI; they only let you choose a single model to replace Anthropic's and OpenAI's proprietary one.
- To change the default model, run
codevhub modeland choose the model you want.
Extensions
- Launch as usual inside your IDE (VS Code, JetBrains). If you've used it before, you may need to close and reopen the extension window.
- Like the Claude Code CLI, the Claude Code extension doesn't let you pick a model — it uses the default model set during install. On first launch a sign-in screen may appear; wait a moment and it auto-bypasses into the chat window.
- Continue lets you switch models flexibly right in the extension window. On first launch, wait a few minutes for Continue to load its config file.
- The
codevhub modelcommand applies to the extensions too.
Switch between proprietary and self-hosted models
CoDev offers a flexible way to move between proprietary models and the self-hosted models.
To revert a tool to its original state from before CoDev was installed:
codevhub restore claude
codevhub restore codex
codevhub restore opencode
codevhub restore continue
# Restore all of the tools above
codevhub restoreTo configure the tools to use the self-hosted models again, run codevhub config.
Restart your terminal/PowerShell after each switch. To resume your most recent CLI session:
claude -c
codex resume
opencode -cSign in / out of SSO
codevhub login
codevhub logoutUpload logs
CoDev automatically collects and uploads session logs whenever a user runs any AI agent. Users can run codevhub upload to upload them manually.
Remove CoDev
Run codevhub remove to remove CoDev's configuration, then npm rm -g codev-ai to remove the package:
codevhub remove
npm rm -g codev-aiMonitoring
You can visit the CoDev Analysis page (sign in with SSO) to see your own CoDev usage statistics. See the CoDev Analysis user guide for details.