{"id":48099413,"url":"https://github.com/liumengxuan04/minicode","last_synced_at":"2026-04-06T17:01:11.805Z","repository":{"id":348316804,"uuid":"1197491237","full_name":"LiuMengxuan04/MiniCode","owner":"LiuMengxuan04","description":"A lightweight terminal coding assistant with Claude Code-like workflow, tool loop, and TUI architecture, built for learning and experimentation. Multi-language support: TypeScript and Rust implementations available now, Python coming soon.","archived":false,"fork":false,"pushed_at":"2026-04-05T13:00:22.000Z","size":257,"stargazers_count":178,"open_issues_count":2,"forks_count":13,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-05T16:03:01.999Z","etag":null,"topics":["ai-agent","cli","coding-agent","developer-tools","nodejs","terminal","tool-calling","tui","typescript"],"latest_commit_sha":null,"homepage":"https://liumengxuan04.github.io/MiniCode/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LiuMengxuan04.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-31T16:13:54.000Z","updated_at":"2026-04-05T13:00:26.000Z","dependencies_parsed_at":"2026-04-06T17:00:27.304Z","dependency_job_id":null,"html_url":"https://github.com/LiuMengxuan04/MiniCode","commit_stats":null,"previous_names":["liumengxuan04/minicode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LiuMengxuan04/MiniCode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiuMengxuan04%2FMiniCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiuMengxuan04%2FMiniCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiuMengxuan04%2FMiniCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiuMengxuan04%2FMiniCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LiuMengxuan04","download_url":"https://codeload.github.com/LiuMengxuan04/MiniCode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiuMengxuan04%2FMiniCode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31481238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T14:34:32.243Z","status":"ssl_error","status_checked_at":"2026-04-06T14:34:31.723Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","cli","coding-agent","developer-tools","nodejs","terminal","tool-calling","tui","typescript"],"created_at":"2026-04-04T15:40:59.017Z","updated_at":"2026-04-06T17:01:11.743Z","avatar_url":"https://github.com/LiuMengxuan04.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MiniCode\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./docs/logo.svg\" alt=\"MiniCode Logo\" width=\"180\" /\u003e\n\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003eMiniCode\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Editor-Minicode-D97757?style=for-the-badge\" alt=\"Editor: Minicode\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/%23minicode-Project-B85C3F?style=for-the-badge\" alt=\"#minicode\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/%23lightweight-Focus-F0EBE1?style=for-the-badge\u0026labelColor=8B8B8B\" alt=\"#lightweight\" /\u003e\n\u003c/p\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  A lightweight, highly efficient coding tool. Designed for speed, built for simplicity.\n\u003c/p\u003e\n\n[简体中文](./README.zh-CN.md) | [Architecture](./ARCHITECTURE.md) | [Contributing](./CONTRIBUTING.md) | [Roadmap](./ROADMAP.md) | [Learn Claude Code Design Through MiniCode](./CLAUDE_CODE_PATTERNS.md) | [License](./LICENSE)\n\nA lightweight terminal coding assistant for local development workflows.\n\nMiniCode provides Claude Code-like workflow and architectural ideas in a much smaller implementation, making it especially useful for learning, experimentation, and custom tooling.\n\n## Overview\n\nMiniCode is built around a practical terminal-first agent loop:\n\n- accept a user request\n- inspect the workspace\n- call tools when needed\n- review file changes before writing\n- return a final response in the same terminal session\n\nThe project is intentionally compact, so the control flow, tool model, and TUI behavior remain easy to understand and extend.\n\n## Multi-language Versions\n\n- TypeScript (this repo): [MiniCode](https://github.com/LiuMengxuan04/MiniCode)\n- Rust version: [MiniCode-rs (latest)](https://github.com/harkerhand/MiniCode-rs/tree/master)\n- Python version: coming soon\n\n## Table of Contents\n\n- [Product Showcase Page](#product-showcase-page)\n- [Why MiniCode](#why-minicode)\n- [Features](#features)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Commands](#commands)\n- [Configuration](#configuration)\n- [Skills and MCP Usage](#skills-and-mcp-usage)\n- [Star History](#star-history)\n- [Project Structure](#project-structure)\n- [Architecture Docs](#architecture-docs)\n- [Contributing](#contributing)\n- [Roadmap](#roadmap)\n- [Learn Claude Code Design Through MiniCode](#learn-claude-code-design-through-minicode)\n- [Development](#development)\n\n## Product Showcase Page\n\n- Open [docs/index.html](./docs/index.html) in a browser for a visual product overview.\n- GitHub Pages (recommended): `https://liumengxuan04.github.io/MiniCode/`\n\n## Why MiniCode\n\nMiniCode is a good fit if you want:\n\n- a lightweight coding assistant instead of a large platform\n- a terminal UI with tool calling, transcript, and command workflow\n- a small codebase that is suitable for study and modification\n- a reference implementation for Claude Code-like agent architecture\n\n## Features\n\n### Core workflow\n\n- multi-step tool execution in a single turn\n- model -\u003e tool -\u003e model loop\n- full-screen terminal interface\n- input history, transcript scrolling, and slash command menu\n- discoverable local skills via `SKILL.md`\n- dynamic MCP tool loading over stdio\n- MCP resources and prompts via generic MCP helper tools\n\n### Built-in tools\n\n- `list_files`\n- `grep_files`\n- `read_file`\n- `write_file`\n- `edit_file`\n- `patch_file`\n- `modify_file`\n- `run_command`\n- `ask_user`\n- `load_skill`\n- `list_mcp_resources`\n- `read_mcp_resource`\n- `list_mcp_prompts`\n- `get_mcp_prompt`\n\n### Safety and usability\n\n- review-before-write flow for file modifications\n- path and command permission checks\n- local installer with independent config storage\n- support for Anthropic-style API endpoints\n\n### Recent interaction upgrades\n\n- approval prompts now use Up/Down selection with Enter confirm\n- approval prompts also support direct letter/number shortcuts shown in each option\n- supports \"reject with guidance\" to send corrective instructions back to the model\n- edit approvals support \"allow this file for this turn\" and \"allow all edits for this turn\"\n- file review now uses standard unified diff output (closer to `git diff`)\n- approval view supports `Ctrl+O` expand/collapse plus wheel/page scrolling\n- `Ctrl+C` now exits cleanly even when an approval prompt is open\n- finished tool calls auto-collapse into concise summaries to reduce transcript noise\n- explicit background shell commands launched through `run_command` are now surfaced as lightweight shell tasks instead of remaining stuck as a forever-running tool call\n- TTY input handling is serialized, and CRLF Enter sequences are normalized so approval confirms do not accidentally fire twice\n- fixed an input-event deadlock where approval prompts could stop accepting Up/Down/Enter\n- escape-sequence parsing is hardened so malformed terminal input does not stall key handling\n- `run_command` now accepts single-string invocations like `\"git status\"` and auto-splits args\n- clarifying questions are now structured via `ask_user`, and the turn pauses until the user replies\n\n## Installation\n\n```bash\ncd mini-code\nnpm install\nnpm run install-local\n```\n\nThe installer will ask for:\n\n- model name\n- `ANTHROPIC_BASE_URL`\n- `ANTHROPIC_AUTH_TOKEN`\n\nConfiguration is stored in:\n\n- `~/.mini-code/settings.json`\n- `~/.mini-code/mcp.json`\n\nThe launcher is installed to:\n\n- `~/.local/bin/minicode`\n\nIf `~/.local/bin` is not already on your `PATH`, add:\n\n```bash\nexport PATH=\"$HOME/.local/bin:$PATH\"\n```\n\n## Quick Start\n\nRun the installed launcher:\n\n```bash\nminicode\n```\n\nRun in development mode:\n\n```bash\nnpm run dev\n```\n\nRun in offline demo mode:\n\n```bash\nMINI_CODE_MODEL_MODE=mock npm run dev\n```\n\n## Commands\n\n### Management commands\n\n- `minicode mcp list`\n- `minicode mcp add \u003cname\u003e [--project] [--protocol \u003cmode\u003e] [--env KEY=VALUE ...] -- \u003ccommand\u003e [args...]`\n- `minicode mcp remove \u003cname\u003e [--project]`\n- `minicode skills list`\n- `minicode skills add \u003cpath\u003e [--name \u003cname\u003e] [--project]`\n- `minicode skills remove \u003cname\u003e [--project]`\n\n### Local slash commands\n\n- `/help`\n- `/tools`\n- `/skills`\n- `/mcp`\n- `/status`\n- `/model`\n- `/model \u003cname\u003e`\n- `/config-paths`\n\n### Terminal interaction\n\n- command suggestions and slash menu\n- transcript scrolling\n- prompt editing\n- input history navigation\n- approval selection and feedback input flow (Up/Down + Enter, or key shortcuts)\n\n## Configuration\n\nExample configuration:\n\n```json\n{\n  \"model\": \"your-model-name\",\n  \"mcpServers\": {\n    \"filesystem\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-filesystem\", \".\"]\n    }\n  },\n  \"env\": {\n    \"ANTHROPIC_BASE_URL\": \"https://api.anthropic.com\",\n    \"ANTHROPIC_AUTH_TOKEN\": \"your-token\",\n    \"ANTHROPIC_MODEL\": \"your-model-name\"\n  }\n}\n```\n\nProject-scoped MCP config is also supported through Claude Code compatible `.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"filesystem\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-filesystem\", \".\"]\n    }\n  }\n}\n```\n\nFor vendor compatibility, MiniCode now auto-negotiates stdio framing:\n\n- standard MCP `Content-Length` framing is tried first\n- if that fails, MiniCode falls back to newline-delimited JSON\n- you can force a mode per server with `\"protocol\": \"content-length\"` or `\"protocol\": \"newline-json\"`\n\nSkills are discovered from:\n\n- `./.mini-code/skills/\u003cskill-name\u003e/SKILL.md`\n- `~/.mini-code/skills/\u003cskill-name\u003e/SKILL.md`\n- `./.claude/skills/\u003cskill-name\u003e/SKILL.md`\n- `~/.claude/skills/\u003cskill-name\u003e/SKILL.md`\n\nConfiguration priority:\n\n1. `~/.mini-code/settings.json`\n2. `~/.mini-code/mcp.json`\n3. project `.mcp.json`\n4. compatible existing local settings\n5. process environment variables\n\n## Skills and MCP Usage\n\nMiniCode supports two extension layers:\n\n- `skills`: local workflow instructions, usually described by a `SKILL.md`\n- `MCP`: external tool providers that expose tools, resources, and prompts into MiniCode\n\n### Skills: install, inspect, trigger\n\nInstall a local skill:\n\n```bash\nminicode skills add ~/minimax-skills/skills/frontend-dev --name frontend-dev\n```\n\nList installed or discovered skills:\n\n```bash\nminicode skills list\n```\n\nInside the interactive UI, you can also run:\n\n```text\n/skills\n```\n\nto inspect which skills are available in the current session.\n\nIf you explicitly mention a skill name, MiniCode will prefer loading it. For example:\n\n```text\nUse the frontend-dev skill and directly rebuild the current landing page instead of stopping at a plan.\n```\n\nIf you want to be even more explicit:\n\n```text\nLoad the fullstack-dev skill first, then follow its workflow to implement this task.\n```\n\nA common pattern is to clone an official or Claude Code-compatible skills repo locally and install from there:\n\n```bash\ngit clone https://github.com/MiniMax-AI/skills.git ~/minimax-skills\nminicode skills add ~/minimax-skills/skills/frontend-dev --name frontend-dev\n```\n\n### MCP: install, inspect, trigger\n\nInstall a user-scoped MCP server:\n\n```bash\nminicode mcp add MiniMax --env MINIMAX_API_KEY=your-key --env MINIMAX_API_HOST=https://api.minimaxi.com -- uvx minimax-coding-plan-mcp -y\n```\n\nList configured MCP servers:\n\n```bash\nminicode mcp list\n```\n\nTo configure an MCP server only for the current project, add `--project`:\n\n```bash\nminicode mcp add filesystem --project -- npx -y @modelcontextprotocol/server-filesystem .\nminicode mcp list --project\n```\n\nInside the interactive UI, run:\n\n```text\n/mcp\n```\n\nto see which servers are connected, which protocol they negotiated, and how many tools / resources / prompts they expose.\n\nMCP tools are automatically registered as:\n\n```text\nmcp__\u003cserver_name\u003e__\u003ctool_name\u003e\n```\n\nFor example, after connecting the MiniMax MCP server you may see:\n\n- `mcp__minimax__web_search`\n- `mcp__minimax__understand_image`\n\nThese tool names are not hand-written in MiniCode. They appear automatically after a successful MCP connection.\n\n### How to use them in chat\n\nThe simplest approach is to just describe the task naturally and let the model decide when to use a skill or MCP tool:\n\n```text\nSearch for recent Chinese-language resources about MCP and give me 5 representative links.\n```\n\nIf MiniMax MCP is connected, the model will typically choose `mcp__minimax__web_search`.\n\nIf you want a more controlled workflow, name the skill or target capability explicitly:\n\n```text\nUse the frontend-dev skill and directly modify the current project files to turn this page into a more complete product landing page.\n```\n\nOr:\n\n```text\nUse the connected MCP tools to search for the MiniMax MCP guide and summarize what capabilities it provides.\n```\n\n### When to use skills vs MCP\n\n- `skills` are better for workflow, conventions, domain-specific instructions, and reusable execution patterns\n- `MCP` is better for search, image understanding, browsers, filesystems, databases, and other remote capabilities\n\nA common combination is:\n\n- use a skill such as `frontend-dev` to shape how the work should be done\n- use MCP to provide external search, image understanding, or system integrations\n\n### Compatibility notes\n\nMiniCode currently focuses on:\n\n- local `SKILL.md` discovery with `load_skill`\n- stdio MCP servers\n- MCP tools\n- generic helper tools for MCP resources and prompts\n\nFor vendor compatibility, MiniCode automatically tries:\n\n- standard `Content-Length` framing\n- then falls back to `newline-json` if needed\n\nThat means servers such as MiniMax MCP, which use newline-delimited JSON over stdio, can still be connected directly.\n\n## Star History\n\n\u003ca href=\"https://www.star-history.com/?repos=LiuMengxuan04%2FMiniCode\u0026type=date\u0026legend=top-left\"\u003e\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/image?repos=LiuMengxuan04/MiniCode\u0026type=date\u0026theme=dark\u0026legend=bottom-right\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/image?repos=LiuMengxuan04/MiniCode\u0026type=date\u0026legend=bottom-right\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/image?repos=LiuMengxuan04/MiniCode\u0026type=date\u0026legend=bottom-right\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e\n\n## Learn Claude Code Design Through MiniCode\n\nIf you want to study the project as a learning resource, continue with:\n\n- [What Claude Code Design Ideas You Can Learn Through MiniCode](./CLAUDE_CODE_PATTERNS.md)\n\n## Project Structure\n\n- `src/index.ts`: CLI entry\n- `src/agent-loop.ts`: multi-step model/tool loop\n- `src/tool.ts`: tool registry and execution\n- `src/skills.ts`: local skill discovery and loading\n- `src/mcp.ts`: stdio MCP client and dynamic tool wrapping\n- `src/manage-cli.ts`: top-level `minicode mcp` / `minicode skills` management commands\n- `src/tools/*`: built-in tools\n- `src/tui/*`: terminal UI modules\n- `src/config.ts`: runtime configuration loading\n- `src/install.ts`: interactive installer\n\n## Architecture Docs\n\n- [Architecture Overview](./ARCHITECTURE.md)\n- [中文架构说明](./ARCHITECTURE_ZH.md)\n\n## Contributing\n\n- [Contribution Guidelines](./CONTRIBUTING.md)\n- [中文贡献规范](./CONTRIBUTING_ZH.md)\n\n## Roadmap\n\n- [Roadmap](./ROADMAP.md)\n- [路线图（中文）](./ROADMAP_ZH.md)\n\n## Development\n\n```bash\nnpm run check\n```\n\nMiniCode is intentionally small and pragmatic. The goal is to keep the architecture understandable, hackable, and easy to extend.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliumengxuan04%2Fminicode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliumengxuan04%2Fminicode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliumengxuan04%2Fminicode/lists"}