Repository navigation
Add cigen expand: the whole config as one cigen.yml - #17
Merged
Merged
Conversation
This was referenced Dec 4, 2026
ndbroadbent
force-pushed
the
tools/explain
branch
3 times, most recently
from
December 4, 2026 03:20
e430612 to
348aa75
Compare
ndbroadbent
force-pushed
the
tools/expand
branch
2 times, most recently
from
December 4, 2026 03:48
1194876 to
0bcd6a4
Compare
cigen expand [--config <path>] [--format yaml|json] checks the config and prints the document the loader builds: a .cigen/ directory's files merged into one cigen.yml. tests/expand.rs expands every config in the repo and checks the output loads to the same config and expands to itself.
The CLI page documents cigen expand: its options, the output for an example .cigen/ directory, and what it keeps and doesn't. The overview, roadmap and homepage list it as built.
ndbroadbent
force-pushed
the
tools/expand
branch
from
December 4, 2026 03:59
0bcd6a4 to
c12bc00
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.
Item 4 of the agent-tools work. Stacked on #14, which is stacked on #13. The base is
tools/explain.What changed
cigen expand [--config <path>] [--format yaml|json]checks the config, then prints the document the loader builds: a.cigen/directory's files merged into onecigen.yml, in the loader's order (config.yml, thenconfig/*.yml, commands, workflows and jobs). An invalid config prints its errors instead, through the shared printer, and exits 1.config::expand(path)returns that document.loadandexpandshare onereadthat refuses a project with both layouts.CigenConfig, so the output is what the user wrote: no defaults filled in, and provider blocks untouched. That's what's useful for moving between layouts, and it's what the loader sees. Comments are lost; the--formathelp says so.serde_json's map is ordered.The direction doc also mentions
cigen expand <job>. The brief asked for the whole config, so I left out a job argument. It would be easy to add if you want it.Tests
tests/expand.rs, for cigen's own.cigen/and every fixture:cigen.ymlloads to aCigenConfigequal to the directory's;task cipasses with no warnings.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.