Build slug CLI foundation #41

Merged
erik merged 2 commits from feat/task-a3cd5595-cli-foundation into main 2026-05-19 22:56:03 -05:00
Owner

Summary

  • Add the @slugkit/cli workspace package with slug executable wiring.
  • Implement top-level help/version, JSON version output, and config show/set commands.
  • Add future-ready config storage with default profiles and secret-safe display output.
  • Add shared output, error/exit-code, and HTTP client utilities for later commands.
  • Update workspace scripts to build/test/typecheck both CLI and template site.
  • Update contributing docs to require showing an implementation plan before editing.

Testing

  • npm ci
  • make check
  • ./scripts/pre-pr.sh
  • Manual smoke: node_modules/.bin/slug --help, node_modules/.bin/slug --version, node_modules/.bin/slug version --json, config set/show with SLUG_CONFIG_HOME

Task: #task-a3cd5595

## Summary - Add the `@slugkit/cli` workspace package with `slug` executable wiring. - Implement top-level help/version, JSON version output, and config show/set commands. - Add future-ready config storage with default profiles and secret-safe display output. - Add shared output, error/exit-code, and HTTP client utilities for later commands. - Update workspace scripts to build/test/typecheck both CLI and template site. - Update contributing docs to require showing an implementation plan before editing. ## Testing - `npm ci` - `make check` - `./scripts/pre-pr.sh` - Manual smoke: `node_modules/.bin/slug --help`, `node_modules/.bin/slug --version`, `node_modules/.bin/slug version --json`, config set/show with `SLUG_CONFIG_HOME` Task: #task-a3cd5595
feat: build slug CLI foundation
All checks were successful
CI / build-lint-test (pull_request) Successful in 26s
1660afe90f
Task: #task-a3cd5595
docs: require next-step responses
All checks were successful
CI / build-lint-test (pull_request) Successful in 26s
757658f78c
Task: #task-a3cd5595
Author
Owner

PR Review: Approved

Summary

Reviewed PR #41 at commit 757658f. The PR adds the @slugkit/cli workspace, wires the slug executable, implements help/version/config commands, adds future-ready profile config storage, redacts configured API keys from displayed config, adds JSON output support, defines shared CLI exit codes/errors/output helpers, adds an HTTP client scaffold, updates workspace scripts to include the CLI, and updates contribution workflow requirements.

Acceptance Criteria

  • slug --help prints useful help.
  • slug --version prints the package version.
  • CLI config can store and read a default profile.
  • Secret values are redacted when config is displayed.
  • JSON output mode is available for commands that support it.
  • Invalid usage returns a non-zero exit and clear message.
  • Tests cover config read/write, secret redaction, help/version behavior, and exit behavior.
  • Relevant lint/test checks pass: Forgejo CI succeeded on the latest commit; local make check and ./scripts/pre-pr.sh passed before PR creation.

Blocking Issues

None.

Warnings

None.

Verdict

Approved for merge.

## PR Review: Approved ### Summary Reviewed PR #41 at commit `757658f`. The PR adds the `@slugkit/cli` workspace, wires the `slug` executable, implements help/version/config commands, adds future-ready profile config storage, redacts configured API keys from displayed config, adds JSON output support, defines shared CLI exit codes/errors/output helpers, adds an HTTP client scaffold, updates workspace scripts to include the CLI, and updates contribution workflow requirements. ### Acceptance Criteria - [x] `slug --help` prints useful help. - [x] `slug --version` prints the package version. - [x] CLI config can store and read a default profile. - [x] Secret values are redacted when config is displayed. - [x] JSON output mode is available for commands that support it. - [x] Invalid usage returns a non-zero exit and clear message. - [x] Tests cover config read/write, secret redaction, help/version behavior, and exit behavior. - [x] Relevant lint/test checks pass: Forgejo CI succeeded on the latest commit; local `make check` and `./scripts/pre-pr.sh` passed before PR creation. ### Blocking Issues None. ### Warnings None. ### Verdict Approved for merge.
erik merged commit d51b0681f4 into main 2026-05-19 22:56:03 -05:00
Sign in to join this conversation.
No description provided.