
agentic coding in 30 loc. a loop, three tools, and an llm.
features
bash, read and write tools
- chat REPL by default
- non-interactive mode with
-p 'prompt' arg
install
npx @avcodes/mi
npm i -g @avcodes/mi
mi
usage
OPENAI_API_KEY=sk-... mi
mi -p 'refactor auth.js to use bcrypt'
MODEL=qwen3.5:4b OPENAI_BASE_URL=http://localhost:33821 mi
env
OPENAI_API_KEY | — | api key |
OPENAI_BASE_URL | https://api.openai.com | api base url (ollama, lmstudio, litellm, etc) |
MODEL | gpt-5.4 | model name |
SYSTEM_PROMPT | built-in agent prompt | override the system prompt entirely |