@interactkit/cli
v0.0.1
Published
InteractKit Command Line Interface
Readme
InteractKit CLI
Command-line interface for bootstrapping and extending InteractKit bot applications.
Install / Run
You can invoke the CLI without installing globally:
npx interactkit create-appOr install globally (optional):
npm install -g @interactkit/cli
interactkit create-appAlternative entrypoints (aliases):
create-interactkit-app # same as: interactkit create-appCore Commands
| Command | Description |
|---------|-------------|
| interactkit create-app | Interactive wizard to scaffold a new bot app in a new folder. |
| interactkit add-bot [BotName] | Add a new bot (code, session handler, optional toolkit) to existing project. |
| interactkit add-tool <BotName> <ToolName> | Append a tool method to a bot's toolkit file. |
Run interactkit with no arguments to see usage.
Creating a New App
npx interactkit create-appGenerated Project Structure (example)
my-interactkit-bot-app/
package.json
tsconfig.json
.env.example
src/
index.ts # Entry – loads env, initializes SDK
config.ts # Bot registration array
bots/
MyBot/
MyBot.ts # Bot implementation
Session.ts # Session events handler
tools/
MyBotToolKit.ts # (if generated) Toolkit w/ sample toolsEnvironment Variables
Place required secrets in .env (never commit). The wizard populates .env.example based on selected modules. Always set:
INTERACTKIT_API_KEY=your_api_key_hereAdditional provider-specific variables appear in .env.example (e.g. model API keys). Only required or sensitive params are listed.
Development Workflow
Inside a generated app:
npm install # install deps
npm run dev # start with ts-node + nodemon
npm run build # emit dist/ JS
npm start # run compiled outputAdding Bots Later
From the root of an existing InteractKit project (must contain src/config.ts):
interactkit add-bot SupportBotThe wizard will prompt for module selections; it updates:
src/bots/SupportBot/*src/config.ts(imports & adds tobotsarray).env.example(merges new variables)
Adding Tools to a Bot
interactkit add-tool SupportBot my_new_toolInjects a new decorated method into that bot's toolkit file (creates imports if needed). The method returns a string placeholder you can modify.
