Skip to content

fix: expose sh1pt init as top-level command#331

Open
nguyenlnp wants to merge 1 commit into
profullstack:masterfrom
nguyenlnp:fix/top-level-init-command-241
Open

fix: expose sh1pt init as top-level command#331
nguyenlnp wants to merge 1 commit into
profullstack:masterfrom
nguyenlnp:fix/top-level-init-command-241

Conversation

@nguyenlnp
Copy link
Copy Markdown

Summary

Fixes #241

The README documents sh1pt init as the way to scaffold a new project, but the CLI only registered it as a subcommand under sh1pt ship init.

Changes

  • New file: packages/cli/src/commands/init.ts — exports initCmd (top-level) and initAction (shared logic)
  • Modified: packages/cli/src/index.ts — imports and registers initCmd as a top-level command
  • Modified: packages/cli/src/commands/ship.ts — imports initAction from init.ts instead of defining the action inline, so sh1pt ship init still works

Behavior

Both commands now work identically:

sh1pt init          # ✅ top-level (documented in README)
sh1pt ship init     # ✅ still works as subcommand

Testing

All 1887 tests pass (pnpm test).

SOL wallet: 0xadf380b5048e9730af0957fd39d5ef1de374475d

The README documents  as the way to scaffold a project, but
the CLI only registered it as . This change:

- Extracts the init action into a shared initAction function in
  packages/cli/src/commands/init.ts
- Registers  as a top-level command in index.ts
- Refactors ship.ts to import initAction from init.ts, keeping
   working as before

Both  and  now work identically.
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.

Expose documented top-level sh1pt init command

1 participant