CLI development
Package scripts
Section titled “Package scripts”pnpm --filter cli dev --helppnpm --filter cli buildpnpm --filter cli lintpnpm --filter cli check-typesSource layout
Section titled “Source layout”apps/cli/ src/index.ts package.json tsconfig.json eslint.config.jssrc/index.ts creates a Commander Command, sets the CLI name and version, and
registers subcommands.
Add a command
Section titled “Add a command”Add new commands in apps/cli/src/index.ts:
program .command("status") .description("Check memo.st CLI configuration.") .action(() => { console.log("memo.st CLI is configured."); });Keep command handlers small. Move larger API clients, config loading, and file operations into separate modules before adding more workflows.
Release shape
Section titled “Release shape”The package bin points at ./dist/index.js, so the build step must run before
the CLI is published or packed:
pnpm --filter cli build