mycc is a local API-driven coding agent CLI.
This repository is the current working source for the mycc command. It is separated from the official claude CLI and uses its own local config path by default.
- Runs as a terminal coding agent.
- Uses
url + apiKey + modeldirectly. - Supports both:
- Anthropic-style endpoints:
/v1/messages - OpenAI-compatible endpoints:
/chat/completions
- Anthropic-style endpoints:
- Stores local config in
~/.mycc-local/config.json - Exposes a small local toolset:
list_filesread_filewrite_filerun_command
- Node.js 18+
- npm
- Windows, macOS, or Linux
git clone https://github.com/zja2004/claude-code.git
cd claude-codenpm installnpm install -g .After that, the command will be available as:
myccRun:
myccIf no config exists yet, mycc will ask for:
Base URLAPI keyModel
Then it will save them to:
~/.mycc-local/config.json
You can also configure it in one step:
mycc auth login --url https://your-api-base --api-key your-key --model your-modelCheck current config:
mycc auth statusRemove saved config:
mycc auth logoutmycc supports these overrides:
MYCC_BASE_URL
MYCC_API_KEY
MYCC_MODEL
MYCC_API_STYLE
MYCC_MAX_TOKENS
Compatible fallback names are also accepted:
ANTHROPIC_BASE_URL
ANTHROPIC_API_KEY
ANTHROPIC_MODEL
ANTHROPIC_API_STYLE
ANTHROPIC_MAX_TOKENS
MYCC_API_STYLE can be:
autoanthropicopenai
Default is auto.
In auto mode:
mycctries Anthropic-style/v1/messagesfirst.- If the endpoint rejects that style with routing-style errors such as
404, it falls back to OpenAI-compatible/chat/completions.
This is useful for providers such as:
- DashScope compatible mode
- OpenAI-compatible gateways
- Reverse proxies
- Multi-provider API routers
Example for DashScope compatible mode:
mycc auth login `
--url https://dashscope.aliyuncs.com/compatible-mode/v1 `
--api-key YOUR_KEY `
--model glm-5 `
--api-style openaiThen start:
myccYou can also do it with environment variables:
$env:MYCC_BASE_URL='https://dashscope.aliyuncs.com/compatible-mode/v1'
$env:MYCC_API_KEY='YOUR_KEY'
$env:MYCC_MODEL='glm-5'
$env:MYCC_API_STYLE='openai'
myccInteractive mode:
myccSingle prompt:
mycc -p "Summarize this repository"List models:
mycc modelsmyccis intentionally isolated from the officialclaudecommand.- Default config path is
~/.mycc/~/.mycc-local, not~/.claude. - This repo currently uses the lightweight API-only entrypoint for the global
mycccommand. - The larger recovered source tree remains in the repo, but the stable user-facing path is the minimal CLI.
The global mycc command currently points to:
minimal/cli.js
The source-style recovered CLI remains available for development/testing at:
npm run start:source