System Requirements
incur requires Node.js 18.0.0 or later and TypeScript 5.0 or later.
- Node.js 18+ (check with
node --version) - A package manager (npm, pnpm, or bun)
- TypeScript 5.0+ in your project
Install incur
Choose your package manager:Verify Installation
Create a simple test file to verify incur is working:test.ts
TypeScript Configuration
incur works best with thesetsconfig.json settings:
tsconfig.json
The
moduleResolution: "bundler" setting is recommended for best compatibility with incur’s ESM exports.Project Setup
For a new CLI project
- Initialize your project:
- Update
package.json:
package.json
- Create your CLI entry point:
src/index.ts
- Run in development:
For an existing project
Simply install incur and import it:Build and Distribution
Compile to JavaScript
Build your CLI for distribution:dist/index.js which can be executed directly:
Test locally
Link your CLI globally for testing:Publish to npm
Once ready, publish your CLI:Troubleshooting
Module not found errors
Module not found errors
Ensure your
package.json has "type": "module" and your tsconfig.json uses "module": "ESNext".Zod import errors
Zod import errors
incur re-exports Zod, so always import from
incur:TypeScript errors with generics
TypeScript errors with generics
Make sure you’re using TypeScript 5.0 or later. incur relies on modern TypeScript features for type inference.
Next Steps
Quickstart Tutorial
Build your first CLI with commands and options
Core Concepts
Learn about commands, schemas, and output formats

