Skip to content

startvibecoding/mothx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

497 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MothX

MothX

๐Ÿš€ One Binary to Rule Them All โ€” Your AI Coding Assistant in the Terminal

Stop switching between Claude Code, Codex, Claw, and Hermes.
MothX packs everything into a single file โ€” providers, tools, sandbox, sessions, skills, and more.

npm downloads PyPI version GitHub release Gitee release License: MIT Go Report Card GoDoc Dependencies

ๅ›ฝๅ†…้•œๅƒ: Gitee

Rename notice: MothX was formerly known as VibeCoding. During this transition release, legacy entry points such as the vibecoding command, the old installer package names, and VIBECODING_* environment variables are kept for compatibility. Legacy .vibecoding and .vibe directories are automatically migrated to .mothx when found.


โœจ Why MothX?

The Problem: You're juggling multiple AI coding tools โ€” Claude Code for one thing, Codex for another, Claw for something else. Each has its own setup, its own quirks, its own dependencies.

The Solution: MothX is the all-in-one terminal AI coding assistant that does it all. One binary. One config. Zero hassle.

๐ŸŽฏ Key Highlights

Feature What It Means for You
โš™๏ธ Workflow Mode Dynamic Elisp workflows with phases, parallel execution, and multi-worker coordination โ€” automate complex development pipelines
๐Ÿค– Multi-Provider DeepSeek, OpenAI, Anthropic, Volcengine/Doubao, LongCat, Mistral, GitHub Copilot, Cloudflare, Amazon Bedrock, and 20+ vendor adapters โ€” switch models instantly
โšก Lightning Fast SSE streaming, real-time token delivery, cache hit optimization
๐Ÿง  Think Mode Extended reasoning for complex problems (DeepSeek, o1, Claude, inline <think> parsing)
๐Ÿ›ก๏ธ Sandboxed bwrap process isolation โ€” safe file ops, network control, approval gates
๐Ÿ“ Sessions Persistent SQLite-backed history with branching, compaction, and tree structure
๐Ÿงฉ Skills Reusable prompt snippets for project conventions โ€” share across teams
๐Ÿ’ป IDE Ready ACP protocol for VS Code, Zed, JetBrains โ€” native editor integration
๐ŸŒ Gateway OpenAI-compatible HTTP API โ€” use MothX as a backend service
๐Ÿ“ฑ Messaging WeChat, Feishu, WebSocket โ€” deploy as a chatbot
๐Ÿค Multi-Agent Async sub-agents with --multi-agent, blocking delegation with --delegate, and A2A master mode
๐ŸŽจ Rich TUI Markdown rendering, syntax highlighting, thinking display, tool modals, multiline input
๐Ÿ“Š Stats Dashboard Web-based usage analytics with charts, filtering by time/vendor/protocol, and CLI fallback
๐Ÿ–ผ๏ธ Multimodal Image preprocessing, crop support, browser screenshots, and vision model integration
๐Ÿ”’ Security bashBlacklist > whitelist, YOLO mode safety, --print fails fast
๐Ÿ“ฆ Pure Go No external binary dependencies โ€” uses pure-Go grep/find SDKs, supports FreeBSD
โšก Approval V2 Interactive approval dialog, project-level bash auto-approval rules, and auto-edit whitelists

๐Ÿš€ Get Started in 30 Seconds

# Install (pick one)
npm install -g mothx-installer               # npm (recommended)
pipx install mothx-installer                # PyPI
curl -fsSL https://github.com/ghraw/startvibecoding/mothx/main/install.sh | bash  # Linux/macOS/FreeBSD (GitHub)
curl -fsSL https://gitee.com/startvibecoding/mothx/raw/main/install.sh | bash  # Linux/macOS/FreeBSD (Gitee ๅ›ฝๅ†…้•œๅƒ)

# Set your API key
export DEEPSEEK_API_KEY=sk-...

# Run
mothx

That's it. You're coding with AI.

Supported Platforms: Linux (x86_64, arm64), macOS (x86_64, arm64), Windows (x86_64), FreeBSD (x86_64, arm64)

Uninstall:

# npm
npm uninstall -g mothx-installer

# Compatibility package, if installed before the rename
npm uninstall -g vibecoding-installer

# PyPI
pipx uninstall mothx-installer

# Linux/macOS (one-line install)
curl -fsSL https://gitee.com/startvibecoding/mothx/raw/main/install.sh | bash -s -- --uninstall

# Windows (one-line install)
irm https://gitee.com/startvibecoding/mothx/raw/main/install.ps1 | iex; Uninstall-MothX

๐ŸŽฎ Three Modes for Every Situation

๐Ÿ—’๏ธ  Plan    โ†’ Read-only analysis & planning. Safe, sandboxed, no surprises.
๐Ÿ”ง  Agent   โ†’ Standard read/write. Bash approval required. (Default)
๐Ÿš€  YOLO    โ†’ Full system access. No restrictions. For the brave.

Switch modes anytime with /mode plan|agent|yolo or press Tab.


๐Ÿ—๏ธ Architecture at a Glance

mothx/
โ”œโ”€โ”€ cmd/mothx/        # CLI entry point
โ”œโ”€โ”€ internal/
โ”‚   โ”œโ”€โ”€ agent/             # Core agent loop
โ”‚   โ”œโ”€โ”€ provider/          # LLM provider abstraction (20+ vendors)
โ”‚   โ”œโ”€โ”€ tools/             # Built-in tools (read, write, bash, grep, find, ...)
โ”‚   โ”œโ”€โ”€ sandbox/           # bwrap sandbox implementation
โ”‚   โ”œโ”€โ”€ session/           # SQLite session storage
โ”‚   โ”œโ”€โ”€ skills/            # Skills system
โ”‚   โ”œโ”€โ”€ tui/               # Terminal UI (BubbleTea + Lipgloss)
โ”‚   โ”œโ”€โ”€ gateway/           # OpenAI-compatible HTTP gateway
โ”‚   โ”œโ”€โ”€ hermes/            # Messaging gateway (WeChat/Feishu/WebSocket)
โ”‚   โ”œโ”€โ”€ a2a/               # A2A protocol server & master mode
โ”‚   โ”œโ”€โ”€ acp/               # ACP / MCP integration
โ”‚   โ”œโ”€โ”€ stats/             # Usage statistics web dashboard
โ”‚   โ”œโ”€โ”€ workflow/          # Elisp workflow runtime
โ”‚   โ””โ”€โ”€ memory/            # Persistent memory (memory.md)
โ””โ”€โ”€ pkg/sdk/               # Public SDK interface

๐Ÿ“š Documentation

๐Ÿš€ Getting Started

โš™๏ธ Configuration

๐Ÿ—๏ธ Architecture

๐Ÿ”’ Security

๐Ÿ’ป IDE Integration

๐ŸŒ Gateway Modes

๐Ÿ“Š Analytics

๐Ÿ“– Tutorials

๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡ๆ–‡ๆกฃ


๐ŸŽฏ Use Cases

๐Ÿ’ป Daily Development

mothx -P "Refactor this function to use generics"
mothx -P "Write tests for the UserService struct"
mothx -P "Explain what this regex does"

๐Ÿ” Code Review

mothx --mode plan "Review this PR and suggest improvements"

๐Ÿš€ CI/CD Integration

mothx -p "Generate changelog from git log" > CHANGELOG.md

๐ŸŒ API Server

mothx gateway  # Start OpenAI-compatible HTTP server

๐Ÿ“ฑ Chatbot

mothx hermes   # Deploy as WeChat/Feishu bot

๐Ÿ“Š Usage Analytics

mothx stats    # Start web dashboard on 127.0.0.1:7878
mothx stats --cli  # Print stats in terminal

๐Ÿ”„ Dynamic Workflows

mothx --workflows  # Enable Elisp workflow automation
# Use workflow_run, workflow_status, workflow_cancel tools

๐Ÿ–ผ๏ธ Image Analysis

mothx -P "Describe this screenshot" --image screenshot.png
mothx -P "Extract text from this image" --image document.jpg

๐Ÿ› ๏ธ Built-in Tools

Tool Description
read Read file contents
write Create/overwrite files
edit Precise text replacement
bash Execute shell commands
grep Search file contents (powered by pure-Go ripgrep)
find Find files by pattern (powered by pure-Go fd)
ls List directory contents
plan Publish task plans
jobs Manage background jobs
kill Stop background jobs
skill_ref Load skill references
workflow_run Execute Elisp workflow DSL
workflow_status Check workflow run status
workflow_cancel Cancel running workflows
delegate_subagent Blocking single sub-agent delegation
subagent_spawn Async sub-agent execution
question Interactive user prompts (plan/agent modes)

๐Ÿ”ง Configuration

Settings Files

Location Platform Scope
~/.mothx/settings.json Linux/macOS/FreeBSD Global
%APPDATA%\mothx\settings.json Windows Global
.mothx/settings.json All Project (overrides global)

Existing .vibecoding and .vibe directories are automatically migrated to .mothx when the destination does not already exist. VIBECODING_* environment variables remain supported for compatibility; use MOTHX_DIR for new custom config directory overrides.

Environment Variables

Variable Description
DEEPSEEK_API_KEY DeepSeek API key
MOTHX_DIR Override config directory
VIBECODING_DIR Override config directory (legacy compatibility)
VIBECODING_PROVIDER Override default provider
VIBECODING_MODEL Override default model
VIBECODING_MODE Override default mode
VIBECODING_DEBUG Enable debug output
VIBECODING_NO_UPDATE_CHECK Disable update notifications
VIBECODING_NPM_REGISTRY Override npm registry URL

Gateway Configuration

Gateway-specific config lives in gateway.json (global ~/.mothx/gateway.json, project .mothx/gateway.json). See Gateway Mode for details.

Hermes Configuration

Hermes-specific config lives in hermes.json (global <GLOBAL_DIR>/hermes.json, project .mothx/hermes.json). See Hermes Mode for details.


๐Ÿค Contributing

We welcome contributions! See Development Guide for details.

git clone https://github.com/startvibecoding/mothx.git
cd mothx
make build
make test

๐Ÿ“„ License

MIT โ€” see LICENSE for details.


Ready to vibe? โญ Star this repo and start coding!

About

Ultra cost-effective terminal AI coding assistant with excellent token cache hit rate. Built in ~10K lines of Go, it uses DeepSeek by default with multiple modes and sandbox.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors