NEVER execute these without asking the user first:
rm -rf- Recursive directory deletionrmwith multiple files or wildcardsmvthat overwrites existing filessed -i- In-place file editing- ANY command that deletes or modifies multiple files
SAFE OPERATIONS (no approval needed):
mcp__acp__Read- Read filesmcp__acp__Write- Write individual files (with safety checks)mcp__acp__Edit- Edit individual files (exact string replacement)Bashfor read-only operations (ls, find, grep)
WORKFLOW FOR DESTRUCTIVE OPERATIONS:
- Describe what you want to do and why
- Show the exact command you would run
- ASK: "Should I run this command?"
- Wait for explicit approval
- ONLY then execute if approved
Example: "I need to remove the old onboarding orchestrator files. I would run:
rm internal/tui/pages/onboarding/onboarding.go internal/tui/pages/onboarding/messages.go
Should I run this command?"
This is non-negotiable. Violating this rule wastes hours of work.
Tero is a control plane for observability. It sits on top of your existing tools (Datadog, Splunk, CloudWatch, etc.), understands what your telemetry means semantically, and helps you improve it—identify waste, take action, reduce cost.
The CLI is how users interact with Tero. It's a presentation layer that makes the control plane's intelligence accessible through multiple interfaces—an interactive TUI for conversational exploration, an MCP server for coding agents, and eventually traditional commands for scripting and automation.
This guide helps you get set up and productive working on the CLI.
The project uses Hermit for toolchain dependencies. When you enter the directory, Hermit automatically activates the right versions of Go, Node, and other tools.
If you don't have Hermit installed, ensure you have:
- Go 1.21+
- Node.js (for GraphQL schema fetching)
git clone https://github.com/usetero/cli
cd cli
task buildThis builds the tero binary to bin/tero.
task runThis runs the CLI directly without building a binary first—useful for fast iteration during development.
task build - Build the CLI binary
task run - Run without building (fast iteration)
task test - Run tests
task do - Format, lint, and test (run this before committing)
task client:generate - Regenerate GraphQL client from control plane schema
task dev - Generate client + build (full dev cycle)
Working on a feature:
# Make your changes
task run # Test them
task test # Make sure tests pass
task do # Format, lint, test before committingWhen the control plane GraphQL schema changes:
# 1. Make sure control plane is running at localhost:8081
# 2. Regenerate the GraphQL client
task client:generate
# 3. Build and test
task devBefore submitting a PR:
task do # This formats, lints, and testscmd/tero/ # Entry point, Cobra commands
internal/
tui/ # All TUI code
page/ # Pages (onboarding, chat)
components/ # Reusable components
client/ # Generated GraphQL client (never edit directly)
auth/ # WorkOS authentication
mcp/ # MCP server implementation
config/ # CLI configuration
docs/ # Architecture and design documentation
The code is the source of truth for implementation patterns. The architecture docs explain how everything fits together and why we make the decisions we do.
Read these to understand the architecture:
-
docs/ARCHITECTURE.md - How the CLI is architected, how it communicates with the control plane, key architectural principles
-
docs/DESIGN.md - Design philosophy, UX principles, who we're building for and why
-
docs/TUI.md - TUI-specific architecture, component patterns, layout management
These docs build your mental model. The code shows you the patterns in practice. Look at existing pages, components, and features to see how things are done.
Run task do before committing. This formats your code, runs the linter, and runs tests. If task do passes, you're good.
The codebase has established patterns for components, pages, layout, state management, and more. Look at how existing code works and follow those patterns. The architecture docs explain the principles behind these patterns.
These are architectural fundamentals—read the architecture docs for details:
- CLI is presentation only - Never implement intelligence in the CLI. That belongs in the control plane.
- Control plane is source of truth - The CLI caches for performance but the control plane owns all data.
- Components render, pages decide - Clear separation of concerns.
- GraphQL for all communication - Generated client, never edited manually.
- Keep PRs focused on one thing
- Make sure
task dopasses - Include tests for new functionality
- Reference the architecture docs if you're establishing new patterns
- Issues: https://github.com/usetero/cli/issues
- Questions: https://github.com/usetero/cli/discussions
- Architecture questions: Read the docs in
docs/first, then ask in discussions
Thanks for contributing to Tero!