Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bigfishnpm/matrixcode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@bigfishnpm/matrixcode
AI coding assistant CLI with multi-model support, intelligent context compression, and cross-session memory.
Installation
npm install -g @bigfishnpm/matrixcodeThe package automatically downloads the pre-built binary for your platform:
- Windows (x64)
- macOS (x64, arm64)
- Linux (x64, arm64)
Usage
Interactive Terminal Mode
matrixcodeStart an interactive terminal UI with:
- Streaming response rendering
- Markdown formatting
- Code syntax highlighting
- Tool call visualization
One-shot Query
matrixcode "Analyze this project structure"
# JSON output mode (for scripting)
matrixcode --mode service "Explain this function"Daemon Mode
For VS Code extension integration:
matrixcode --mode daemonSend JSON requests via stdin:
echo '{"type":"chat","content":"test"}' | matrixcode --mode daemonSession Management
# List previous sessions
matrixcode --list-sessions
# Resume a session
matrixcode --resumeConfiguration
Create ~/.matrix/config.json:
{
"provider": "anthropic",
"apiKey": "your-api-key",
"model": "claude-sonnet-4-20250514",
"maxTokens": 16384,
"think": true
}Or use environment variables:
export PROVIDER=anthropic
export API_KEY=your-key
export MODEL=claude-sonnet-4-20250514Features
🤖 Multi-Model Support
- Anthropic Claude (Sonnet, Opus, Haiku)
- OpenAI GPT (GPT-4, GPT-3.5)
- Flexible model configuration for different tasks
🧠 Cross-Session Memory
- SQLite persistent storage
- Automatic memory extraction from conversations
- Keyword-triggered retrieval
- User preferences, project context, learning records
🗜️ Intelligent Context Compression
- Multi-phase compression strategy
- Dependency analysis and importance scoring
- Tool call result compression
- Session summarization
🔧 Rich Tool System
- File operations: read, write, edit, glob, grep
- Code execution: bash (sandboxed)
- Code intelligence: codegraph (tree-sitter based)
- Web capabilities: webfetch, websearch
- Task management: todo_write, task
📋 Workflow Engine
- YAML-defined workflows
- Multiple node types: AI, tool, condition, validate
- Failure strategies: retry, skip, fail, fallback
CLI Options
matrixcode [OPTIONS] [MESSAGE]
Options:
--mode <MODE> Run mode: terminal, tui, service, json, daemon
--resume, -r Interactively select session to resume
--session <ID> Resume from specific session
--list-sessions List previous sessions
--config <PATH> Configuration file path
--help Show help
--version Show versionLinks
License
MIT