Skip to main content

Local CLI

Local CLI commands execute directly in your local Node.js process. No network requests, instant execution.

Configuration​

Add a local CLI entrypoint to pikku.config.json:

{
"cli": {
"entrypoints": {
"my-cli": [
{
"type": "local",
"path": ".pikku/cli-local.gen.ts"
}
]
}
}
}

Run npx pikku to generate the CLI executable at .pikku/cli-local.gen.ts.

Usage​

node .pikku/cli-local.gen.ts greet Alice
node .pikku/cli-local.gen.ts user create alice@example.com

Or add to package.json:

{
"scripts": {
"cli": "node .pikku/cli-local.gen.ts"
}
}

Then run:

yarn cli greet Alice
yarn cli user create alice@example.com

That's it. Local CLI runs your functions locally.