Point uptask at a glob. Every function exported from a matching file becomes
a CLI command — argument names, types, defaults, optional flags, and --help
descriptions are all derived from the function's signature and JSDoc. No
decorators, no boilerplate, no config required — just write functions.
pnpm add -D uptask
# or
npm install --save-dev uptaskThe default scan pattern is @*.ts. Create one anywhere in your project:
/**
* Build the project.
*
* @param target Build target name
* @param watch Enable watch mode
* @param concurrency Number of parallel builds
*/
export function build(
target: string,
watch: boolean = false,
concurrency: number = 4,
) {
console.log({ target, watch, concurrency })
}Required positional types (string, number) become arguments. Optional or
boolean parameters become --flag options. JSDoc descriptions surface in
--help.
A minimal uptask.config.ts at the project root:
import { defineConfig } from "uptask"
export default defineConfig({
// pattern: "@*.ts" by default
// groups: [] by default — see "Groups"
})The config is optional. Without one, uptask uses sensible defaults derived from
package.json.
Add a bin entry or run via pnpm exec:
pnpm exec uptask --help
pnpm exec uptask build my-target --watchEach exported function gets --help of its own — argument descriptions and
default values come straight from the JSDoc and the parameter signature.