@sous-io/sous 0.2.37 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -256
- package/dist/bin.js +11 -0
- package/dist/sous.js +1093 -0
- package/docs/markdown/README.md +5 -4
- package/docs/markdown/_sidebar.md +21 -1
- package/docs/markdown/commands.md +294 -431
- package/docs/markdown/config-discovery.md +25 -14
- package/docs/markdown/config-inspection.md +53 -31
- package/docs/markdown/config-layers.md +168 -66
- package/docs/markdown/config-variables.md +44 -11
- package/docs/markdown/configuration.md +104 -17
- package/docs/markdown/design-principles.md +4 -1
- package/docs/markdown/repositories-authoring.md +30 -0
- package/docs/markdown/repositories-consuming.md +72 -14
- package/docs/markdown/repositories-file-formats.md +31 -13
- package/docs/markdown/repositories-providers.md +48 -57
- package/docs/markdown/repositories-quickstart.md +3 -2
- package/docs/markdown/repositories-troubleshooting.md +27 -1
- package/docs/markdown/repositories-variables.md +6 -1
- package/docs/markdown/repositories.md +18 -8
- package/package.json +48 -107
- package/recipes/core/sous-skills/skills/about-liquid-templates/SKILL.tpl.md +4 -6
- package/recipes/core/sous-skills/skills/about-liquid-templates/references/liquid-filters.tpl.md +2 -0
- package/recipes/core/sous-skills/skills/about-sous/SKILL.tpl.md +10 -9
- package/recipes/core/sous-skills/skills/about-sous-configuration/SKILL.tpl.md +35 -14
- package/recipes/core/sous-skills/skills/about-sous-recipes/SKILL.tpl.md +51 -20
- package/recipes/core/sous-skills/sous.recipe.yaml +1 -1
- package/sous.config.schema.json +351 -132
- package/bin/run.js +0 -51
- package/src/base-command.ts +0 -457
- package/src/commands/build.ts +0 -181
- package/src/commands/clear.ts +0 -79
- package/src/commands/compile.ts +0 -155
- package/src/commands/config/get.ts +0 -110
- package/src/commands/config/show.ts +0 -32
- package/src/commands/config/validate.ts +0 -53
- package/src/commands/help.ts +0 -46
- package/src/commands/init.ts +0 -289
- package/src/commands/launch.ts +0 -139
- package/src/commands/lock/rebuild.ts +0 -239
- package/src/commands/lock/show.ts +0 -115
- package/src/commands/namespace/list.ts +0 -138
- package/src/commands/namespace/show.ts +0 -130
- package/src/commands/prune.ts +0 -43
- package/src/commands/recipe/list.ts +0 -112
- package/src/commands/recipe/show.ts +0 -439
- package/src/commands/repo/add.ts +0 -145
- package/src/commands/repo/contribute.ts +0 -604
- package/src/commands/repo/gc.ts +0 -173
- package/src/commands/repo/init.ts +0 -136
- package/src/commands/repo/link.ts +0 -899
- package/src/commands/repo/list.ts +0 -236
- package/src/commands/repo/release.ts +0 -685
- package/src/commands/repo/remove.ts +0 -194
- package/src/commands/repo/search.ts +0 -243
- package/src/commands/repo/submit.ts +0 -341
- package/src/commands/repo/unlink.ts +0 -461
- package/src/commands/subscription/add.ts +0 -286
- package/src/commands/subscription/list.ts +0 -208
- package/src/commands/subscription/remove.ts +0 -182
- package/src/commands/subscription/update.ts +0 -216
- package/src/commands/update.ts +0 -178
- package/src/commands/vars/ask.ts +0 -417
- package/src/commands/vars/index.ts +0 -79
- package/src/commands/vars/list.ts +0 -67
- package/src/commands/vars/show.ts +0 -77
- package/src/config-command.ts +0 -30
- package/src/lib/build-preparation.ts +0 -128
- package/src/lib/build-service.ts +0 -580
- package/src/lib/config-discovery.ts +0 -378
- package/src/lib/config-inspect.ts +0 -145
- package/src/lib/config-kernel.mjs +0 -379
- package/src/lib/config-schema.ts +0 -401
- package/src/lib/env-file.ts +0 -328
- package/src/lib/env-local.ts +0 -212
- package/src/lib/errors.ts +0 -32
- package/src/lib/glob-pattern.ts +0 -24
- package/src/lib/include-resolver.ts +0 -523
- package/src/lib/interactive.ts +0 -165
- package/src/lib/markdown-compiler.ts +0 -947
- package/src/lib/package-info.ts +0 -25
- package/src/lib/pid-service.ts +0 -99
- package/src/lib/project-install.d.mts +0 -44
- package/src/lib/project-install.mjs +0 -234
- package/src/lib/project-scaffold/index.ts +0 -332
- package/src/lib/project-scaffold/templates.ts +0 -240
- package/src/lib/repos/catalog-display.ts +0 -215
- package/src/lib/repos/catalog-inputs.ts +0 -288
- package/src/lib/repos/catalog.ts +0 -842
- package/src/lib/repos/contribute.ts +0 -452
- package/src/lib/repos/core-recipe.ts +0 -105
- package/src/lib/repos/declarations.ts +0 -187
- package/src/lib/repos/defaults.ts +0 -175
- package/src/lib/repos/formats/common.ts +0 -440
- package/src/lib/repos/formats/index-file.ts +0 -253
- package/src/lib/repos/formats/links-map.ts +0 -98
- package/src/lib/repos/formats/lockfile.ts +0 -169
- package/src/lib/repos/formats/patterns.ts +0 -57
- package/src/lib/repos/formats/recipe-manifest.ts +0 -205
- package/src/lib/repos/formats/repo-manifest.ts +0 -97
- package/src/lib/repos/formats/store-entry.ts +0 -84
- package/src/lib/repos/formats/variable-definition.ts +0 -268
- package/src/lib/repos/freshness.ts +0 -264
- package/src/lib/repos/git-clone.ts +0 -850
- package/src/lib/repos/identity.ts +0 -89
- package/src/lib/repos/index.ts +0 -57
- package/src/lib/repos/links.ts +0 -356
- package/src/lib/repos/load-manifest.ts +0 -237
- package/src/lib/repos/lock-service.ts +0 -454
- package/src/lib/repos/locked-namespace-resolver.ts +0 -232
- package/src/lib/repos/locked-recipe-lookup.ts +0 -123
- package/src/lib/repos/locked-recipes.ts +0 -254
- package/src/lib/repos/managed-layer.ts +0 -422
- package/src/lib/repos/memories-hash-name.ts +0 -33
- package/src/lib/repos/namespace-resolver.ts +0 -527
- package/src/lib/repos/providers/base.ts +0 -268
- package/src/lib/repos/providers/git.ts +0 -245
- package/src/lib/repos/providers/github.ts +0 -589
- package/src/lib/repos/providers/gitlab.ts +0 -332
- package/src/lib/repos/providers/http.ts +0 -128
- package/src/lib/repos/providers/index-cache.ts +0 -421
- package/src/lib/repos/providers/index.ts +0 -106
- package/src/lib/repos/providers/local.ts +0 -410
- package/src/lib/repos/providers/provider.ts +0 -615
- package/src/lib/repos/recipe-config-layers.ts +0 -316
- package/src/lib/repos/recipe-key-matcher.ts +0 -62
- package/src/lib/repos/recipe-memories.ts +0 -178
- package/src/lib/repos/recipe-targets.ts +0 -236
- package/src/lib/repos/ref-search.ts +0 -46
- package/src/lib/repos/release/bump.ts +0 -161
- package/src/lib/repos/release/changelog.ts +0 -461
- package/src/lib/repos/release/git-state.ts +0 -460
- package/src/lib/repos/release/index-builder.ts +0 -1108
- package/src/lib/repos/release/index.ts +0 -19
- package/src/lib/repos/release/plan.ts +0 -521
- package/src/lib/repos/release/settle.ts +0 -154
- package/src/lib/repos/release/submissions.ts +0 -214
- package/src/lib/repos/release/submit-checkout.ts +0 -290
- package/src/lib/repos/release/submit-questions.ts +0 -153
- package/src/lib/repos/release/submit-service.ts +0 -898
- package/src/lib/repos/release/tags.ts +0 -239
- package/src/lib/repos/release/validate.ts +0 -463
- package/src/lib/repos/resolver.ts +0 -1028
- package/src/lib/repos/scaffold/index.ts +0 -245
- package/src/lib/repos/scaffold/templates.ts +0 -517
- package/src/lib/repos/seed.ts +0 -473
- package/src/lib/repos/store/contract.ts +0 -64
- package/src/lib/repos/store/hash.ts +0 -191
- package/src/lib/repos/store/recipe-store.ts +0 -599
- package/src/lib/repos/store/settings.ts +0 -58
- package/src/lib/repos/subscription-service.ts +0 -3859
- package/src/lib/repos/trust.ts +0 -447
- package/src/lib/repos/update-plan.ts +0 -235
- package/src/lib/self-update/index.ts +0 -14
- package/src/lib/self-update/installs.ts +0 -413
- package/src/lib/self-update/managers.ts +0 -126
- package/src/lib/self-update/plan.ts +0 -315
- package/src/lib/self-update/registry.ts +0 -99
- package/src/lib/self-update/run.ts +0 -506
- package/src/lib/self-update/versions.ts +0 -243
- package/src/lib/settings.ts +0 -1107
- package/src/lib/sous-home.ts +0 -104
- package/src/lib/state.ts +0 -167
- package/src/lib/vars/answers.ts +0 -192
- package/src/lib/vars/ask.ts +0 -1152
- package/src/lib/vars/definition-source.ts +0 -261
- package/src/lib/vars/display.ts +0 -231
- package/src/lib/vars/index.ts +0 -20
- package/src/lib/vars/ladder.ts +0 -282
- package/src/lib/vars/mappings.ts +0 -260
- package/src/lib/vars/names.ts +0 -94
- package/src/lib/vars/preanswers.ts +0 -395
- package/src/lib/vars/question-plan.ts +0 -241
- package/src/lib/vars/report.ts +0 -228
- package/src/lib/vars/safe-regex.ts +0 -235
- package/src/lib/vars/secrets.ts +0 -131
- package/src/lib/vars/validate.ts +0 -312
- package/src/lib/version-report.ts +0 -90
- package/src/lib/watch-loop.ts +0 -148
- package/src/lib/watch-service.ts +0 -116
- package/src/services/ref-resolver/container.ts +0 -107
- package/src/services/ref-resolver/dependency.ts +0 -60
- package/src/services/ref-resolver/format.ts +0 -197
- package/src/services/ref-resolver/glob.ts +0 -115
- package/src/services/ref-resolver/hash-names.ts +0 -155
- package/src/services/ref-resolver/index.ts +0 -55
- package/src/services/ref-resolver/injectable.ts +0 -36
- package/src/services/ref-resolver/location.ts +0 -62
- package/src/services/ref-resolver/lookups/cached-index-lookup.ts +0 -53
- package/src/services/ref-resolver/lookups/catalog-lookup.ts +0 -23
- package/src/services/ref-resolver/lookups/catalog-matcher.ts +0 -261
- package/src/services/ref-resolver/lookups/chained-lookup.ts +0 -27
- package/src/services/ref-resolver/lookups/env-var-lookup.ts +0 -65
- package/src/services/ref-resolver/lookups/fetched-index-lookup.ts +0 -150
- package/src/services/ref-resolver/lookups/recorded-dependency-lookup.ts +0 -62
- package/src/services/ref-resolver/lookups/ref-lookup.ts +0 -54
- package/src/services/ref-resolver/lookups/variable-lookup.ts +0 -123
- package/src/services/ref-resolver/named-refs.ts +0 -144
- package/src/services/ref-resolver/parser/env-var-splitter.ts +0 -27
- package/src/services/ref-resolver/parser/location-splitter.ts +0 -239
- package/src/services/ref-resolver/parser/name-path-splitter.ts +0 -200
- package/src/services/ref-resolver/parser/partial-ref.ts +0 -84
- package/src/services/ref-resolver/parser/query-splitter.ts +0 -61
- package/src/services/ref-resolver/parser/range-splitter.ts +0 -52
- package/src/services/ref-resolver/parser/ref-parser.ts +0 -115
- package/src/services/ref-resolver/parser/repo-qualifier-splitter.ts +0 -51
- package/src/services/ref-resolver/parts.ts +0 -115
- package/src/services/ref-resolver/pruners/command-line-pruner.ts +0 -47
- package/src/services/ref-resolver/pruners/include-pruner.ts +0 -66
- package/src/services/ref-resolver/pruners/manifest-pruner.ts +0 -130
- package/src/services/ref-resolver/pruners/ref-pruner.ts +0 -135
- package/src/services/ref-resolver/pruners/rule-helpers.ts +0 -44
- package/src/services/ref-resolver/pruners/stored-key-pruner.ts +0 -136
- package/src/services/ref-resolver/ref-helpers.ts +0 -62
- package/src/services/ref-resolver/ref-picker-service.ts +0 -204
- package/src/services/ref-resolver/ref-report.ts +0 -84
- package/src/services/ref-resolver/ref-resolve-arguments.ts +0 -47
- package/src/services/ref-resolver/ref-resolve-result.ts +0 -36
- package/src/services/ref-resolver/ref-resolver-service.ts +0 -323
- package/src/services/ref-resolver/source.ts +0 -48
- package/src/services/ref-resolver/tokens.ts +0 -25
- package/src/services/ref-resolver/types.ts +0 -155
- package/src/templating/filters/bullet-list.ts +0 -9
- package/src/templating/filters/index.ts +0 -8
- package/src/templating/init-liquid-engine.ts +0 -139
- package/src/templating/lib/glob-files.ts +0 -74
- package/src/templating/lib/import-export.ts +0 -32
- package/src/templating/lib/secret-scope.ts +0 -41
- package/src/templating/lib/tag-args.ts +0 -19
- package/src/templating/tags/exportScalarVarsJs.ts +0 -46
- package/src/templating/tags/getFiles.ts +0 -89
- package/src/templating/tags/index.ts +0 -14
- package/src/templating/tags/listFiles.ts +0 -54
- package/src/templating/tags/showVars.ts +0 -28
- package/src/utils/choice-prompt.ts +0 -143
- package/src/utils/command-errors.ts +0 -186
- package/src/utils/command-help.ts +0 -45
- package/src/utils/confirm-prompt.ts +0 -110
- package/src/utils/flags.ts +0 -177
- package/src/utils/formatting.ts +0 -849
- package/src/utils/prompts.ts +0 -53
- package/src/utils/sous-directory.ts +0 -245
- package/src/utils/table.ts +0 -603
- package/src/utils/value-prompt.ts +0 -119
|
@@ -1,502 +1,373 @@
|
|
|
1
1
|
# Command Reference
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
What each `sous` command is for, the flags you will reach for most, and an example. This page does not list
|
|
4
|
+
every flag: the full, current list for any command is in your terminal, with `sous <command> --help` or
|
|
5
|
+
`sous help <command>`.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Plugins can add commands of their own. They appear in `sous --help` beside the built-in ones, and every command
|
|
8
|
+
is also a tool that `sous mcp` offers an agent.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|------|--------------|
|
|
11
|
-
| `-c, --config <path>` | A sous config file, or a directory holding one. Overrides `.sous/` discovery |
|
|
12
|
-
| `--sous-config <path>` | Alias of `--config` |
|
|
13
|
-
| `--sous-dir <path>` | The `.sous` directory to use, overriding walk-up discovery |
|
|
14
|
-
| `--sous-confd <path>` | The `conf.d/` drop-in layer directory, overriding `<sousDir>/conf.d` |
|
|
10
|
+
## Flags that locate the configuration
|
|
15
11
|
|
|
16
|
-
Every command that works on a project takes
|
|
17
|
-
|
|
12
|
+
Every command that works on a project takes `-c, --config <path>` (also `--sous-config`), `--sous-dir <path>`
|
|
13
|
+
and `--sous-confd <path>`. They point sous at a config file, a `.sous/` directory or a `conf.d/` directory
|
|
14
|
+
instead of the one walk-up discovery would find. The environment variables `SOUS_CONFIG`, `SOUS_DIR` and
|
|
15
|
+
`SOUS_CONFD` do the same; a flag beats its variable. See [Discovery and overrides](config-discovery.md).
|
|
18
16
|
|
|
19
17
|
?> `repo init`, `repo release` and `repo submit` take none of these. They run inside a recipe repository, which
|
|
20
|
-
has no `.sous/` directory to discover.
|
|
21
|
-
from
|
|
18
|
+
has no `.sous/` directory to discover. `repo submit` may also be run from a project, which it finds by walking up
|
|
19
|
+
from the working directory.
|
|
22
20
|
|
|
23
21
|
## Flags that answer questions
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
- `-y, --yes` answers yes to every confirmation the command would ask. `-f`, `--force` and, on the commands that
|
|
24
|
+
trust a repository, `--trust` are the same flag.
|
|
25
|
+
- `--non-interactive` never asks anything. A run that would have asked fails instead, naming the question and
|
|
26
|
+
the flag that would have answered it.
|
|
27
|
+
- `--dry-run` prints what the command would do, and writes, downloads and asks nothing.
|
|
28
|
+
|
|
29
|
+
Sous asks a question only when it can. Piping output, redirecting it to a file and running in CI therefore do
|
|
30
|
+
what `--non-interactive` does; see [When sous cannot ask](repositories-consuming.md#when-sous-cannot-ask).
|
|
31
|
+
|
|
32
|
+
!> `sous clear` is the exception: without `-f` it asks even under `--non-interactive` or in CI, so pass `-f`
|
|
33
|
+
whenever you script it. And `sous repo init --force` is not a confirmation; it overwrites a repository that
|
|
34
|
+
already exists.
|
|
35
|
+
|
|
36
|
+
## Flags that control output
|
|
31
37
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
- `--log-level <level>` shows messages at that level and above (`debug` through `emergency`); `--debug` is the
|
|
39
|
+
same as `--log-level debug`.
|
|
40
|
+
- `--timings` prints how long each step of the run took.
|
|
41
|
+
- `--json`, on the commands that print a listing or a report, prints it as JSON instead.
|
|
35
42
|
|
|
36
|
-
Sous
|
|
37
|
-
|
|
38
|
-
under [When sous cannot ask](repositories-consuming.md#when-sous-cannot-ask).
|
|
43
|
+
Sous warns on standard error when a step takes longer than its time budget, so the warning never mixes with
|
|
44
|
+
`--json` output. The `budgets` config key changes a budget, and `false` turns its warning off.
|
|
39
45
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
`sous --version` prints the version alone, as `v1.2.3`; `sous --version --verbose` adds the package name, where
|
|
43
|
-
it is installed, the platform and the Node build under it.
|
|
46
|
+
`sous --version` prints the version (`v1.2.3`); add `--verbose` for where it is installed, the platform and
|
|
47
|
+
the Node build.
|
|
44
48
|
|
|
45
49
|
## Flags that browse
|
|
46
50
|
|
|
47
|
-
|
|
48
|
-
`
|
|
49
|
-
|
|
51
|
+
The commands that show published versions (`recipe list` and `show`, `namespace list` and `show`, `repo list`,
|
|
52
|
+
`search` and `subscription list`) read only the cached repository indexes by default, so they work offline and
|
|
53
|
+
fast. Two flags change that, and they combine:
|
|
50
54
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
- `--latest` (also `--remote`) reads each repository's index from upstream instead of the cache, without
|
|
56
|
+
writing it to the cache. A repository that cannot be reached is shown from the cache and named as not
|
|
57
|
+
checked.
|
|
58
|
+
- `--installed` shows only what this project has installed, at the version its lockfile pins.
|
|
55
59
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
version beside the installed one. With `--installed`, `recipe show` and `namespace show` look the reference up
|
|
59
|
-
among installed recipes only, and a reference to something published but not installed is an error saying so.
|
|
60
|
+
`sous recipe list --installed --latest` shows each installed recipe beside upstream's newest version: the
|
|
61
|
+
out-of-date view.
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
## Spellings
|
|
64
|
+
|
|
65
|
+
Every topic answers to both spellings of its name (`repo` and `repos`, `subscription` and `subscriptions`, and
|
|
66
|
+
so on), and `sous search`, `sous subscribe` and `sous unsubscribe` are one-word forms of `repo search`,
|
|
67
|
+
`subscription add` and `subscription remove`.
|
|
64
68
|
|
|
65
69
|
## Top-level commands
|
|
66
70
|
|
|
67
71
|
### `sous init [DIRECTORY]`
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
The
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
schema artifact published for the running sous version.
|
|
84
|
-
- `--name <name>`: the display name written into the config; the directory's own name by default.
|
|
85
|
-
- `--no-build`: write the setup without running the first build.
|
|
86
|
-
- `--dry-run`: print the files that would be written without writing them.
|
|
87
|
-
|
|
88
|
-
Example: `sous init --format json`
|
|
72
|
+
|
|
73
|
+
Sets a project up for sous, then runs the first build. It writes a commented `sous.config.js`, a starter prompt
|
|
74
|
+
at `.sous/memories/AGENTS.tpl.md` that compiles to `AGENTS.md` at the project root, the `.sous/.env` and
|
|
75
|
+
`.sous/.env.local.example` files, and the sous block in `.sous/.gitignore`. A project with a `package.json` also
|
|
76
|
+
gains `@sous-io/sous` as a devDependency at the running version; run your package manager's install afterwards.
|
|
77
|
+
|
|
78
|
+
The starter prompt holds one line, `@#memories/**/*.md`, which includes every memory your subscribed recipes
|
|
79
|
+
publish. Agent plugins can add more places for memories (the built-in Claude Code plugin adds `CLAUDE.md`).
|
|
80
|
+
|
|
81
|
+
A project whose `.sous/` already holds a config is left untouched. The config it writes is `sous.config.js`. `--no-build` skips the first build.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
sous init
|
|
85
|
+
sous init --name "My Project"
|
|
86
|
+
```
|
|
89
87
|
|
|
90
88
|
### `sous build`
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
A
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
### `sous clear`
|
|
133
|
-
Deletes every file and directory sous has written for the project, and asks first; `-f, --force` answers that
|
|
134
|
-
confirmation ahead of time. Example: `sous clear --force`
|
|
89
|
+
|
|
90
|
+
Compiles the project's outputs, then removes the ones the config no longer produces. It is the command you want
|
|
91
|
+
almost always. `-w, --watch` rebuilds on every change to a source file, a config file or a linked checkout;
|
|
92
|
+
`--rebuild` ignores cached hashes and reprocesses everything; `--strict` makes compile warnings fail the build.
|
|
93
|
+
|
|
94
|
+
Before it compiles, a build prepares the project's recipes: it pins any new subscription, restores whatever this
|
|
95
|
+
machine's recipe store is missing, and lists each recipe that has a newer version within its range (it moves no
|
|
96
|
+
pin; see [Moving to newer versions](repositories-consuming.md#moving-to-newer-versions)). The other commands
|
|
97
|
+
that build (`init`, `launch`, `prune`, `subscription add` and the like) run this same build.
|
|
98
|
+
|
|
99
|
+
A build compiles only the recipes whose subscriptions are switched on on this machine. Each one it skips gets a
|
|
100
|
+
line saying why:
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
$ sous build
|
|
104
|
+
Skipped tool-usage/automated-browser-tasks: its subscription is switched off (conf.d/610-mac.jsonc).
|
|
105
|
+
Pruned 4 outputs it had written.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
A compile error (a missing or circular include, a template that fails to render, a file sous cannot read) fails
|
|
109
|
+
the build, but only after every target is compiled and every error listed. An output whose target had an error is
|
|
110
|
+
not written, so the copy from the last good build stays in place. A build also warns about every recipe memory
|
|
111
|
+
that no output includes; see [Recipe memories](repositories-consuming.md#recipe-memories).
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
sous build
|
|
115
|
+
sous build --watch
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### `sous compile`, `sous prune`, `sous clear`
|
|
119
|
+
|
|
120
|
+
The pieces of a build, run on their own:
|
|
121
|
+
|
|
122
|
+
- `sous compile` compiles and prunes nothing. It does not prepare the recipes first.
|
|
123
|
+
- `sous prune` removes the outputs no longer in the config.
|
|
124
|
+
- `sous clear` deletes every file and directory sous has written for the project, after asking.
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
sous prune --dry-run
|
|
128
|
+
sous clear --force
|
|
129
|
+
```
|
|
135
130
|
|
|
136
131
|
### `sous launch TOOL...`
|
|
137
|
-
Builds this project's outputs, then starts a coding agent configured under `tools` in its config. A build that
|
|
138
|
-
fails starts nothing and exits `1`. `--no-build` launches without building; `--continuous` restarts the agent
|
|
139
|
-
whenever it exits.
|
|
140
132
|
|
|
141
|
-
|
|
142
|
-
|
|
133
|
+
Builds the project, then starts a coding agent: one an agent plugin provides (the built-in Claude Code plugin
|
|
134
|
+
provides `claude`), or one configured under `tools` in the config. A failed build starts nothing.
|
|
135
|
+
`--continuous` restarts the agent whenever it exits, and `--no-build` skips the build.
|
|
136
|
+
|
|
137
|
+
Arguments `launch` does not recognize are passed to the agent. Put one that clashes with a sous flag after a
|
|
138
|
+
bare `--`:
|
|
143
139
|
|
|
144
|
-
|
|
140
|
+
```bash
|
|
141
|
+
sous launch claude --resume
|
|
142
|
+
sous launch claude -- -c
|
|
143
|
+
```
|
|
145
144
|
|
|
146
145
|
### `sous search TEXT`
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
|
|
147
|
+
Searches the recipes every trusted repository publishes, by name or description. Also spelled
|
|
148
|
+
`sous repo search`.
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
sous search task
|
|
152
|
+
```
|
|
152
153
|
|
|
153
154
|
### `sous update`
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
155
|
+
|
|
156
|
+
Updates sous itself: the global install, the project's own install, or both, each through the package manager
|
|
157
|
+
that installed it. It prints every plan and asks before each install. By default each install moves to the
|
|
158
|
+
newest version in its current major; `--major` goes past it and `--version <version|range|tag>` picks one, a
|
|
159
|
+
downgrade included. See [Updating](README.md#updating).
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
sous update --dry-run
|
|
163
|
+
sous update --version next
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### `sous mcp`
|
|
167
|
+
|
|
168
|
+
Starts an MCP server for the project, for any agent tool that speaks MCP. Its tools are the same commands the
|
|
169
|
+
CLI runs, so an agent can do through it anything you can at a terminal, and a question a command would ask is
|
|
170
|
+
asked through the agent tool instead. The server keeps serving the project it started in, even when the agent
|
|
171
|
+
changes directories. In an agent tool's MCP settings:
|
|
172
|
+
|
|
173
|
+
```json
|
|
174
|
+
{
|
|
175
|
+
"mcpServers": {
|
|
176
|
+
"sous": {
|
|
177
|
+
"command": "npx",
|
|
178
|
+
"args": ["sous", "mcp"]
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### `sous plugins show`
|
|
185
|
+
|
|
186
|
+
Lists every plugin loaded for the project and what each one adds or replaces. Use it to find out which plugin
|
|
187
|
+
provides a command, a config key or an agent's targets.
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
sous plugins show
|
|
191
|
+
```
|
|
173
192
|
|
|
174
193
|
### `sous help [COMMAND]`
|
|
175
|
-
Prints the help for sous, or for one command or topic. Works from any directory, including one with no config
|
|
176
|
-
above it. Example: `sous help repo add`
|
|
177
194
|
|
|
178
|
-
|
|
195
|
+
Prints the help for sous, or for one command or topic. It works from any directory, including one with no
|
|
196
|
+
config above it.
|
|
179
197
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
198
|
+
```bash
|
|
199
|
+
sous help repo add
|
|
200
|
+
```
|
|
183
201
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
202
|
+
## config
|
|
203
|
+
|
|
204
|
+
Inspects the built configuration; see [Inspecting and validating](config-inspection.md).
|
|
187
205
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
206
|
+
- `sous config show` prints the built config as JSON, with config expressions evaluated: what sous will do on
|
|
207
|
+
this machine. `--layers` shows each change in order and what made it.
|
|
208
|
+
- `sous config get PATH` prints one value by dot-path. `--layers` shows every file, recipe or plugin that
|
|
209
|
+
changed it.
|
|
210
|
+
- `sous config validate` checks the config against its schema, then resolves every variable, which is what
|
|
211
|
+
finds circular and undefined `${var}` references.
|
|
192
212
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
213
|
+
```bash
|
|
214
|
+
sous config show | jq .compilation
|
|
215
|
+
sous config get compilation.targets[0].entryPoint --layers
|
|
216
|
+
```
|
|
196
217
|
|
|
197
218
|
## repo
|
|
198
219
|
|
|
199
|
-
Manages the recipe repositories
|
|
200
|
-
[Consuming recipes](repositories-consuming.md)
|
|
220
|
+
Manages the recipe repositories the project trusts; see [Repositories](repositories.md) and
|
|
221
|
+
[Consuming recipes](repositories-consuming.md).
|
|
201
222
|
|
|
202
|
-
### `sous repo add URL`
|
|
203
|
-
Adds a repository to this project, which is also how you trust it, and fetches its index so its recipes are
|
|
204
|
-
listable. `URL` is the repository's address, or the path of one on this machine. Takes `--dry-run`.
|
|
223
|
+
### `sous repo add URL`, `sous repo remove REPO`, `sous repo list`
|
|
205
224
|
|
|
206
|
-
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
-
|
|
225
|
+
- `repo add` trusts a repository and fetches its index, so its recipes are listable. `URL` is its address or a
|
|
226
|
+
path on this machine; `--name` sets the short name refs use, and `--provider` names the host when the URL does
|
|
227
|
+
not give it away (see the [provider reference](repositories-providers.md)).
|
|
228
|
+
- `repo remove` stops trusting a repository and removes everything it brought in, after listing what goes.
|
|
229
|
+
- `repo list` lists the trusted repositories; `--verbose` adds the namespaces each publishes.
|
|
211
230
|
|
|
212
|
-
|
|
231
|
+
```bash
|
|
232
|
+
sous repo add https://github.com/sous-io/sous-recipes --name recipes
|
|
233
|
+
sous repo remove recipes --dry-run
|
|
234
|
+
```
|
|
213
235
|
|
|
214
|
-
### `sous repo
|
|
215
|
-
Stops trusting a repository, named by the short name this project records, and removes everything it brought in.
|
|
216
|
-
It first prints what goes with it: the entry, the subscriptions that resolve into it, the recipes those alone
|
|
217
|
-
held, the files the next build prunes, and the linked checkout if one points at it. Takes `-y, --yes`,
|
|
218
|
-
`--dry-run` and `--no-build` (remove without rebuilding). Example: `sous repo remove my-recipes --dry-run`
|
|
236
|
+
### `sous repo gc`
|
|
219
237
|
|
|
220
|
-
|
|
221
|
-
Lists the repositories this project trusts, with the provider, where the entry came from, whether it is linked,
|
|
222
|
-
how many recipes it publishes (`not fetched` until its index has been downloaded) and its URL. `--verbose` adds
|
|
223
|
-
the namespaces each one publishes, on a line under its row. Takes the [browsing flags](#flags-that-browse):
|
|
224
|
-
`--installed` keeps only the repositories something is installed from and names each installed recipe and
|
|
225
|
-
version on a line under its row.
|
|
238
|
+
Shrinks this machine's recipe store down to its size limit.
|
|
226
239
|
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
Repository Provider Origin Linked Recipes URL
|
|
230
|
-
------------ -------- -------- ------ ----------- ---------------------------------------
|
|
231
|
-
sous-recipes github built in no not fetched https://github.com/sous-io/sous-recipes
|
|
240
|
+
```bash
|
|
241
|
+
sous repo gc --dry-run
|
|
232
242
|
```
|
|
233
243
|
|
|
234
|
-
### `sous repo
|
|
235
|
-
Same command as `sous search`, under its own topic; takes `--limit <n>` and the
|
|
236
|
-
[browsing flags](#flags-that-browse). Example: `sous repo search browser --installed`
|
|
237
|
-
|
|
238
|
-
### `sous repo gc`
|
|
239
|
-
Collects the machine-wide recipe store down to its size cap. `--max-bytes <n>` collects to that cap instead of
|
|
240
|
-
the one the config sets; `--dry-run` prints what it would evict. Example: `sous repo gc --max-bytes 268435456`
|
|
241
|
-
|
|
242
|
-
### `sous repo link REPO [PATH]`
|
|
243
|
-
Points a repository at a working copy on this machine instead of a published version; see
|
|
244
|
-
[Edit a repository in place](repositories-authoring.md#edit-a-repository-in-place). A name or URL on its own
|
|
245
|
-
clones it into `.sous/repos` and links the clone; a name or URL with a `PATH` links the checkout at that path; a
|
|
246
|
-
path alone links that checkout where it is, adding the repository first if needed. Takes `--dry-run`.
|
|
247
|
-
|
|
248
|
-
A checkout that was already on disk is fetched (a fetch changes none of its files or branches) and compared with
|
|
249
|
-
upstream: its branch, whether that branch is merged into the default branch, and how many commits it is behind.
|
|
250
|
-
When upstream cannot be reached within a few seconds, a warning gives git's reason and says since when the
|
|
251
|
-
checkout may have diverged, and the link is still recorded. Nothing else changes the checkout unless a flag
|
|
252
|
-
asks for it; git carries out each step, and a step git refuses stops the command with git's own message.
|
|
253
|
-
|
|
254
|
-
- `--global`: link for every project on this machine, sharing one checkout. Changing that checkout's branch
|
|
255
|
-
says it affects every project that links it.
|
|
256
|
-
- `--branch <name>`: switch to an existing branch, fetching it from upstream first when it is not local.
|
|
257
|
-
- `--create-branch <name>`: create a new branch and switch to it; git refuses a name that already exists.
|
|
258
|
-
- `--generate-branch`: the same, with the generated name `sous/edit-<YYYYMMDD>-<HHMM>`, which is printed.
|
|
259
|
-
- `--from <branch>`: the base of the new branch, fetched first. Defaults to the repository's default branch,
|
|
260
|
-
not whatever is checked out, and needs `--create-branch` or `--generate-branch`.
|
|
261
|
-
- `--latest`: make the branch being worked from (the `--branch` target, the `--from` base, or else the default
|
|
262
|
-
branch) match upstream's, leaving every other branch alone. What that would discard (uncommitted changes and
|
|
263
|
-
local commits upstream lacks) is listed first, with one question; it fails when the fetch fails.
|
|
264
|
-
- `-y, --yes`: answer the trust question a not-yet-added repository raises and the question `--latest` asks
|
|
265
|
-
(also `-f`, `--force`, `--trust`).
|
|
266
|
-
|
|
267
|
-
`--branch`, `--create-branch` and `--generate-branch` exclude each other; each flag works on a checkout linked
|
|
268
|
-
by path, too.
|
|
269
|
-
|
|
270
|
-
Example: `sous repo link sous-recipes ~/Projects/sous-recipes`, or `sous repo link sous-recipes
|
|
271
|
-
--generate-branch --latest --yes`
|
|
272
|
-
|
|
273
|
-
### `sous repo unlink REPO`
|
|
274
|
-
Stops reading a repository from a working copy, goes back to the versions the lockfile pins, and rebuilds the
|
|
275
|
-
project; `REPO` is the short name as it appears in `sous.links.json` (see
|
|
276
|
-
[File formats](repositories-file-formats.md)). On its own it also fetches the repository's index, with a short
|
|
277
|
-
timeout, and reports any newer published version the ranges allow, without moving anything; when the index
|
|
278
|
-
cannot be fetched in time it says it could not check. The checkout stays where it is unless `--remove` is passed.
|
|
279
|
-
Takes `--dry-run`, `--no-build`, `--answer` and `--answers-file`.
|
|
280
|
-
|
|
281
|
-
- `--global`: remove the machine-wide link, not this project's.
|
|
282
|
-
- `--update`: move this repository's pins to the newest versions their ranges allow before rebuilding. It runs
|
|
283
|
-
the same code as `sous subscription update REPO`.
|
|
284
|
-
- `--remove`: delete the checkout as well, but only one sous cloned itself; a checkout linked by path is refused
|
|
285
|
-
with an error. Uncommitted changes, commits no remote has and stashes are listed first and asked about.
|
|
286
|
-
- `-y, --yes`: answer every question this command asks: deleting a checkout that holds work, the update plan,
|
|
287
|
-
and the trust question for a repository a newer version needs (also `--force`, `--trust`).
|
|
288
|
-
|
|
289
|
-
Example: `sous repo unlink sous-recipes --update`
|
|
244
|
+
### `sous repo link REPO [PATH]`, `sous repo unlink REPO`
|
|
290
245
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
`
|
|
295
|
-
|
|
296
|
-
step that failed and the steps that completed. `--dry-run` prints each step and runs none. Also spelled
|
|
297
|
-
`sous repo contrib`.
|
|
246
|
+
`repo link` makes the project read a repository from a working copy instead of a published version, so you can
|
|
247
|
+
edit recipes in place; see [Edit a repository in place](repositories-authoring.md#edit-a-repository-in-place). A
|
|
248
|
+
name or URL alone clones the repository into `.sous/repos`; with a `PATH`, or a path alone, it links that
|
|
249
|
+
checkout. `--global` links it for every project on this machine, and `--branch`, `--create-branch` or
|
|
250
|
+
`--generate-branch` choose the branch to work on.
|
|
298
251
|
|
|
299
|
-
|
|
252
|
+
`repo unlink` goes back to the versions the lockfile pins and rebuilds. `--update` also moves the pins to the
|
|
253
|
+
newest versions their ranges allow, and `--remove` deletes a checkout sous cloned.
|
|
300
254
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
255
|
+
```bash
|
|
256
|
+
sous repo link sous-recipes ~/Projects/sous-recipes
|
|
257
|
+
sous repo link sous-recipes --generate-branch --latest
|
|
258
|
+
sous repo unlink sous-recipes --update
|
|
259
|
+
```
|
|
305
260
|
|
|
306
|
-
|
|
307
|
-
with no open proposal), asks whether to submit it with `sous repo submit REPO`, then runs
|
|
308
|
-
`sous repo unlink REPO --update`. With nothing to submit, the submit step is skipped without asking.
|
|
261
|
+
### `sous repo contribute REF`
|
|
309
262
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
- `-y, --yes`: passed through to every step, and submits without asking (also `-f`, `--force`).
|
|
314
|
-
- `--accept-first`: when `REF` matches several things, take the first one listed.
|
|
263
|
+
Starts a change to a recipe repository, and finishes it with `--finish`, by running `repo link`, `repo submit`
|
|
264
|
+
and `repo unlink` for you. `REF` names a repository, or a namespace or recipe in it. Also spelled
|
|
265
|
+
`sous repo contrib`. See [Contributing a change](repositories-contributing.md).
|
|
315
266
|
|
|
316
|
-
|
|
317
|
-
|
|
267
|
+
```bash
|
|
268
|
+
sous repo contribute workflow/task-files
|
|
269
|
+
sous repo contribute workflow/task-files --finish --title "Clarify the resume steps" --body "The resume steps skipped the task file."
|
|
270
|
+
```
|
|
318
271
|
|
|
319
272
|
### `sous repo init [DIRECTORY]`
|
|
320
|
-
Creates a new recipe repository in a directory, defaulting to the current one; `--dry-run` prints the files it
|
|
321
|
-
would write. See [Authoring a repository](repositories-authoring.md).
|
|
322
273
|
|
|
323
|
-
|
|
324
|
-
- `--namespace <name>`: name the one namespace to declare. Defaults to the repository's name.
|
|
325
|
-
- `--force`: write the scaffold over a repository that already exists.
|
|
274
|
+
Creates a new recipe repository. See [Authoring a repository](repositories-authoring.md).
|
|
326
275
|
|
|
327
|
-
|
|
276
|
+
```bash
|
|
277
|
+
sous repo init ./my-recipes --name team-recipes --namespace workflow
|
|
278
|
+
```
|
|
328
279
|
|
|
329
280
|
### `sous repo release`
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
- `--check`: only validate. It fails on a problem the release would refuse, and on a change to a recipe that
|
|
340
|
-
takes no proposals (see [`submissions`](repositories-file-formats.md#the-submissions-block)), and reports,
|
|
341
|
-
without failing, how merging would rewrite the committed index.
|
|
342
|
-
- `--ci`: the merge preset. Never bump, never ask, and fail on anything unbumped. It still needs `--yes` to
|
|
343
|
-
accept the plan it prints, so a merge job runs `sous repo release --ci --yes --push`.
|
|
344
|
-
|
|
345
|
-
Example: `sous repo release --recipe workflow/task-files --bump minor --push`
|
|
281
|
+
|
|
282
|
+
Publishes new versions of the repository's recipes: raises their versions, regenerates the index, commits and
|
|
283
|
+
tags. It plans first and asks once, and it needs a git commit identity (`user.name` and `user.email`) in the
|
|
284
|
+
repository. `--check` only validates, and `--ci` is the setting for a merge job.
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
sous repo release --recipe workflow/task-files --bump minor --push
|
|
288
|
+
sous repo release --ci --yes --push
|
|
289
|
+
```
|
|
346
290
|
|
|
347
291
|
### `sous repo submit [REPO]`
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
The body is followed by a changelog sous generates.
|
|
357
|
-
- `--branch <name>`: work with this branch instead of the one checked out. A branch that does not exist is
|
|
358
|
-
created from the current commit.
|
|
359
|
-
- `--status`: only report where the branch's proposal stands; nothing is checked, written or sent.
|
|
360
|
-
- `--commit`: commit uncommitted changes for you, after listing them and asking once, with the title, the
|
|
361
|
-
description and the changelog as the message.
|
|
362
|
-
- `--draft`: open a new proposal as a draft.
|
|
363
|
-
|
|
364
|
-
Example: `sous repo submit --title "Add a linting recipe" --body "Adds lint rules for shell scripts." --draft`
|
|
292
|
+
|
|
293
|
+
Proposes a repository's changes to its maintainers and follows the proposal through: it opens one, updates it
|
|
294
|
+
when there is more to send, and reports where it stands. Run in a project, `REPO` names a linked repository.
|
|
295
|
+
`--status` only reports.
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
sous repo submit --title "Add a linting recipe" --body "Adds lint rules for shell scripts." --draft
|
|
299
|
+
```
|
|
365
300
|
|
|
366
301
|
## subscription
|
|
367
302
|
|
|
368
|
-
Manages which recipes
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
### `sous subscription remove REF`
|
|
388
|
-
Removes a subscription and everything only it brought in, then rebuilds so those files are gone. Also spelled
|
|
389
|
-
`sous unsubscribe`. Takes `--dry-run` and `--no-build`. Example: `sous subscription remove workflow/task-files`
|
|
390
|
-
|
|
391
|
-
### `sous subscription update [REF]`
|
|
392
|
-
Moves the lockfile's pins to the newest published versions their ranges allow, then rebuilds the project. With
|
|
393
|
-
no `REF` it covers every subscription; a `REF` naming a repository, a namespace or a recipe narrows it, and
|
|
394
|
-
everything outside it stays where it is pinned. It fetches every trusted repository's index first, never widens
|
|
395
|
-
a range, moves dependencies with the closure, and changes only the lockfile, never the subscriptions. It prints
|
|
396
|
-
the plan and asks once; with nothing to update it says so and asks nothing. See
|
|
397
|
-
[Moving to newer versions](repositories-consuming.md#moving-to-newer-versions). Takes `--no-build`, `--answer`
|
|
398
|
-
and `--answers-file`, and `--dry-run`, which fetches the indexes but downloads no recipe and writes nothing.
|
|
399
|
-
|
|
400
|
-
- `-y, --yes`: accept the plan, and trust any repository a newer version needs (also `--force`, `--trust`).
|
|
401
|
-
- `--accept-first`: when `REF` matches several things, take the first one listed.
|
|
402
|
-
|
|
403
|
-
Example: `sous subscription update workflow/task-files`
|
|
404
|
-
|
|
405
|
-
### `sous subscription list`
|
|
406
|
-
Lists the subscriptions this project declares, switched-off ones included, with the range each resolves within,
|
|
407
|
-
the versions the lockfile pins, the latest version each of those recipes has published, where it came from and
|
|
408
|
-
whether it is on. Reads the config, the lockfile and the cached indexes only. Takes the
|
|
409
|
-
[browsing flags](#flags-that-browse): `--latest` reads the latest versions from upstream, and `--installed` keeps
|
|
410
|
-
only the subscriptions that have pinned something. Example: `sous subscription list --latest`
|
|
411
|
-
|
|
412
|
-
## namespace
|
|
413
|
-
|
|
414
|
-
`namespace` reads the cached indexes and the lockfile, so it works offline. A trusted repository whose index has
|
|
415
|
-
never been fetched is named at the end of a listing, not left out. Both commands take the
|
|
416
|
-
[browsing flags](#flags-that-browse); with `--installed` the recipe count is the number installed. The core version this installation of sous
|
|
417
|
-
ships is listed even while the cached index does not publish it yet.
|
|
418
|
-
|
|
419
|
-
### `sous namespace list`
|
|
420
|
-
Lists every namespace the trusted repositories publish, how many recipes each holds, and how much of it this
|
|
421
|
-
project subscribes to: all of it, some recipes, or none. Example: `sous namespace list`
|
|
422
|
-
|
|
423
|
-
### `sous namespace show REF`
|
|
424
|
-
Shows one namespace and every recipe in it, with the latest published version, the version this project pins,
|
|
425
|
-
and whether it is subscribed. `REF` is a namespace, optionally written as `repository:namespace`.
|
|
426
|
-
Example: `sous namespace show sous-recipes:core`
|
|
427
|
-
|
|
428
|
-
## recipe
|
|
429
|
-
|
|
430
|
-
Browses the recipes the trusted repositories publish; like `namespace`, it works offline, and both commands take
|
|
431
|
-
the [browsing flags](#flags-that-browse).
|
|
432
|
-
|
|
433
|
-
### `sous recipe list`
|
|
434
|
-
Lists the recipes the trusted repositories publish, across every namespace, with the same per-recipe columns
|
|
435
|
-
`namespace show` prints. Example: `sous recipe list --installed --latest`
|
|
436
|
-
|
|
437
|
-
### `sous recipe show REF`
|
|
438
|
-
Describes one recipe completely: its repository and location, every published version, its dependencies (the
|
|
439
|
-
manifest entry bringing each one in, such as a whole namespace, whether it is a co-subscription or a build
|
|
440
|
-
dependency, and the version it was released against), every recipe a subscription to it would install, every
|
|
441
|
-
question that would ask, laid out as `sous subscription add --dry-run` lays them out, and the directories its
|
|
442
|
-
files are written into. Everything but the files comes from the index, so a recipe nothing has installed yet
|
|
443
|
-
is described in full, offline. `REF` is `namespace/recipe`, a recipe name alone, or either with a
|
|
444
|
-
`repository:` qualifier. Example: `sous recipe show omakase/house`
|
|
303
|
+
Manages which recipes the project subscribes to. `REF` is `namespace` or `namespace/recipe`, optionally with an
|
|
304
|
+
`@<range>` and a `repo:` prefix; see [Refs](repositories-file-formats.md#refs-how-anything-is-named).
|
|
305
|
+
|
|
306
|
+
- `subscription add` (or `sous subscribe`) subscribes, then builds so the recipe's files are on disk. Answer a
|
|
307
|
+
recipe's questions ahead of time with `--answer <name>=<value>` or `--answers-file <path>`, and let it install
|
|
308
|
+
the sous plugins it requires with `--install-plugins`.
|
|
309
|
+
- `subscription remove` (or `sous unsubscribe`) removes a subscription and everything only it brought in.
|
|
310
|
+
- `subscription update [REF]` moves the lockfile's pins to the newest versions their ranges allow, then
|
|
311
|
+
rebuilds. See [Moving to newer versions](repositories-consuming.md#moving-to-newer-versions).
|
|
312
|
+
- `subscription disable REF` and `subscription enable REF` switch a subscription off or back on in
|
|
313
|
+
`conf.d/510-subscriptions.jsonc`, leaving the rest of that file as it is.
|
|
314
|
+
- `subscription list` lists the subscriptions, switched-off ones included, with their pins and latest versions.
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
sous subscribe workflow/task-files@^1.2.0 --answer apiUrl=https://api.example.com
|
|
318
|
+
sous subscription disable tool-usage/automated-browser-tasks
|
|
319
|
+
sous subscription update
|
|
320
|
+
```
|
|
445
321
|
|
|
446
|
-
##
|
|
322
|
+
## namespace and recipe
|
|
447
323
|
|
|
448
|
-
|
|
324
|
+
Browse what the trusted repositories publish, offline.
|
|
449
325
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
326
|
+
- `namespace list` lists every namespace and how much of it the project subscribes to.
|
|
327
|
+
- `namespace show REF` lists one namespace's recipes, with their latest and pinned versions.
|
|
328
|
+
- `recipe list` lists every recipe, across every namespace.
|
|
329
|
+
- `recipe show REF` describes one recipe completely: its versions, dependencies, the questions it asks and where
|
|
330
|
+
its files go, even before anything installs it.
|
|
453
331
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
version this installation of sous ships resolves even when the cached index has not published it yet, exactly
|
|
459
|
-
as it does in a build. To move pins to versions published since the last fetch, use `sous subscription update`.
|
|
460
|
-
Takes `--dry-run`. Example: `sous lock rebuild --dry-run`
|
|
332
|
+
```bash
|
|
333
|
+
sous namespace show sous-recipes:core
|
|
334
|
+
sous recipe show omakase/house
|
|
335
|
+
```
|
|
461
336
|
|
|
462
|
-
##
|
|
337
|
+
## lock
|
|
338
|
+
|
|
339
|
+
Inspects and repairs the project's lockfile, `.sous/sous.lock.json`, without fetching anything.
|
|
463
340
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
See [Recipe variables](repositories-variables.md).
|
|
341
|
+
- `lock show` prints what the lockfile pins, and why each recipe is there.
|
|
342
|
+
- `lock rebuild` recomputes the lockfile from scratch from the subscriptions and the cached indexes: the repair
|
|
343
|
+
for a lockfile damaged by a hand edit or a bad merge.
|
|
468
344
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
Example: `sous vars list --file ./questions.yaml`
|
|
345
|
+
```bash
|
|
346
|
+
sous lock rebuild --dry-run
|
|
347
|
+
```
|
|
473
348
|
|
|
474
|
-
|
|
475
|
-
Shows everything about one variable, including every environment variable on the resolution ladder and which
|
|
476
|
-
rung answered; takes `--file <path>`. Example: `sous vars show workflow/task-files.apiUrl`
|
|
349
|
+
## vars
|
|
477
350
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
variable, an environment variable name, a recipe, a namespace or a repository; anything larger than a variable
|
|
481
|
-
asks every question it publishes. Takes `--file <path>` and `--dry-run`.
|
|
351
|
+
Inspects the questions the project's recipes ask, and the answers they hold; see
|
|
352
|
+
[Recipe variables](repositories-variables.md). `sous vars` alone is `vars list`.
|
|
482
353
|
|
|
483
|
-
-
|
|
484
|
-
-
|
|
485
|
-
-
|
|
486
|
-
-
|
|
354
|
+
- `vars list` lists every variable, with where its value came from.
|
|
355
|
+
- `vars show NAME` shows everything about one variable.
|
|
356
|
+
- `vars ask [NAME]` asks the questions and stores the answers in the `.sous` env files. `--env-file .env` or
|
|
357
|
+
`--env-file .env.local` stores every answer of the run in that one file (committed, or this machine only); a
|
|
358
|
+
secret or machine-specific variable headed for the committed `.env` is warned about and needs a yes (`--yes`).
|
|
487
359
|
|
|
488
|
-
|
|
360
|
+
```bash
|
|
361
|
+
sous vars show workflow/task-files.apiUrl
|
|
362
|
+
sous vars ask --namespace workflow
|
|
363
|
+
```
|
|
489
364
|
|
|
490
|
-
## Exit
|
|
365
|
+
## Exit codes and errors
|
|
491
366
|
|
|
492
|
-
A command that succeeds exits `0
|
|
493
|
-
|
|
494
|
-
producing output built on a guess. A build with a compile error carries on long enough to compile every target
|
|
495
|
-
and list every error, then exits `1`, leaving the last good copy of each output that had an error;
|
|
496
|
-
`--strict` on `build` and `compile` makes compile warnings fail the run too.
|
|
367
|
+
A command that succeeds exits `0`, a command line sous could not parse exits `2`, and every other failure exits
|
|
368
|
+
`1`. A broken config stops sous rather than producing output built on a guess.
|
|
497
369
|
|
|
498
|
-
A failure prints one error block
|
|
499
|
-
help under it, on standard error. An error sous raises names the cause and the cure:
|
|
370
|
+
A failure prints one error block that names the cause and the fix:
|
|
500
371
|
|
|
501
372
|
```term
|
|
502
373
|
$ sous subscription add workflow --non-interactive
|
|
@@ -509,19 +380,11 @@ $ sous subscription add workflow --non-interactive
|
|
|
509
380
|
pass '--accept-first' to take the first candidate listed above.
|
|
510
381
|
```
|
|
511
382
|
|
|
512
|
-
|
|
513
|
-
asking you to set `SOUS_DEBUG=1` and run the command again. Set `SOUS_DEBUG` to anything but `0`, `false`, `no`
|
|
514
|
-
or `off` and every reported failure prints its stack to standard error underneath the message:
|
|
515
|
-
`SOUS_DEBUG=1 sous build`. The one other thing it changes is that every hand-off to a project's own install
|
|
516
|
-
announces itself in full, not only one between different versions; `--verbose` does the same.
|
|
517
|
-
|
|
518
|
-
`SOUS_NO_DELEGATE` is the other environment variable every command reads. Set it the same way and the copy of
|
|
519
|
-
sous you invoked runs the command, even inside a project that installs its own `@sous-io/sous`; see
|
|
520
|
-
[Installing](README.md#installing) for the hand-off it switches off.
|
|
383
|
+
Two environment variables change how any command runs:
|
|
521
384
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
385
|
+
- `SOUS_DEBUG=1` prints the stack trace under every failure, and announces every hand-off to a project's own
|
|
386
|
+
install of sous.
|
|
387
|
+
- `SOUS_NO_DELEGATE=1` runs the copy of sous you invoked, even inside a project that installs its own; see
|
|
388
|
+
[Installing](README.md#installing).
|
|
525
389
|
|
|
526
|
-
For what a
|
|
527
|
-
[Repositories troubleshooting](repositories-troubleshooting.md).
|
|
390
|
+
For what a repository error is telling you, see [Repositories troubleshooting](repositories-troubleshooting.md).
|