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 logoutCredentials 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://www.cstar.help)--no-color Disable colored outputCommands
cstar login
Validate and store API key credentials.
cstar login --api-key sk_test_your_key_herecstar logout
Remove stored credentials.
cstar logoutcstar status
Show current team, environment, key type, and rate limit info.
cstar status
cstar status --jsoncstar events
List available webhook event types. Filter by category.
cstar events
cstar events --category tickets
cstar events --category gamification --jsoncstar 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_herecstar 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.closedcstar trigger
Fire a test webhook event to all active webhooks and CLI listeners.
cstar trigger ticket.created
cstar trigger boss.spawned --jsoncstar 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 --tailcstar members
List and inspect team members.
cstar members list
cstar members list --role agent
cstar members get mem_abc123cstar analytics
View team analytics overview with ticket, customer, and CSAT metrics.
cstar analytics
cstar analytics --period month
cstar analytics --jsoncstar search
Search across tickets, customers, and articles.
cstar search "billing issue"
cstar search "login" --types tickets,customers
cstar search "password" --limit 5cstar game
View game system data — boss battles, leaderboards, achievements, quests, and player stats.
cstar game boss status
cstar game leaderboard --period weekly
cstar game achievements --user-id usr_abc --unlocked
cstar game quests --user-id usr_abc
cstar game player --user-id usr_abccstar 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 --stdioMCP 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 typescstar_list_members List team members with roles and levelscstar_search Search across tickets, customers, and articlescstar_analytics Get team analytics overviewcstar_boss_status Get current boss battle statecstar_leaderboard Get team leaderboard rankingscstar_player_stats Get player stats (level, XP, streak)JSON 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)Community Commands
Manage community posts and topics from the command line.
List Posts
# List all community posts
cstar community list
# Filter by topic, status, or sort order
cstar community list --topic topic_abc --status open --sort votes
# JSON output for scripting
cstar community list --jsonGet Post
# Get a single post by ID
cstar community get post_abc123List Topics
cstar community topicsCreate Post
cstar community create \
--title "Tutorial Video" \
--topic-id topic_abc \
--body "Check out this walkthrough" \
--custom-fields '{"video_url": "https://youtube.com/watch?v=abc"}'MCP Tools
The following community tools are available in MCP server mode:
cstar_list_community_posts List/filter community postscstar_get_community_post Get a single post by IDcstar_list_community_topics List discussion topicscstar_create_community_post Create a new post