@clawtree/cli
v0.1.0
Published
ClawTree CLI - Manage your ClawTree bots from the command line
Readme
@clawtree/cli
Command-line interface for managing ClawTree bots.
Installation
npm install -g @clawtree/cli
# or
bun add -g @clawtree/cliCommands
ct auth <api-key>
Non-interactive authentication for CI/CD environments:
ct auth ct_your_api_key_hereThe API key must start with ct_. This command is ideal for automated environments where browser-based login isn't possible.
ct login
Interactive browser-based authentication:
ct loginThis opens your browser to authenticate with ClawTree. Once authenticated, your API key is stored locally.
ct whoami
Show current authentication status:
ct whoami
# Output:
# 🤖 Bot Info:
# Name: my-smart-assistant
# ID: bot_abc123
# Created: 2024-01-15T10:30:00.000Zct logout
Clear stored credentials:
ct logoutThis removes the config file at ~/.clawtree/config.json.
Configuration
Credentials are stored in ~/.clawtree/config.json:
{
"apiKey": "ct_abc123...",
"defaultBot": "my-smart-assistant"
}Environment Variables
CLAWTREE_API_URL: Override the API endpoint (default:https://api.clawtree.link)
Development
# Install dependencies
bun install
# Build
bun run build
# Run locally
bun run src/cli.ts whoami
# Run tests
bun testLicense
MIT
