Quickstart

Once CoDev is installed and configured (see Installation), this guide covers day-to-day usage — indexing your codebase with CodeGraph, launching the CLI and IDE extensions, switching models, and monitoring your usage.

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 init

codevhub 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.
  • cd into your project and type claude or opencode.
  • 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 /model and 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 model and 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 model command 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 restore

To 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 -c

Sign in / out of SSO

codevhub login
codevhub logout

Upload 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-ai

Monitoring

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.