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 enough. Create ~/.mycode/config.json (global) or .mycode/config.json in a project to customize further.
Set a default provider and model:
{"default": {"provider": "anthropic", "model": "claude-sonnet-5"}}
Expose additional models on an existing provider, or register a custom endpoint such as a private or regional deployment:
{
"providers": {
"openrouter": {
"models": {"deepseek/deepseek-v4-pro": {}}
},
"my-endpoint": {
"type": "openai_chat",
"base_url": "https://example.com/v1",
"api_key": "${MY_API_KEY}",
"models": {"my-model": {}}
}
}
}
A providers key matching a built-in provider id overrides it; other names are custom providers and must declare a type (one of the ids in the table above). api_key accepts a literal value or a ${ENV_VAR} reference. {} is enough for models covered by the bundled models.dev metadata; add fields only for models it doesn't list.
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 — permission levels, web providers, and resolution rules.
Skills and instructions
The CLI assembles the system prompt from instructions files and discovered skills.
AGENTS.mdfiles are injected as project instructions:~/.mycode/AGENTS.md(fallback~/.agents/AGENTS.md), then everyAGENTS.mdfrom the project root down to the current directory. Later files take precedence.- Skills are directories containing a
SKILL.md. Scan roots, lowest to highest priority:~/.agents/skills/,~/.mycode/skills/, then.agents/skills/and.mycode/skills/from the project root down to the current directory. Later roots override earlier ones by skill name.SKILL.mdneeds YAML frontmatter withnameanddescription. - A standalone
/<skill-name>token in a message loads the matching skill, e.g.Use /fastapi to review this route. Names matching built-in slash commands are reserved.
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
Inside the TUI, @path attaches a file to the message — text files go as snapshots, images and PDFs as structured input.
License
MIT
Release files for mycode-cli 0.16.2
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.16.2.tar.gz | 3.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mycode_cli-0.16.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 MB
Release files / mycode_cli-0.16.2.tar.gz
| Download URL | mycode_cli-0.16.2.tar.gz |
|---|---|
| Size | 3.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
679525457872b3fb5c2259e81767a3202e39691142d9a8cc25b2b8f752d5281e
|
|
BLAKE2b-256 checksum How to use checksums |
8f57b303f53f2e7fe711e59579ed156754d7139fbe0a1688115d1c2ba3a4533a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","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.16.2-py3-none-any.whl
| Download URL | mycode_cli-0.16.2-py3-none-any.whl |
|---|---|
| Size | 3.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ea02e986f847c9209d1a8ce1dc1d9a9aab7856f45f8d9741e89d02b1aeb2835
|
|
BLAKE2b-256 checksum How to use checksums |
e5d59bf5e3b9ee2c3abc8022dac42e441499296ddcfa3e96625d5c50c3f387a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","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}
|