mycode-cli
Interactive coding agent CLI and web server, built on mycode-sdk.
Quick Start
Requires Python 3.12+. Install via uv:
uv tool install mycode-cli
Set a provider API key, then start:
export ANTHROPIC_API_KEY=...
mycode
Web UI (default at http://localhost:8000):
mycode web [--port <port>] [--hostname <hostname>]
Single message, non-interactive:
mycode run "explain how the session store works"
Providers
| Provider | id | Env var |
|---|---|---|
| Anthropic | anthropic |
ANTHROPIC_API_KEY |
| OpenAI | openai |
OPENAI_API_KEY |
| Google Gemini | google |
GEMINI_API_KEY |
| Moonshot | moonshotai |
MOONSHOT_API_KEY |
| MiniMax | minimax |
MINIMAX_API_KEY |
| DeepSeek | deepseek |
DEEPSEEK_API_KEY |
| Z.AI | zai |
ZAI_API_KEY |
| OpenRouter | openrouter |
OPENROUTER_API_KEY |
| Alibaba Cloud | alibaba |
DASHSCOPE_API_KEY |
| xAI | xai |
XAI_API_KEY |
| OpenAI-compatible | openai_chat |
- |
Run /model in the TUI to see available models.
Configuration
A config file is optional. API keys from the environment are usually sufficient.
Create ~/.mycode/config.json (global) or .mycode/config.json under the current project to:
- set a default provider and model
- expose additional models on an existing provider (e.g. OpenRouter's catalog)
- register a custom endpoint, such as a private or regional deployment
{
"default": {
"provider": "anthropic",
"model": "claude-sonnet-4-6"
},
"providers": {
"openrouter": {
"models": {
"deepseek/deepseek-v3.2": {},
"xiaomi/mimo-v2-pro": {}
}
},
"zhipu-coding-plan": {
"type": "zai",
"base_url": "https://open.bigmodel.cn/api/coding/paas/v4",
"api_key": "${ZHIPU_API_KEY}"
},
"custom-provider": {
"type": "openai_chat",
"base_url": "https://custom-endpoint.com/v1",
"api_key": "${CUSTOM_API_KEY}",
"models": {
"custom-model": {
"context_window": 128000,
"max_output_tokens": 16384,
"supports_image_input": false
}
}
}
}
}
- To override a built-in provider, reuse its id as the key. No
typeneeded. Custom providers must declare atype, one of the built-in protocols. - API keys in config accept
${ENV_VAR}references. - Model metadata is bundled from models.dev.
{}is enough for most models. Provide explicit fields only for models not listed there.
Built-in Moonshot, MiniMax, and Z.AI providers default to international endpoints. Override
base_urlfor China endpoints.
See docs/config.md for the full schema and resolution rules.
CLI Reference
mycode start interactive session (new)
mycode --continue resume the most recent session
mycode --session <id> resume a specific session
mycode run "..." send one message, non-interactive
mycode run --effort high "..." set effort for one run
mycode web start web server (default port 8000)
mycode web --dev API only, no static files
mycode session list list saved sessions
Interactive slash commands: /new /resume /rewind /provider /model /effort /clear /compact /q
License
MIT
Release files for mycode-cli 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mycode_cli-0.12.0.tar.gz | 3.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mycode_cli-0.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 MB
Release files / mycode_cli-0.12.0.tar.gz
| Download URL | mycode_cli-0.12.0.tar.gz |
|---|---|
| Size | 3.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e21fb454db37bfd91a5a38c3474ef1019292ed59fad5ed17d179d834a252154
|
|
BLAKE2b-256 checksum How to use checksums |
7c9033803fa4a0aa985fedde67670bb34cc8a98f0614f5192e58b7775796e4ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mycode_cli-0.12.0-py3-none-any.whl
| Download URL | mycode_cli-0.12.0-py3-none-any.whl |
|---|---|
| Size | 3.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f7c2edde3f3ecfd350bd9da4271657c1f0d925e1830f7f4054d9f537a8a8c2a
|
|
BLAKE2b-256 checksum How to use checksums |
271557cda4968c9d8b256a42920d6bfcd3861286025567b831ff8a5b40ccbaa1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|