mi CLI
mi is agentic coding in 30 lines: a loop, two tools and a model; works with any OpenAI-compatible API and runs in Docker.
- 105 ★ on the repository
- Last commit
Broad access
Why this level
- The `bash` tool runs commands with full system access and no confirmation.
- `delegate` and `goal` spawn subagents that work in the same directory and change files without your involvement.
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/miDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The `bash` tool runs commands with full system access and no confirmation.
- `delegate` and `goal` spawn subagents that work in the same directory and change files without your involvement.
This is third-party code. Review the repository files before installing.
What it does
mi is a minimal agentic Node.js CLI: a loop of model calls, a `bash` tool with full system access and a `skill` tool that loads Markdown playbooks from `skills/` and `~/.agents/skills/`. It works with any OpenAI-compatible API: OpenAI, Ollama, LM Studio, LiteLLM, vLLM and local models. On top of the loop sit `delegate`, which spawns a subagent, and `goal`, which iterates subagents until a judge accepts the work. Eleven bundled skills cover planning, refactoring, review, debugging and TDD. The `--sandbox` mode runs the agent in a Docker container with your directory, and `-p` suits scripts and CI.
Who it is for. Developers who want a readable minimal agent for the terminal, CI or experiments with local models and their own tools.
Good fit when
- A terminal agent on a local model through Ollama or LM Studio is needed.
- A task goes into CI with a single `mi -p` command.
- Risky experiments run in a container through `mi --sandbox`.
- The agent writes new tools for itself as `.mjs` files in `tools/`.
- A large goal is split into iterations with subagents and a judge through `goal`.
Not a fit when
- Every command must be confirmed: the description has no approval mechanism.
- An editor integration is needed: mi offers only a terminal and scripts.
- Company policy requires an explicit code licence.
Example request
Run `mi -p "refactor auth.js to use bcrypt"` in the sandbox and show which files the agent changed.Limitations
The `bash` tool gives the agent full system access and there are no command approvals, so dangerous tasks run with `--sandbox` in Docker. The `OPENAI_API_KEY` and API address are set through environment variables or `~/.mi/config.json`. No licence is stated in the repository. The `goal` mode can burn many requests: up to 128 iterations by default, and each run is billed to your API key. The project description is in English only.
How to disable. Remove the package with `npm uninstall -g @avcodes/mi`, the `~/.mi/` directory and any added skills from `~/.agents/skills/`. Delete the `ghcr.io/av/mi` image with Docker.
FAQ
How do I run mi?
`npx @avcodes/mi` runs it without installing, `npm i -g @avcodes/mi` installs globally and `docker run --rm -it -e OPENAI_API_KEY ghcr.io/av/mi` uses a container. Set `OPENAI_API_KEY` and for a local model add `OPENAI_BASE_URL` and `MODEL`.
How do I run the agent in a sandbox?
`mi --sandbox -p "your task"` runs the agent in a Docker container with the current directory. To always run sandboxed, set `MI_SANDBOX=1`.
What does `goal` do?
It iterates: a worker subagent takes a step and a judge reads the progress file and reviews the result. The loop ends when the last review line is `VERDICT: PASS` or after the limit of 128 iterations.
How do I add my own tool?
Put an `.mjs` file in the `tools/` directory with `name`, `description`, `parameters` and `handler` fields. Tools are reloaded before each model call.
Which skills come bundled?
Eleven: `plan`, `tasks`, `delegate`, `explore`, `refactor`, `review`, `verify`, `debug`, `tdd`, `new-skill` and `self`. Your own skills go into `~/.agents/skills/`.
Discussion
No questions or reviews yet.
Related
CLI toolsAn open coding agent for the terminal, browser and desktop that works with models from OpenAI and Claude to Ollama
A multi-agent harness that verifies results by artifacts: stop hooks, an independent judge and an event log for Claude Code, Codex, Cursor and more
A CLI for training agents: your agent works on a task, and a mentor model reviews the result and sends back remarks
A local-first AI agent running on your own machine via llama.cpp that drives a browser, edits files, runs approved commands and remembers context across session
multi-agents runs a team of coding agents on a task and measures whether it beat a single agent and what it cost.
A scaffold of personas, rules and skills in plain Markdown: Maestro hands work to different models and spares your main plan
README in short
The documentation walks through agent internals step by step: messages, the API call, the loop, tool execution, the REPL, then delegation and `goal`. It includes an environment variable table and an example `~/.mi/config.json`.