The Yertle CLI is a Go command-line client for exploring the Yertle platform. It gives engineers and AI agents a navigable view of software systems built around organizations, nodes, containment hierarchies, connections, tags, and directories.
This repository is the CLI implementation. It is intentionally thin: Cobra handles command routing, a small API client talks to the backend over HTTP, and commands render either scriptable output (table, json, csv) or terminal-native views such as the ASCII tree and canvas.
brew tap model-context/yertle
brew install yertleImplemented today:
authandauth loginfor API authenticationconfigfor showing active CLI configurationorgsfor listing organizations or inspecting one orgnodesfor listing nodes or inspecting one node in detailtreefor rendering containment hierarchiescanvasfor rendering an ASCII architecture sketch from child-node layout dataaboutfor product and workflow context
Planned but not implemented:
monitorcurrently prints a placeholder messagetui/treeis a stub for a future interactive view
The module currently targets Go 1.26.1 in go.mod.
go build -o yertle .For local runs inside restricted environments, it can help to override GOCACHE:
GOCACHE=/tmp/yertle-go-cache go run . --helpThe CLI reads and writes local state under ~/.yertle/.
- Config file:
~/.yertle/config.json - Short-ID cache:
~/.yertle/id-cache.json
Config behavior from the current code:
- Default API URL is
http://localhost:8000 YERTLE_API_URLoverrides the config value--api-urloverrides both config and environmentYERTLE_ORGsets the default org scope for a command--orgoverridesYERTLE_ORG
Authentication data is stored in the config file after yertle auth login. The CLI also supports automatic access-token refresh when a refresh token is present.
- Authenticate:
yertle auth login- Confirm the active target:
yertle auth status
yertle config- Populate the short-ID cache and inspect the model:
yertle orgs
yertle tree
yertle nodes- Drill into a specific object:
yertle orgs <org-id>
yertle nodes <node-id>
yertle canvas <node-id>Short IDs are the first 8 characters of an ID with dashes removed. Commands such as tree, orgs, and nodes populate the cache so later commands can resolve short IDs back to full IDs.
Static commands support:
--format table--format json--format csv
Examples:
yertle orgs --format json
yertle nodes --org <org-id> --format csv
yertle tree --format jsoncanvas and the default tree view are optimized for terminal reading. canvas --format json falls back to raw API data.
- With no argument, lists organizations available to the authenticated user
- With one argument, shows details for a specific organization
- Successful list calls populate the org portion of the short-ID cache
- With no argument, pages through all nodes for the active org scope
- With one argument, fetches the node's complete view, including parents, children, connections, tags, directories, ingress, and egress
- Node detail lookup needs an org. If you do not pass
--org, the CLI tries to recover the org from the local short-ID cache
- Defaults to all orgs when no org scope is set
- Groups hierarchy output by organization when multiple orgs are returned
- Uses box-drawing characters and right-aligned short IDs for scanability
- Fetches the same complete node payload used by
nodes show - Uses
visual_properties.position_xandposition_yto place child nodes onto a coarse terminal grid - Draws only simple adjacent horizontal and vertical connections directly; other edges are listed underneath the diagram
- main.go: program entrypoint
- cmd/: Cobra commands and presentation logic
- api/: HTTP client and response types
- config/: config loading, saving, env/flag resolution, ID cache
- output/: shared renderers for table, JSON, and CSV output
- tui/: placeholder location for future interactive UIs
- docs/: design, roadmap, demo, review, and architecture notes
Releases are automated with GoReleaser. A release cross-compiles for macOS, Linux, and Windows, uploads binaries to GitHub Releases, and pushes an updated Homebrew formula to model-context/homebrew-yertle.
# Commit all changes first — GoReleaser requires a clean git state
git add -A && git commit -m "prepare v0.1.0"
# Tag the release
git tag v0.1.0
git push origin v0.1.0
# Publish (requires GITHUB_TOKEN with repo scope)
export GITHUB_TOKEN=<your-token>
make releaseIf you need to redo a tag (e.g., you tagged before committing):
# Delete the tag locally and on the remote
git tag -d v0.1.0
git push origin --delete v0.1.0
# Re-tag and push
git tag v0.1.0
git push origin v0.1.0To test the release process locally without publishing:
make release-dry-runSee docs/PACKAGING.md for details on cross-platform distribution.