A small, opinionated TypeScript template for building task pipelines and CLI tools. Includes linting, formatting, testing and a simple project structure to get started quickly.
- Language: TypeScript
- Runtime: Node.js (see engines in
package.json) - Purpose: Task pipeline template and CLI skeleton
- Node.js (recommended version: 24.x —
package.jsonspecifiesnode: 24.9.0) - npm (bundled with Node) or a compatible package manager
- Install dependencies:
npm install- Prepare Husky (git hooks):
npx husky installThe project ships with a few npm scripts. You can run them with npm run <script>.
npm run start— run the project directly usingts-node(development CLI entrypoint)npm run build— compile TypeScript usingtscnpm run test— run Jest tests (looks fortest/**/*.test.ts)npm run lint— run ESLint onsrcnpm run lint:fix— run ESLint with--fixnpm run prettier— run Prettier and format files
Example:
npm run test
npm run lintTop-level layout (important files/folders):
README.md
package.json
tsconfig.json
src/
index.ts # CLI entrypoint
application/ # use-cases and services
domain/ # domain entities and abstractions
infrastructure/ # concrete implementations (services, tasks)
test/ # unit & integration tests
Look at src/index.ts for the CLI bootstrap and src/application/use-cases/execute-workflow.ts for an example flow.
Run the CLI (development):
npm run startIf you compiled the project with npm run build, run the generated JS via node against dist (if you configure outDir in tsconfig.json).
Run the test suite with Jest:
npm run testThere are example unit tests under test/unit (for instance test/unit/domain/entities/video.file.test.ts).
This repo uses ESLint and Prettier. Husky + lint-staged are configured to run linters and Prettier on staged files before commit.
Fix lint issues and format files automatically:
npm run lint:fix
npm run prettier- Fork the repo and create a branch for your change.
- Run tests and linters locally.
- Open a pull request with a clear description of the change.
Husky is configured to run lint-staged pre-commit hooks; ensure linting and tests pass before pushing.
Lino Rama — [email protected]
Project: https://github.com/ljramac/tasks-pipeline-template
ISC