Implement Phase 9: CLI and developer experience - #11
Merged
Merged
Conversation
Add a proper CLI with subcommand dispatch (version, init, list, run,
trace, cost) replacing the single-line stub. YAML-based project
configuration via gopkg.in/yaml.v3 with env var substitution
(${VAR}, ${VAR:-default}). Project scaffolding templates for single
agent, team, and pipeline patterns. Run record persistence under
.gogrid/runs/ for trace and cost inspection. Version injection via
-ldflags at build time.
New packages: internal/config, internal/runrecord, internal/cli,
internal/cli/templates. Only new external dependency: yaml.v3.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add docs/cli.md with full CLI reference covering all commands, config schema, environment variables, run records, and supported models. Add examples/cli-quickstart/ with a multi-agent gogrid.yaml demonstrating three agents across two providers with env var overrides. Update README.md with Quick Start section, CLI overview with config and trace/cost examples, and links to new docs and examples.
- Add 4 new docs sections: CLI, Configuration (YAML), CLI Commands, Run Records - Add 3 new examples: CLI Multi-Agent Project, Trace & Cost Inspection, Project Scaffolding - Update project structure in Getting Started to include internal/cli/ and internal/config/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
version,init,list,run,trace,cost) using stdlibflag— no external CLI frameworkinternal/config/) with env var substitution (${VAR},${VAR:-default}) viagopkg.in/yaml.v3(only new dependency)internal/runrecord/) saving results to.gogrid/runs/<run-id>.jsonfor trace and cost inspectiongogrid init-ldflags -Xin the Makefile build targetTest plan
make build && bin/gogrid versionprints version infobin/gogrid init --template single /tmp/test-projectscaffolds a valid projectbin/gogrid listprints agents from a gogrid.yamlbin/gogrid run <agent> -input "hello"executes and saves run record (requires API key)bin/gogrid trace <run-id>renders span treebin/gogrid cost <run-id>renders cost breakdowngo test -race ./...— all tests pass (30 new + all existing Phase 0-7 tests)golangci-lint run ./...— clean