Terminal-based AI coding assistant with multi-model support, LSP integration, and MCP extensibility.
- Module:
github.com/nextsko/mocode-agent - Go Version: 1.26.2
- Binary Name:
mocode
mocode.json/.mocode.jsonfrom parent directories to the working directory.mocode/mocode.jsonworkspace data config$HOME/.config/mocode/mocode.jsonglobal config$HOME/.local/share/mocode/mocode.jsondata override config
# Unix
$HOME/.local/share/mocode/mocode.json
# Windows
%LOCALAPPDATA%\mocode\mocode.jsonOverride with env vars:
MOCODE_GLOBAL_CONFIGMOCODE_GLOBAL_DATA
{
"$schema": "https://charm.land/mocode.json",
"providers": {},
"lsp": {},
"mcp": {},
"permissions": {},
"options": {}
}| Variable | Provider |
|---|---|
ANTHROPIC_API_KEY |
Anthropic |
OPENAI_API_KEY |
OpenAI |
GEMINI_API_KEY |
Google Gemini |
GROQ_API_KEY |
Groq |
OPENROUTER_API_KEY |
OpenRouter |
AWS_ACCESS_KEY_ID |
Amazon Bedrock |
AWS_SECRET_ACCESS_KEY |
Amazon Bedrock |
AWS_REGION |
Amazon Bedrock |
VERTEXAI_PROJECT |
Google VertexAI |
VERTEXAI_LOCATION |
Google VertexAI |
{
"lsp": {
"go": {
"command": "gopls",
"env": {
"GOTOOLCHAIN": "go1.24.5"
}
},
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"]
}
}
}{
"mcp": {
"filesystem": {
"type": "stdio",
"command": "node",
"args": ["/path/to/mcp-server.js"],
"timeout": 120,
"disabled": false,
"disabled_tools": ["some-tool-name"]
},
"remote": {
"type": "http",
"url": "https://example.com/mcp/",
"timeout": 120,
"headers": {
"Authorization": "Bearer $REMOTE_MCP_TOKEN"
}
}
}
}{
"options": {
"debug": false,
"debug_lsp": false,
"disabled_tools": ["bash", "sourcegraph"],
"disabled_skills": ["mocode-config"],
"disable_notifications": false,
"disable_provider_auto_update": false,
"initialize_as": "AGENTS.md",
"skills_paths": ["~/.config/mocode/skills"],
"attribution": {
"trailer_style": "assisted-by",
"generated_with": true
}
}
}{
"permissions": {
"allowed_tools": ["view", "ls", "grep", "edit"]
}
}{
"providers": {
"deepseek": {
"type": "openai-compat",
"base_url": "https://api.deepseek.com/v1",
"api_key": "$DEEPSEEK_API_KEY",
"models": [
{
"id": "deepseek-chat",
"name": "Deepseek V3",
"context_window": 64000,
"default_max_tokens": 5000
}
]
}
}
}{
"providers": {
"custom-anthropic": {
"type": "anthropic",
"base_url": "https://api.anthropic.com/v1",
"api_key": "$ANTHROPIC_API_KEY",
"extra_headers": {
"anthropic-version": "2023-06-01"
},
"models": [
{
"id": "claude-sonnet-4-20250514",
"name": "Claude Sonnet 4",
"context_window": 200000,
"default_max_tokens": 50000,
"can_reason": true,
"supports_attachments": true
}
]
}
}
}task build # go build -buildvcs=false
task test # go test -race -failfast ./...
task lint # golangci-lint on changed files
task lint:strict # full lint suite across the entire repo
task fmt # gofumpt -w .
task dev # MOCODE_PROFILE=true go run -buildvcs=false .If you build from a source snapshot without usable Git metadata, use:
go build -buildvcs=false -o ./mocode .Global:
$MOCODE_SKILLS_DIR~/.config/agents/skills~/.config/mocode/skills%LOCALAPPDATA%\agents\skills(Windows)%LOCALAPPDATA%\mocode\skills(Windows)
Project:
.agents/skills.mocode/skills.claude/skills.cursor/skills
Location: ./.mocode/logs/mocode.log
mocode logs # Last 1000 lines
mocode logs --tail 500
mocode logs --follow