func-template
v1.1.1
Published
Default project template for creating TypeScript command-line tools with [func](https://github.com/unix/func).
Readme
func-template
Default project template for creating TypeScript command-line tools with func.
Features
- Decorator-based command classes.
- Typed flags, values, repeated values, and validators.
- Top-level
--helpand--versionhandlers. - Command aliases and path handlers.
- Missing-command and runtime-print error handlers.
- Service injection through
@FuncModule. - Centralized template settings in
src/config.ts. - A source-only template that builds into a small CLI output.
Get Started
Install dependencies after the project has been created:
npm installRun the CLI from the TypeScript source:
npm run dev --
npm run dev -- --help
npm run dev -- greet --name func
npm run dev -- greet shout --name funcBuild the distributable CLI:
npm run buildfuncgo build writes the bundled output to dist and creates dist/bin.js.
The template itself stays source-only; generated files are not part of the
default template copied by npm init func.
For the file-by-file guide, see template-readme.md.
