codeusage-cli
v0.1.37
Published
CLI for Codeusage - AI coding tool intelligence platform
Maintainers
Readme
Codeusage CLI
Track your team's AI coding tool usage with zero friction. Get visibility into how AI coding tools like Claude Code and Codex are used across your organization.
Requirements
- Node.js 18+
- Claude Code or Codex CLI installed
Installation
bun add -g codeusage-cliOr with npm:
npm install -g codeusage-cliQuick Start
Sign up at codeusage.dev to get your workspace API key
Initialize the CLI:
codeusage init- Done! Usage is now tracked automatically when you use an AI coding tool.
Commands
codeusage init
Interactive setup wizard. Configures your API key, developer alias, and installs hooks.
codeusage initcodeusage status
Check your current configuration and connection status.
codeusage statuscodeusage project
Manage project mappings for the current directory.
# Set a custom project name for current directory
codeusage project set my-project
# List all project mappings
codeusage project list
# Ignore current directory (no tracking)
codeusage project ignore
# Re-enable tracking for current directory
codeusage project unignorecodeusage provider
Manage AI coding tool providers.
# List all available providers
codeusage provider list
# Show current provider
codeusage provider current
# Add hooks for an additional provider (keeps existing)
codeusage provider add <provider>
# Switch to a different provider
codeusage provider switch <provider>codeusage guard
Manage Prompt Guard — scans prompts for credentials before sending. Also available as codeusage patterns.
# Enable Prompt Guard
codeusage guard enable
# Disable Prompt Guard
codeusage guard disable
# Show status and cache info
codeusage guard status
# List all active patterns
codeusage guard list
# Sync patterns from workspace settings
codeusage guard sync
# Test a string against patterns
codeusage guard test "my-secret-key-123"codeusage sync
Manually sync the last task (useful for testing).
codeusage synccodeusage config
View or update configuration values.
# View all config
codeusage config
# View specific value
codeusage config get developer_alias
# Set a value
codeusage config set developer_alias "john"codeusage logs
View CLI error and diagnostic logs.
# Show recent errors (default: last 50 lines)
codeusage logs
# Show more lines
codeusage logs -n 100
# Filter by level
codeusage logs --level warn
# Show all log levels
codeusage logs --all
# Print log file path
codeusage logs --path
# Clear all logs
codeusage logs --clearcodeusage logout
Remove all local configuration and uninstall hooks.
codeusage logoutUninstall
bun remove -g codeusage-cliOr with npm:
npm uninstall -g codeusage-cliDocumentation
For full documentation, visit codeusage.dev/docs
License
MIT
