@interactkit/cli
v0.2.16
Published
CLI for InteractKit — codegen, scaffolding, build, and dev server
Readme
@interactkit/cli
CLI tool for InteractKit projects. Scaffolding, codegen, building, and running.
Install
pnpm add -D @interactkit/cliCommands
interactkit init <name> Create a new project
interactkit add <entity|llm|component> <Name> Generate an entity file
interactkit build [-p tsconfig] [-o outDir] Codegen + tsc + deployment plan
interactkit dev [-p tsconfig] [-o outDir] Build + run + watch (restarts on changes)
interactkit start [-e entry] Run the built appinit
Scaffolds a new InteractKit project with package.json, tsconfig, config, root entity, and entry point:
interactkit init my-agent
cd my-agent && pnpm install && pnpm build && pnpm startadd
Generates entity files from templates:
interactkit add entity Brain # basic entity with @Hook onInit
interactkit add llm Assistant # extends LLMEntity with @SystemPrompt, @Executor, @Tool
interactkit add component Memory # entity with @Configurable + process methodbuild
- Codegen — scans entity source files via ts-morph, generates
.interactkit/generated/type-registry.ts - Validation — checks entity refs, LLM config, hook params at build time
- Deployment plan — generates
.interactkit/generated/deployment.json - Bootstrap — generates
_entry.tsthat sets the registry singleton - Compile — runs
tsc→.interactkit/build/
dev
Runs build, starts the app, and watches for changes. Automatically rebuilds and restarts on file changes.
start
Runs the built app from .interactkit/build/src/_entry.js.
Build-time validation
The codegen catches:
- Unknown component entity types
@Reftargets not reachable as siblings@Hookmethods without typed parametersLLMEntitysubclass missing@Executor- Orphaned LLM decorators without
extends LLMEntity @Component/@Refon remote pubsub entity missingRemote<T>@Hook(non-inProcess) on remote pubsub entity missingRemote<Input>
