Skip to main content

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.

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_url for 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.md files are injected as project instructions: ~/.mycode/AGENTS.md (fallback ~/.agents/AGENTS.md), then every AGENTS.md from 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.md needs YAML frontmatter with name and description.
  • 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.

Terminal UI

Key Action
Enter Send the message (steer while a reply runs); with a completion menu open, accept it
Ctrl+Q Queue the message for after the reply; otherwise send it
Alt+Up Take back pending steers and queued messages into the input
Esc then Enter, or Alt+Enter Insert a newline
Esc Take back pending messages and interrupt the reply; close a selection list
Ctrl+C Take back pending messages and interrupt the reply; otherwise clear the input
Ctrl+D Exit (empty input only)
Ctrl+L Clear the screen
Up / Down Move between lines; on the first or last line, browse input history

While a reply runs, Enter steers it: the model sees the message at its next step, after the running tools finish. Ctrl+Q queues the message instead; queued messages are sent together as the next turn when the reply finishes. Pending messages show above the input. Commands are unavailable until the reply ends.

@path attaches a file to the message: text files as snapshots, images and PDFs as image or document input. Pasted file paths become @path references.

Slash commands: /new (alias /clear) /resume /rewind /model /effort /compact /quit (alias /exit). exit and quit also exit.

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

License

MIT

Metadata

Release files for mycode-cli 0.19.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mycode-cli 0.19.2
File Size Uploaded
mycode_cli-0.19.2.tar.gz 3.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for mycode-cli 0.19.2
File Interpreter ABI Platform
mycode_cli-0.19.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.6 MB

Release files / mycode_cli-0.19.2.tar.gz

Download URL mycode_cli-0.19.2.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
b4e289b4cbf307bc07144b1795abe191fa3959336d447691d2ca47718e24605d
BLAKE2b-256 checksum
How to use checksums
f522621472b8a72060b659701c5df64e6599170653beff0beb89b9766b5a8bd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.19.2-py3-none-any.whl

Download URL mycode_cli-0.19.2-py3-none-any.whl
Size 3.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b9dedb7a947ab994ab8dbd01c803c8299ee2b35eb917e9b8ad45e2f38796ae7d
BLAKE2b-256 checksum
How to use checksums
59453fc588dc15761f88d46fffcab53ef64f5ce910bf9fc0cef39622f99a3f55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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 history Release notifications | RSS feed

0.21.0

2 release files

0.20.0

2 release files

This release

0.19.2 This release

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.2

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.14.0

2 release files

0.13.3

2 release files

0.13.2

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.10

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.0

1 release file

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page