This guide explains how to install and get started with CommandMate via npm.
- Prerequisites
- Installation
- Initial Setup
- Starting and Stopping the Server
- CLI Command Reference
- Troubleshooting
- Upgrading
- Uninstalling
The following tools are required to use CommandMate.
| Tool | Version | Required | Check Command |
|---|---|---|---|
| Node.js | v20+ | Yes | node -v |
| npm | - | Yes | npm -v |
| Git | - | Yes | git --version |
| tmux | - | Yes | tmux -V |
| openssl | - | Yes | openssl version |
| Claude CLI | - | Optional | claude --version |
| gh CLI | - | Optional | gh --version |
# Check all dependencies
node -v && npm -v && git --version && tmux -V && openssl version# Using Homebrew
brew install node git tmux opensslsudo apt update
sudo apt install nodejs npm git tmux opensslNote: Windows is not currently supported (due to tmux dependency). WSL2 has not been tested.
Install globally using npm.
npm install -g commandmateVerify the installation:
commandmate --versioncommandmate initThe interactive setup configures:
- Worktree root directory
- Server port (default: 3000)
- External access permission (for mobile access)
- Authentication token (auto-generated when external access is enabled)
To set up with default values:
commandmate init --defaultsTo overwrite existing settings:
commandmate init --forcecommandmate start --daemoncommandmate startcommandmate start --devcommandmate start --port 3001commandmate statuscommandmate stopcommandmate stop --forceAfter starting the server, open your browser at:
http://localhost:3000
Port change: Use the port specified with the
--portoption.
Display the version.
commandmate --versionPerform initial setup.
commandmate init [options]| Option | Description |
|---|---|
--defaults |
Set up non-interactively with default values |
--force |
Overwrite existing settings |
Start the server.
commandmate start [options]| Option | Description |
|---|---|
--daemon |
Start in background |
--dev |
Start in development mode |
--port <port> |
Specify port (default: 3000) |
Stop the server.
commandmate stop [options]| Option | Description |
|---|---|
--force |
Force stop |
Display server status.
commandmate statusGitHub Issue management command (requires gh CLI).
commandmate issue create [options]
commandmate issue search <query>
commandmate issue list| Subcommand | Description |
|---|---|
create |
Create a new Issue |
search <query> |
Search Issues |
list |
List Issues |
| Option | Description |
|---|---|
--title <title> |
Issue title |
--body <body> |
Issue body |
--bug |
Use Bug Report template |
--feature |
Use Feature Request template |
--question |
Use Question template |
--labels <labels> |
Labels (comma-separated) |
Display CommandMate documentation.
commandmate docs [options]| Option | Description |
|---|---|
--section <name> |
Display specified section content |
--search <query> |
Search within documentation |
--all |
List all available sections |
If you see commandmate: command not found:
# Check npm global bin path
npm config get prefix
# Add to PATH (bash/zsh)
export PATH="$(npm config get prefix)/bin:$PATH"
# Persist (~/.bashrc or ~/.zshrc)
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcIf you get a permission error with npm install -g:
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
# Persist
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrc
# Reinstall
npm install -g commandmatesudo npm install -g commandmateIf you see Error: Port 3000 is already in use:
# Start on a different port
commandmate start --port 3001
# Or check and stop the process using the port
lsof -ti:3000 | xargs kill -9# Check status
commandmate status
# Force stop and restart
commandmate stop --force
commandmate start --daemon
# Check logs (in config directory)
tail -f ~/.commandmate/logs/server.log# tmux not found
brew install tmux # macOS
sudo apt install tmux # Ubuntu/Debian
# Node.js version too old
node -v # v20+ required# Reset database (data will be deleted)
rm -rf ~/.commandmate/data
commandmate init --forceTo upgrade to the latest version:
npm install -g commandmate@latestAfter upgrading, verify the version:
commandmate --versionRestart the server:
commandmate stop
commandmate start --daemoncommandmate stopnpm uninstall -g commandmate# Completely remove configuration and data
rm -rf ~/.commandmate- Web App Guide - Basic browser operations
- Quick Start Guide - Using Claude Code commands
- Deployment Guide - Production environment deployment
- README - Project overview
- Architecture - System design
- Trust & Safety - Security and permissions