@devinpublic/cli
v0.1.1
Published
CLI to create notes in .devinpublic
Downloads
100
Readme
@devinpublic/cli
The dip command is provided by @devinpublic/cli: a small, dependency-light CLI that captures what you are about to do and saves it as a dated Markdown note under .devinpublic/. It is built with TypeScript, Commander, and ships as an npm package for use in any project.
Why use it?
- One prompt — asks what you are about to do, then writes the file.
- Predictable filenames —
YYYY-MM-DD--NNN-init.mdwith per-day sequence numbering so runs do not overwrite each other. - Portable — install once per repo or run via
npx; works on Node 18+.
Installation
npm install @devinpublic/cliOr run without installing:
npx @devinpublic/cliUsage
Add a script to your package.json:
{
"scripts": {
"dip": "dip"
}
}Then:
npm run dipYou will be prompted:
What are you about to do?After you press Enter, a new file is created under .devinpublic/ and a success line is printed, for example:
File created successfully at .devinpublic/2026-03-28--001-init.mdCLI options
| Option | Description |
|--------|-------------|
| -h, --help | Show help |
| -V, --version | Print version |
Requirements
- Node.js 18 or newer
Development
git clone <your-repo-url>
cd devinpublic
npm install
npm run build
npm test
npm run typecheck| Script | Purpose |
|--------|---------|
| npm run build | Compile TypeScript to dist/ and resolve path aliases |
| npm run dip | Run the built CLI locally |
| npm test | Run the test suite (Vitest) |
| npm run test:watch | Tests in watch mode |
| npm run typecheck | Typecheck src/ and tests/ |
Project layout
src/cli.ts— CLI entry (Commander)src/actions/— Command actions (e.g.note-create)src/utils/— Shared helperstests/— Test files
Imports use the @/ alias mapped to src/ (see tsconfig.json).
Contributing
Contributions are welcome. Please open an issue to discuss larger changes before submitting a pull request. Ensure tests pass:
npm test
npm run typecheckLicense
MIT. SPDX: MIT (see package.json).
Acknowledgements
Built with Commander, TypeScript, and Vitest.
