Skip to content

Repository files navigation

mycode

There are many coding agents, but this one is mine.

A minimal coding agent.

Quick Start

Requires Python 3.12+. Install via uv:

uv tool install mycode-cli

Interactive terminal UI:

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"

API keys are discovered automatically from environment variables. Run /model in the TUI to see available models.

Providers

Supports Alibaba Cloud, Anthropic, OpenAI, Google Gemini, DeepSeek, Moonshot, MiniMax, Z.AI, OpenRouter, xAI, and any OpenAI-compatible endpoint. Set the provider's env var and you're ready.

See cli/README.md for the full provider table and configuration.

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

Development

git clone https://github.com/legibet/mycode.git && cd mycode
uv sync --dev
uv run mycode

Web development (backend + Vite dev server):

uv run mycode web --dev
pnpm --dir web install && pnpm --dir web dev

Or start both together:

just dev

Other useful shortcuts: just check · just test · just fmt

Build distributable artifacts:

uv build --package mycode-sdk
uv build --package mycode-cli

mycode-sdk

Agent core of mycode as a lightweight Python SDK for building custom agents. Install via uv add mycode-sdk.

from mycode import Agent

agent = Agent(model="claude-sonnet-4-6", api_key="...")

result = agent.run("What is 2 + 2?")
print(result.text)

See mycode/README.md for details.

License

MIT

About

A minimal coding agent.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages