Skip to content

feat(cli): expose CLI dispatch as importable pkg/cli entry point#30

Merged
sairintechnologycom merged 1 commit into
mainfrom
feat/public-cli-entrypoint
Jul 2, 2026
Merged

feat(cli): expose CLI dispatch as importable pkg/cli entry point#30
sairintechnologycom merged 1 commit into
mainfrom
feat/public-cli-entrypoint

Conversation

@sairintechnologycom

Copy link
Copy Markdown
Owner

Summary

  • Moves CLI command dispatch from cmd/pkgsafe (package main) into an exported pkg/cli package; cmd/pkgsafe becomes a thin shim calling cli.Execute(os.Args[1:]).
  • Motivation (Loop 2 bootstrap): everything of substance in this module lives under internal/, which is not importable across Go module boundaries — so pkgsafe-enterprise could not consume the public core at all. pkg/cli is the minimal stable public surface that lets the enterprise superset binary embed the identical command set.
  • Mechanical move only: run() → exported cli.Run, new cli.Execute translates exit-code errors to process exit codes; tests moved with the package (same directory depth, testdata paths unchanged). No command behavior changes.

Validation

  • go build ./..., go vet ./..., gofmt clean.
  • Full go test ./... pass; go test -race on moved package pass.
  • scripts/check-public-boundary.sh passes — this adds interface surface only, no premium implementation.

Intended release: v1.1.0 (new exported API, no breaking changes).

🤖 Generated with Claude Code

Move command dispatch from cmd/pkgsafe (package main) to the exported
pkg/cli package. cmd/pkgsafe becomes a thin shim calling cli.Execute.
This gives downstream distributions — specifically the private
pkgsafe-enterprise superset binary — an importable public surface, since
everything else in the module lives under internal/ and cannot be
consumed across module boundaries.

Mechanical move: run() -> cli.Run (exported), new cli.Execute translates
exit-code errors; tests move with the package unchanged. No command
behavior changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

PkgSafe Dependency Gate

Decision: ALLOW
Mode: WARN
Fail On: BLOCK
Workflow Result: passes
Ecosystem: npm
Lockfile: testdata/npm/self-scan/package-lock.json
Changed Only: false
Baseline: main
Packages Scanned: 1

Counts

Allow Warn Block Unknown Vulnerabilities
1 0 0 0 0

Warn / Block Findings

No blocked or warning dependencies found.

Recommended Action

All scanned packages are allowed by policy.

Governance Evidence

  • Evidence pack generated: pkgsafe-evidence-pack.zip

@sairintechnologycom
sairintechnologycom merged commit a4f1f19 into main Jul 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant