@timbrify/cli
____ _ _ _
| _ \| | | | | |
| |_) | | __ _| | _____ __| | ___ _ __
| _ <| |/ _` | |/ / _ \ / _` |/ _ \ '__|
| |_) | | (_| | < (_) | (_| | __/ |
|____/|_|\__,_|_|\_\___/ \__,_|\___|_|
Official CLI tool for the Timbrify API.
Installation
npm install -g @timbrify/cli
pnpm add -g @timbrify/cli
Quick Start
timbrify login
timbrify organizations list
timbrify webhooks create --org <organization-id>
timbrify logout
Authentication
Login
timbrify login
timbrify login --email user@example.com
Credentials are saved to ~/.timbrify/config.json
Logout
timbrify logout
Commands
Organizations
timbrify organizations list
timbrify organizations get <slug>
timbrify organizations create
timbrify organizations create --name "Acme Corp" --slug acme-corp
timbrify organizations delete <slug>
timbrify organizations delete <slug> --force
Webhooks
timbrify webhooks list --org <organization-id>
timbrify webhooks get <webhook-id> --org <organization-id>
timbrify webhooks create --org <organization-id>
timbrify webhooks create --org <organization-id> --url https://example.com/webhook
timbrify webhooks delete <webhook-id> --org <organization-id>
timbrify webhooks delete <webhook-id> --org <organization-id> --force
API Keys
timbrify api-keys list --org <organization-id>
timbrify api-keys get <api-key-id> --org <organization-id>
timbrify api-keys create --org <organization-id>
timbrify api-keys create --org <organization-id> --name "Production Key"
timbrify api-keys create --org <organization-id> --name "Staging Key" --expires 2025-12-31T23:59:59Z
timbrify api-keys delete <api-key-id> --org <organization-id>
timbrify api-keys delete <api-key-id> --org <organization-id> --force
Global Commands
timbrify --help
timbrify <command> --help
timbrify --version
timbrify update
Examples
Complete Workflow
timbrify login
timbrify organizations create --name "My Company" --slug my-company
timbrify organizations get my-company
timbrify webhooks create --org <org-id> --url https://api.mycompany.com/webhooks
timbrify api-keys create --org <org-id> --name "Production API Key"
timbrify organizations list
timbrify webhooks list --org <org-id>
timbrify api-keys list --org <org-id>
Using in CI/CD
export TIMBRIFY_TOKEN="your-token"
echo "password" | timbrify login --email ci@example.com
timbrify api-keys create --org $ORG_ID --name "CI/CD Key"
Configuration
Configuration is stored in ~/.timbrify/config.json:
{
"bearerToken": "eyJhbGc...",
"email": "user@example.com",
"baseUrl": "http://localhost:3001/api"
}
To use a different API URL:
timbrify login --base-url https://api.timbrify.com
Theme Customization
The CLI comes with a modern color theme. Users can customize it by creating a theme.json file in ~/.timbrify/:
{
"bin": "cyan",
"command": "greenBright",
"flag": "blueBright",
"flagRequired": "redBright"
}
To disable the theme:
TIMBRIFY_DISABLE_THEME=1 timbrify --help
Update Notifications
The CLI automatically checks for updates once per week and notifies you when a new version is available.
Update manually:
timbrify update
Disable notifications:
NO_UPDATE_NOTIFIER=1 timbrify login
Features
🎨 Modern UI
- ASCII Logo: Beautiful Timbrify logo displayed on help and login commands
- Custom Theme: Vibrant color scheme with cyan, green, and blue highlights
- Syntax Highlighting: Color-coded JSON output for better readability
🔔 Update Notifications
The CLI automatically checks for new versions once per week and notifies you when an update is available. Checks are non-blocking and respect CI environments.
🛠️ Built with
- oclif: Modern CLI framework
- TypeScript: Type-safe development
- chalk: Terminal colors
- inquirer: Interactive prompts
- ora: Elegant spinners
- cli-table3: Beautiful tables
Architecture
src/
├── commands/ # CLI commands
│ ├── login.ts # Authentication
│ ├── logout.ts
│ ├── organizations/ # Organization management
│ ├── webhooks/ # Webhook management
│ └── api-keys/ # API key management
├── config/
│ └── auth.ts # Auth configuration manager
├── utils/
│ ├── logo.ts # ASCII logo
│ ├── table.ts # Table formatting
│ ├── client.ts # API client
│ └── update-notifier.ts
├── hooks/
│ └── init/
│ └── update-check.ts # Update check hook
└── help.ts # Custom help class
Development
pnpm install
pnpm build
pnpm dev
pnpm link --global
pnpm check-types
pnpm lint
Troubleshooting
Authentication Error
Error: Not authenticated. Please run 'timbrify login' first.
Solution: Run timbrify login to authenticate.
API Connection Error
Failed to fetch organizations: connect ECONNREFUSED
Solution: Check that your API is running and the base URL is correct.
Invalid Token
Authentication failed: 401 Unauthorized
Solution: Your token may have expired. Run timbrify logout then timbrify login again.
License
MIT