@lumpcode/cli-types
v0.0.12
Published
Types and defineX helpers for Lumpcode CLI lump config and command modules
Maintainers
Readme
@lumpcode/cli-types
TypeScript types and small defineX identity helpers for authoring Lumpcode lump configuration (config.ts / config.js) and command modules (.lumpcode/commands/<name>.ts or .js). Runtime is just identity functions; the value is purely the type hints.
Use alongside @lumpcode/cli for typed lump config and command modules. Install the CLI with
npm install -g @lumpcode/cli(Node 22+).
Install
npm install --save-dev @lumpcode/cli-typesUsage
config.ts (or config.js):
import { defineConfig } from '@lumpcode/cli-types';
export default defineConfig({
baseBranch: 'main',
contextListJson: { FILE: 'src/{NAME}.ts' },
prompt: { promptTemplate: 'Fix @{FILE}', command: 'copilot' },
});Command module (.lumpcode/commands/my-agent.ts or .js):
import { defineCommand, defineCommandSetup } from '@lumpcode/cli-types';
export const command = defineCommand(({ prompt }) => ({
executable: 'my-agent',
args: ['--message', prompt],
}));
export const setup = defineCommandSetup(async () => ({}));Lumpcode transpiles project .ts config, hooks, and command modules at load time. Shipped presets under ~/.lumpcode/commands/presets/ remain .js only.
What's exported
- Config helpers —
defineConfig,defineStep, hookdefine*helpers for lumpconfig.ts/config.js. - Command-module helpers —
defineCommandModule,defineCommand,defineCommandSetup,defineCommandTeardown. - Types — lump config and command-module shapes, plus engine types re-exported from @lumpcode/core.
Full list: types.md.
Docs
Field reference and hook signatures live in the CLI docs — see lump-config.md and commands.md.
Related packages
| Package | npm | Role |
| ------- | --- | ---- |
| @lumpcode/cli | npm | CLI: project setup, run, daemon, status |
| @lumpcode/core | npm | Engine API (runLump) |
| lumpcode | npm | Unscoped npm alias for @lumpcode/cli |
