CLI Reference
The cstar CLI is a developer tool for local webhook testing, log streaming, API key management,
and AI agent integration via MCP server mode.
Installation
npm install -g @cstar.help/cli
# or run without installing
npx @cstar.help/cli <command>
Authentication
# Login with your API key
cstar login --api-key sk_test_your_key_here
# Check current status
cstar status
# Logout
cstar logout
Credentials are stored at ~/.cstar/config.json with 0600 permissions.
Global Flags
--json Structured JSON output (stdout=data, stderr=status)--api-key <key> Override stored API key for this command--base-url <url> Override API URL (default: https://app.cstar.help)--no-color Disable colored outputCommands
cstar login
Validate and store API key credentials.
cstar login --api-key sk_test_your_key_here
cstar logout
Remove stored credentials.
cstar logout
cstar status
Show current team, environment, key type, and rate limit info.
cstar status
cstar status --json
cstar events
List available webhook event types. Filter by category.
cstar events
cstar events --category tickets
cstar events --category gamification --json
cstar keys
Manage API keys for your team.
# List all keys
cstar keys list
cstar keys list --environment live
# Create a new key
cstar keys create --name "Production" --type secret --environment live
# Revoke a key
cstar keys revoke key_id_here
cstar listen
Forward webhook events to a local URL. Perfect for development.
# Forward to default (localhost:3000/api/webhooks)
cstar listen
# Forward to a custom URL
cstar listen --forward-to http://localhost:8080/webhook
# Filter to specific events
cstar listen --events ticket.created,ticket.closed
cstar trigger
Fire a test webhook event to all active webhooks and CLI listeners.
cstar trigger ticket.created
cstar trigger boss.spawned --json
cstar logs
View API request logs for your team.
# Recent logs (last hour, 20 results)
cstar logs
# Filter logs
cstar logs --method POST --status 4xx --since 24h
# Real-time streaming
cstar logs --tail
cstar mcp-server
Run as an MCP (Model Context Protocol) server for AI agents like Claude Code. Uses JSON-RPC over stdin/stdout.
cstar mcp-server --stdio
MCP Server Configuration
Add to your Claude Code or MCP-compatible AI configuration.
{
"mcpServers": {
"cstar": {
"command": "npx",
"args": ["@cstar.help/cli", "mcp-server", "--stdio"]
}
}
}
Available MCP Tools
cstar_list_tickets List tickets with filters (status, priority, search)cstar_get_ticket Get ticket by ID with messagescstar_create_ticket Create a new support ticketcstar_list_customers List customers with optional searchcstar_get_customer Get customer by IDcstar_list_articles List knowledge base articlescstar_trigger_webhook Fire a test webhook eventcstar_get_status Get auth status and team infocstar_list_events List available webhook event typesJSON Output
All commands support --json for structured output.
{ "success": true, "data": { ... } }
{
"success": false,
"error": {
"code": "not_found",
"message": "Resource not found",
"suggestion": "Check the ID and try again"
}
}
Exit Codes
0 Success1 Error (API error, auth failure, etc.)2 Usage error (missing required arguments)