node-cli-template/README.md

43 lines
810 B
Markdown
Raw Normal View History

2026-02-15 17:38:53 +07:00
# CLI Template
A minimal CLI template using Stricli and Dax.
## Quick Start
```bash
nix develop # optional: provides Node.js, TypeScript, biome
npm install
npm run build
2026-02-20 23:55:59 +07:00
node dist/index.mjs --help
2026-02-15 17:38:53 +07:00
```
Alternatively, use Nix directly:
```bash
nix run . -- --help # runs the CLI directly
nix shell . --command name-placeholder --help # provides CLI in PATH
```
## Development
Uses TypeScript and Biome for checks:
```bash
npm run check
```
## Renaming
2026-02-25 16:20:26 +07:00
To rename the CLI, edit the `name` field in `package.json`. Both the Nix package and the CLI will update automatically.
2026-02-15 17:38:53 +07:00
```bash
2026-02-25 16:20:26 +07:00
# Edit package.json, then rebuild:
2026-02-15 17:38:53 +07:00
nix build .
```
In case Nix complains about the hash, run this to get the correct one and replace in flake.nix:
```bash
nix run nixpkgs#prefetch-npm-deps -- package-lock.json
```