decopin-cli

↑ ↓ to navigate · Enter to open · Esc to close

ProjectWorking examples

Working examples

The demo app in the repository, kept honest by the build and the tests.

demo/app/ is the example, and the build and the tests keep it honest. Every code block on this site that starts with // app/... is a real file there, and the shell output shown is what the demo prints.

CommandWhat it shows
hellopositional args, options, enums
countstdin.tsx (lines), a help.tsx override, bundled boolean aliases
upperoptional stdin (undefined in a terminal)
configreading validated env.tsx values
usersubcommands, layout.tsx, middleware.tsx, an inherited error.tsx
user importmode="json" with Type.Object
user shownotFound() with an automatic suggestion, complete.tsx
deployhelp() when the input cannot be acted on
publishauthRequired() / missingTool() with fix hints
statsdata.tsx split from the view, output.tsx, and --json
crasherror.tsx and <Exit>
goshell.tsx: cd and export in the parent shell
git clone https://github.com/yuyakinjo/decopin-cli
cd decopin-cli
bun install
bun run build            # builds demo/app into dist/index.js
./dist/index.js hello world