feat(cli): env-var management verbs for all four scopes#170
Merged
Conversation
Adds unit tests for `ConfigEditor::remove_env_var` covering the three previously untested EnvScope variants (Agent, Workspace, WorkspaceAgent) plus a sibling-preservation test at Global scope. Production code is unchanged. Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com> Co-authored-by: Claude <noreply@anthropic.com>
Adds `jackin config env {set,unset,list}` (global and per-agent) and
`jackin workspace env {set,unset,list}` (per-workspace and per-workspace-
agent). Calls existing ConfigEditor::set_env_var / remove_env_var; no new
editor methods. Includes integration tests in tests/cli_env.rs as the
first end-to-end CLI test file.
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Documents the new `jackin config env {set,unset,list}` and
`jackin workspace env {set,unset,list}` verbs landed in the prior
commit. Worked examples per scope; notes on idempotent unset
semantics; clarifies that values are stored as-typed and resolved
at launch.
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
8 tasks
donbeave
added a commit
that referenced
this pull request
May 6, 2026
* test(config): cover all EnvScope variants in remove_env_var unit tests
Adds unit tests for `ConfigEditor::remove_env_var` covering the three
previously untested EnvScope variants (Agent, Workspace, WorkspaceAgent)
plus a sibling-preservation test at Global scope. Production code is
unchanged.
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
* feat(cli): add env-var management verbs for all four scopes
Adds `jackin config env {set,unset,list}` (global and per-agent) and
`jackin workspace env {set,unset,list}` (per-workspace and per-workspace-
agent). Calls existing ConfigEditor::set_env_var / remove_env_var; no new
editor methods. Includes integration tests in tests/cli_env.rs as the
first end-to-end CLI test file.
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
* docs(commands): document config env and workspace env verbs
Documents the new `jackin config env {set,unset,list}` and
`jackin workspace env {set,unset,list}` verbs landed in the prior
commit. Worked examples per scope; notes on idempotent unset
semantics; clarifies that values are stored as-typed and resolved
at launch.
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
---------
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
donbeave
added a commit
that referenced
this pull request
May 7, 2026
* test(config): cover all EnvScope variants in remove_env_var unit tests
Adds unit tests for `ConfigEditor::remove_env_var` covering the three
previously untested EnvScope variants (Agent, Workspace, WorkspaceAgent)
plus a sibling-preservation test at Global scope. Production code is
unchanged.
Co-authored-by: Claude <noreply@anthropic.com>
* feat(cli): add env-var management verbs for all four scopes
Adds `jackin config env {set,unset,list}` (global and per-agent) and
`jackin workspace env {set,unset,list}` (per-workspace and per-workspace-
agent). Calls existing ConfigEditor::set_env_var / remove_env_var; no new
editor methods. Includes integration tests in tests/cli_env.rs as the
first end-to-end CLI test file.
Co-authored-by: Claude <noreply@anthropic.com>
* docs(commands): document config env and workspace env verbs
Documents the new `jackin config env {set,unset,list}` and
`jackin workspace env {set,unset,list}` verbs landed in the prior
commit. Worked examples per scope; notes on idempotent unset
semantics; clarifies that values are stored as-typed and resolved
at launch.
Co-authored-by: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Codex <codex@openai.com>
donbeave
added a commit
that referenced
this pull request
May 7, 2026
* test(config): cover all EnvScope variants in remove_env_var unit tests
Adds unit tests for `ConfigEditor::remove_env_var` covering the three
previously untested EnvScope variants (Agent, Workspace, WorkspaceAgent)
plus a sibling-preservation test at Global scope. Production code is
unchanged.
* feat(cli): add env-var management verbs for all four scopes
Adds `jackin config env {set,unset,list}` (global and per-agent) and
`jackin workspace env {set,unset,list}` (per-workspace and per-workspace-
agent). Calls existing ConfigEditor::set_env_var / remove_env_var; no new
editor methods. Includes integration tests in tests/cli_env.rs as the
first end-to-end CLI test file.
* docs(commands): document config env and workspace env verbs
Documents the new `jackin config env {set,unset,list}` and
`jackin workspace env {set,unset,list}` verbs landed in the prior
commit. Worked examples per scope; notes on idempotent unset
semantics; clarifies that values are stored as-typed and resolved
at launch.
---------
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
donbeave
added a commit
that referenced
this pull request
May 7, 2026
* test(config): cover all EnvScope variants in remove_env_var unit tests
Adds unit tests for `ConfigEditor::remove_env_var` covering the three
previously untested EnvScope variants (Agent, Workspace, WorkspaceAgent)
plus a sibling-preservation test at Global scope. Production code is
unchanged.
* feat(cli): add env-var management verbs for all four scopes
Adds `jackin config env {set,unset,list}` (global and per-agent) and
`jackin workspace env {set,unset,list}` (per-workspace and per-workspace-
agent). Calls existing ConfigEditor::set_env_var / remove_env_var; no new
editor methods. Includes integration tests in tests/cli_env.rs as the
first end-to-end CLI test file.
* docs(commands): document config env and workspace env verbs
Documents the new `jackin config env {set,unset,list}` and
`jackin workspace env {set,unset,list}` verbs landed in the prior
commit. Worked examples per scope; notes on idempotent unset
semantics; clarifies that values are stored as-typed and resolved
at launch.
---------
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
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
Adds
jackin config env {set,unset,list}(Global and per-Agent scopes) andjackin workspace env {set,unset,list}(Workspace and per-WorkspaceAgent scopes), exposing the full four-scopeEnvScopesurface thatConfigEditor::set_env_varandConfigEditor::remove_env_varalready implement.This is a deliberate CLI-first prerequisite for Stage 3 (Secrets tab) of the workspace-manager-TUI series. Per the standing rule that the operator console is simplified and CLI carries the full feature surface, the TUI must not be the first interface for env management — this PR closes that gap.
What's inside
510990dftest(config):cover all EnvScope variants inremove_env_varunit testsc336469afeat(cli):add env-var management verbs for all four scopesfc233e18docs(commands):documentconfig envandworkspace envverbsRouting:
config env [--agent X]→ Global / Agent scopesworkspace env <WS> [--agent X]→ Workspace / WorkspaceAgent scopesNo new dependencies.
ConfigEditor::remove_env_varalready returnsboolwith the right semantics —unsetis wired directly with idempotent "not set" output and exit 0 on missing keys.Tests:
EnvScopevariants onremove_env_vartests/cli_env.rs(the first end-to-end CLI test file in the repo; usesassert_cmd/predicatesalready in dev-deps)Out of scope
op://references, POSIX env-name rules[docker.mounts]global mount managementCHANGELOG.md(operator curates manually)Test plan
cargo nextest run -p jackin— 843 passedcargo nextest run -p jackin --test cli_env— 10/10 passcargo clippy -- -D warnings— clean (CI gate)cargo fmt -- --check— cleancargo build --all-targets— cleanbun run build(docs) — 45 pages built, no warningsjackin config env set FOO bar,--agent,--comment,unset,listacross both parents