Command-line interface for AgentMaurice
MauriceCLI is a powerful command-line tool for interacting with AgentMaurice from your terminal. Chat with AI, manage files, analyze documents, run tasks, and control your AgentMaurice deployment—all without leaving the command line.
- Real-time chat sessions with AgentMaurice
- Beautiful terminal UI with syntax highlighting
- Stream responses as they're generated
- Conversation history and context management
- Batch mode for scripting and automation
- Upload files to AgentMaurice storage
- Download files from deployments
- List and search files
- Organize files with tags and metadata
- Analyze documents with AI
- Extract insights from PDFs, code, and text
- Generate summaries and reports
- Index documents for semantic search
- Create and manage tasks
- Track task execution status
- View task history and results
- Automate workflows with task templates
- Create and manage spaces
- Configure space settings
- Manage team members and permissions
- Project organization and collaboration
- API key authentication
- Firebase authentication (Google, GitHub, etc.)
- Session management
- Multi-deployment support
- Export conversation history
- Debug mode with request/response tracing
- Configuration management
- Scripting and automation support
Installers read the AgentMaurice update manifest, verify SHA256 and Minisign
signatures, then install the canonical maurice binary.
Install prerequisites first:
# Debian / Ubuntu
sudo apt-get update && sudo apt-get install -y jq minisign
# Fedora / RHEL
sudo dnf install -y jq minisign
# Alpine
sudo apk add jq minisign
# Arch
sudo pacman -S jq minisign
# macOS
brew install jq minisignLinux / macOS
curl -fsSL https://github.com/agentmaurice/mauricecli/releases/latest/download/install_mauricecli.sh | bashWindows
iwr https://github.com/agentmaurice/mauricecli/releases/latest/download/install_mauricecli.ps1 -OutFile install_mauricecli.ps1
.\install_mauricecli.ps1git clone https://github.com/agentmaurice/chatserver.git
cd chatserver
go build -o maurice ./cmd/mauricecli# Set API URL and authenticate
maurice login --api https://your-maurice-instance.com
# You'll be prompted for your API key
# Get your API key from: https://your-maurice-instance.com/settings/api-keys# Login with Firebase (Google, GitHub, etc.)
maurice firebase-login --api https://your-maurice-instance.com# Check authentication status
maurice whoami
# Test API connectivity
maurice ping# Start interactive chat session
maurice chat
# Send a single message
maurice chat send "What's the weather like today?"
# Chat in a specific space
maurice chat --space my-projectAuthenticate with an API key.
# Interactive login
maurice login
# Specify API URL
maurice login --api https://api.maurice.ai
# Non-interactive (for scripts)
echo "your-api-key" | maurice login --api https://api.maurice.aiAuthenticate with Firebase (Google, GitHub, email/password).
maurice firebase-login --api https://api.maurice.aiDisplay current authentication status.
maurice whoami
# Output:
# Authenticated as: user@example.com
# Organization: Acme Corp
# Deployment: prod-deployment-001
# API: https://api.maurice.aiStart an interactive chat session.
# Interactive mode
maurice chat
# Send single message
maurice chat send "Explain quantum computing"
# Chat in specific space
maurice chat --space research-project
# Chat with specific deployment
maurice chat --deployment prod-001
# Batch mode (read from file)
maurice chat --batch questions.txt
# Export conversation
maurice chat --export conversation.jsonInteractive Mode Shortcuts:
Ctrl+C- ExitCtrl+D- New conversation/help- Show help/clear- Clear screen/export <file>- Export conversation
List all accessible spaces.
maurice spaces list
# With filtering
maurice spaces list --filter "project"Create a new space.
maurice spaces create --name "My Project" --description "Project workspace"Get information about a space.
maurice spaces info <space-id>Set the default space for subsequent commands.
# Set default space
maurice use space <space-id>
# Set default deployment
maurice use deployment <deployment-id>
# Show current context
maurice useUpload files to AgentMaurice storage.
# Upload single file
maurice files upload document.pdf
# Upload multiple files
maurice files upload *.txt report.pdf
# Upload with custom name
maurice files upload local.txt --name remote.txt
# Upload to specific space
maurice files upload data.csv --space analyticsDownload files from storage.
# Download by file ID
maurice files download <file-id>
# Download to specific location
maurice files download <file-id> --output /path/to/save.pdf
# Download all files in space
maurice files download --space project-name --allList files in storage.
# List all files
maurice files list
# List files in specific space
maurice files list --space project-name
# Search files
maurice files list --search "report"
# Filter by type
maurice files list --type pdfDelete files from storage.
maurice files delete <file-id>
# Delete multiple files
maurice files delete <file-id-1> <file-id-2>Analyze documents with AI.
# Analyze a file
maurice analyze document.pdf
# Analyze with specific prompt
maurice analyze code.py --prompt "Find security vulnerabilities"
# Analyze multiple files
maurice analyze *.md --prompt "Summarize these docs"
# Output to file
maurice analyze report.pdf --output analysis.txtList tasks.
# List all tasks
maurice tasks list
# List pending tasks
maurice tasks list --status pending
# List tasks in space
maurice tasks list --space project-nameCreate a new task.
maurice tasks create --name "Process Data" --description "Analyze customer data"
# With specific execution time
maurice tasks create --name "Daily Report" --schedule "0 9 * * *"Get task status and results.
maurice tasks status <task-id>
# Watch task until completion
maurice tasks status <task-id> --watchDelete a task.
maurice tasks delete <task-id>Export conversation history and data.
# Export chat history
maurice export chat --output conversations.json
# Export from specific space
maurice export chat --space project-name --output project-chats.json
# Export files list
maurice export files --output files.json
# Export tasks
maurice export tasks --output tasks.jsonCreate command aliases for frequent operations.
# Create alias
maurice alias create ask "chat send"
# Use alias
maurice ask "What is the capital of France?"
# List aliases
maurice alias list
# Delete alias
maurice alias delete askTest API connectivity and authentication.
# Run connection tests
maurice test
# Test specific endpoint
maurice test --endpoint /api/v1/health
# Verbose output
maurice test --verbosePing the API server.
maurice ping
# Output:
# Pong! Response time: 45ms
# Server: AgentMaurice v2.1.0
# Status: HealthyMauriceCLI stores configuration in ~/.maurice/config.yaml:
api:
base_url: "https://api.maurice.ai"
api_key: "sk-abc123..."
storage:
base_url: "https://storage.maurice.ai"
current_deployment: "prod-deployment-001"
current_space: "default-space"
defaults:
chat_model: "claude-3-5-sonnet"
temperature: 0.7
max_tokens: 4096Override configuration with environment variables:
export MAURICE_API="https://api.maurice.ai"
export MAURICE_API_KEY="your-api-key"
export MAURICE_STORAGE="https://storage.maurice.ai"
export MAURICE_DEBUG="true"All commands support these global flags:
--api string API base URL
--storage string Storage base URL
--config string Config file path (default: ~/.maurice/config.yaml)
--debug Enable debug mode with request tracingmaurice chat╔══════════════════════════════════════════════════════════════╗
║ AgentMaurice Interactive Chat ║
╚══════════════════════════════════════════════════════════════╝
Space: research-project
Model: claude-3-5-sonnet-20250929
You: Explain the theory of relativity in simple terms
Maurice: The theory of relativity, developed by Albert Einstein,
consists of two main parts:
1. Special Relativity (1905):
- Time and space are relative, not absolute
- The speed of light is constant for all observers
- Time dilates and length contracts at high speeds
2. General Relativity (1915):
- Gravity is not a force, but curvature of spacetime
- Massive objects bend the fabric of spacetime
- This explains planetary orbits and black holes
Key insight: Space and time are intertwined as "spacetime,"
and this fabric can be warped by mass and energy.
You: /export relativity-explanation.md
✓ Conversation exported to relativity-explanation.md
Create a file questions.txt:
What is machine learning?
Explain neural networks.
What are the applications of AI in healthcare?
Run batch processing:
maurice chat --batch questions.txt --export answers.json# Upload quarterly reports
maurice files upload Q1-report.pdf Q2-report.pdf Q3-report.pdf --space finance
# Analyze them
maurice analyze Q1-report.pdf Q2-report.pdf Q3-report.pdf \
--prompt "Compare revenue trends across quarters and identify growth opportunities" \
--output analysis-report.mdCreate a script daily-report.sh:
#!/bin/bash
DATE=$(date +%Y-%m-%d)
# Create task for daily analysis
maurice tasks create \
--name "Daily Analytics Report - $DATE" \
--description "Analyze yesterday's data and generate insights" \
--space analytics
# Export task results when complete
sleep 60 # Wait for task completion
maurice tasks status <task-id> --output "reports/daily-$DATE.json"# Work in development space
maurice use space dev-workspace
maurice chat send "Test the new feature"
maurice files upload test-results.csv
# Switch to production
maurice use space production
maurice chat send "Deploy version 2.0"
maurice tasks list --status running# .gitlab-ci.yml
test_with_maurice:
script:
- export MAURICE_API_KEY="${CI_MAURICE_API_KEY}"
- maurice login --api https://api.maurice.ai
- maurice files upload test-results.xml coverage-report.html
- maurice chat send "Analyze test results and suggest improvements" --export analysis.txt
- cat analysis.txtMost commands support --output json for machine-readable output:
# Get spaces as JSON
maurice spaces list --output json | jq '.[] | select(.name | contains("prod"))'
# Get file list as JSON
maurice files list --output json | jq '.[].id'
# Export chat to JSON
maurice chat send "Analyze this data" --export - | jq '.messages'MauriceCLI uses standard exit codes:
0- Success1- General error2- Authentication error3- API error4- File not found
Use in scripts:
if maurice ping; then
echo "API is healthy"
maurice chat send "Run daily tasks"
else
echo "API is down, sending alert..."
send_alert
fi# Development
export MAURICE_API="http://localhost:5000"
export MAURICE_DEBUG="true"
maurice chat send "Test feature"
# Production
export MAURICE_API="https://api.maurice.ai"
export MAURICE_DEBUG="false"
maurice chat send "Process production data"# Test API connectivity
maurice ping
# Enable debug mode
maurice --debug ping
# Test with verbose output
maurice test --verbose# Check authentication status
maurice whoami
# Re-authenticate
maurice login --api https://api.maurice.ai
# Clear cached credentials
rm ~/.maurice/config.yaml
maurice login# Check file size (max 100MB typically)
ls -lh large-file.pdf
# Upload with debug output
maurice --debug files upload large-file.pdf
# Check storage server connectivity
maurice --storage https://storage.maurice.ai test"Authentication failed: invalid API key"
# Verify API key
maurice whoami
# Re-login with correct key
maurice login"Space not found"
# List available spaces
maurice spaces list
# Use correct space ID
maurice use space <correct-space-id>"Rate limit exceeded"
# Wait before retrying (typically 60 seconds)
# Or upgrade your plan for higher rate limitsCreate prompt templates in ~/.maurice/prompts/:
# ~/.maurice/prompts/code-review.yaml
name: "Code Review"
prompt: |
Review the following code for:
1. Security vulnerabilities
2. Performance issues
3. Code style and best practices
4. Potential bugs
Code:
{{content}}Use:
maurice analyze src/app.py --prompt-template code-review# Use with pipes
cat data.csv | maurice chat send "Analyze this data" --stdin
# Process output
maurice chat send "Generate test data" | jq '.response' > test-data.json
# Chain commands
maurice files list --output json | \
jq -r '.[].id' | \
xargs -I {} maurice files download {}# Watch task until completion
maurice tasks status <task-id> --watch
# Auto-refresh chat
maurice chat --watch --space monitoring-
Protect API Keys: Never commit API keys to version control
# Use environment variables export MAURICE_API_KEY="$(cat ~/.maurice/api-key.secret)"
-
Use Read-only Keys: Create separate API keys with limited permissions for automation
# Create read-only key in dashboard for CI/CD -
Enable Debug Only When Needed: Debug mode logs requests/responses
# Production: disable debug maurice --debug=false chat send "sensitive data"
-
Audit Logs: Review command history regularly
history | grep maurice
-
Secure Config File: Set proper permissions
chmod 600 ~/.maurice/config.yaml
-
Batch Operations: Upload multiple files at once
maurice files upload *.pdf # Better than individual uploads
-
Use Filters: Reduce API calls with server-side filtering
maurice files list --space project --type pdf # Faster than client-side filtering -
Persistent Sessions: Reuse spaces and deployments
maurice use space project # All subsequent commands use this space -
Local Caching: Cache file lists locally
maurice files list --output json > files-cache.json
# Check and install explicitly
maurice update check
maurice update install --yes# Generate completion script
maurice completion bash > ~/.maurice/completion.bash
# Add to .bashrc
echo "source ~/.maurice/completion.bash" >> ~/.bashrc
source ~/.bashrc# Generate completion script
maurice completion zsh > ~/.maurice/completion.zsh
# Add to .zshrc
echo "source ~/.maurice/completion.zsh" >> ~/.zshrc
source ~/.zshrcmaurice completion fish > ~/.config/fish/completions/maurice.fishMauriceCLI is part of the AgentMaurice chatserver repository.
To contribute:
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
go test ./mauricecli/... - Submit a pull request
- Documentation: https://docs.agentmaurice.ai
- Issues: https://github.com/agentmaurice/chatserver/issues
- Discussions: https://github.com/agentmaurice/chatserver/discussions
- Discord: https://discord.gg/agentmaurice
Built with:
- Cobra - CLI framework
- Viper - Configuration management
- Bubble Tea - Terminal UI
- LiveKit SDK - Real-time communication
CLI maurice (publication GitHub, binaires sur release-binaries).
Article de référence : wiki/projects/mauricecli.md dans pilote-maurice.
| Tâche | Lire d'abord (dans pilote-maurice) |
|---|---|
| Comprendre le dépôt avant d'éditer | wiki/INDEX.md puis wiki/projects/mauricecli.md |
| Règles d'édition, cycle Plane/Git, gates | wiki/operations/agent-coding-guidelines.md |
| Tests, stabilité, release | wiki/operations/testing.md, wiki/operations/stability-strategy.md, wiki/operations/local-release-gate.md |
| Interface ou parcours utilisateur | wiki/design/interface-principles.md (profil de la surface) |
Aucun fichier de build à la racine : lire le README.md et le pipeline du dépôt ; ne pas inventer de commande.