@abanteai/mentat
v0.1.0
Published
Command line interface for Mentat AI coding assistant
Maintainers
Readme
Mentat CLI
Command line interface for Mentat AI coding assistant.
Installation
Install the CLI globally from npm:
npm install -g @abanteai/mentatAfter installation, you can use mentat directly:
mentat login
mentat ls
mentat message --id <agent-id> "Hello"Commands
The primary commands are:
Create Agent
Create a new agent and send an initial message:
mentat create [message]If no message is provided, the CLI will open your default editor. The same comment filtering applies as described in the Send Message section.
Options:
-W, --web: Open the new agent in your browser after creation-r, --repo <owner/repo>: Repository to create agent for (e.g., owner/repo)-b, --branch <branch>: Branch to use (defaults to repository default)-m, --model <model>: Model to use for the agent--show-filtered: Show comment lines that were filtered out from editor input
Aliases: new
List Agents
List your agents in a table format:
mentat list
mentat ls # aliasOptions:
-p, --page <number>: Page number (default: 0)-r, --rows <number>: Rows per page (default: 20)-s, --search <query>: Search query
Aliases: ls
Send Message
Send a message to an agent:
mentat message [message]
mentat comment [message] # alias
mentat msg [message] # aliasIf no message is provided, the CLI will open your default editor.
Options:
-W, --web: Open the agent in browser after messaging-R, --repo <owner/repo>: Repository to find agents in-b, --branch <branch>: Branch to find agents for--id <agent-id>: Send to specific agent by ID--number <number>: Send to agents subscribed to PR/issue number--show-filtered: Show comment lines that were filtered out from editor input
Aliases: comment, msg
Example:
mentat message "Please fix the bug in main.py"
mentat msg --id abc123 "Add error handling"View Agent
View an agent's events:
mentat view [options]Options:
-R, --repo <owner/repo>: Repository to find agents for-b, --branch <branch>: Branch to find agents for--id <agent-id>: View specific agent by ID--number <number>: View agents subscribed to PR/issue number
Checkout Agent Branch
Checkout the most recent branch made by an agent:
mentat checkout [options]
mentat co [options] # aliasOptions:
-R, --repo <owner/repo>: Repository to find agents for-b, --branch <branch>: Branch to find agents for--id <agent-id>: Checkout branch from specific agent by ID--number <number>: Checkout branch from agents subscribed to PR/issue number--live: Apply uncommitted edits from the agent to local files
Aliases: co
Configuration
The CLI stores its configuration in ~/.mentat/config.json. This file contains:
token: Your authentication tokeninstallationId: Default installation ID (optional, can be overridden with --installation flag)
Getting Help
Use the --help flag with any command to see available options:
mentat --help
mentat ls --help
mentat message --helpSupport
For support and documentation, visit mentat.ai/docs/cli.
