feat(cli): project + env authoring & use picker (spec 30 phase 3) - #120
Merged
Conversation
The authoring surface of the interactive-DX lane. - `use` (bare, TTY) opens a huh fuzzy project picker; non-TTY falls back to the printed hint. - `project list` / `project new <name>` — list projects; scaffold a devstack.yaml and register it in workspace.yaml via a comment-preserving AST merge. - `env list` / `env set KEY=VALUE ...` / `env unset KEY ...` — view and edit a service's local env.raw. Edits reuse internal/envingest's AST rewriter, so comments and key order survive (the [Q-YAML-ROUNDTRIP] answer); files are backed up before write. secret:// values pass straight through. - internal/envingest: exported SetEnv / ReplaceEnvBlock / AppendProjectRef. Tests: envingest edits preserve comments / create blocks / append project refs; command registration. make ci + determinism green. Verified end-to-end: env set keeps `# comments`, project new preserves workspace.yaml comments. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gustavobertoi
force-pushed
the
feat/authoring-tuis
branch
from
July 2, 2026 01:57
643e293 to
1b86f59
Compare
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
The authoring surface of spec 30 — projects, env vars, and a fuzzy
usepicker. Editing is comment-preserving (the [Q-YAML-ROUNDTRIP] answer), reusing the AST rewriter fromsecrets ingest.What's in
use(bare, on a TTY) → a huh fuzzy project picker; non-TTY falls back to the printed hint.project list/project new <name>— list projects; scaffold adevstack.yamland register it inworkspace.yamlvia a comment-preserving AST merge (--path,--template,--uses,--git).env list/env set KEY=VALUE .../env unset KEY ...— view/edit a service's localenv.raw. Edits go throughinternal/envingest's AST rewriter, so comments and key order survive; the file is backed up before write.secret://values pass straight through.internal/envingest: exportedSetEnv/ReplaceEnvBlock/AppendProjectRef.Verified end-to-end
env set LOG_LEVEL=debugon adevstack.yamlkeeps# dev serverandAPP_ENV: dev # keep meintact and adds the key;project new workerpreserves the# projects belowcomment inworkspace.yaml.Tests / gates
internal/envingest/edit_test.go(comment preservation, block creation, project append) + command registration.make ci(fmt/vet/build/test-race) +make determinismgreen.This completes spec 30. Together with #118/#119 (spec 31), the RFC lane is implemented across stacked PRs.
🤖 Generated with Claude Code