First, thank you for your interest in contributing to the Toolpack SDK CLI!
This CLI serves as the front-line interactive tool for the main Toolpack SDK. All contributions, from bug fixes and documentation improvements to new screen modes and commands, are welcome.
The toolpack-cli is built using a combination of technologies designed to bring a React-like reactive experience to the terminal:
- Ink: Provides the core React reconciler for the terminal, allowing us to build TUI components logically using JSX.
- React: Manages the component lifecycle and context providers (
ToolpackContext,ConversationContext). - TypeScript: The entire codebase is strongly typed.
source/components/: Reusable UI elements (Buttons, Layouts, Selectors).source/commands/: Chat slash-commands (e.g./help,/mode,/tool-log). If you want to add a new command, register it here.source/screens/: High-level views (Home vs. Chat).source/context/: React context providers managing the state between the CLI and the underlyingtoolpack-sdk.
-
Clone the repository:
git clone https://github.com/toolpack-ai/toolpack-cli.git cd toolpack-cli -
Install dependencies: Ensure you have Node.js 20+ installed.
npm install
-
Set up Environment: Copy the example environment file:
cp .env.example .env
Add at least one API key (e.g.
TOOLPACK_OPENAI_KEY) so the CLI can function. Local Ollama instances work without keys. -
Run in Development Mode:
npm run dev
This will start
tsx --watchso the CLI automatically restarts when you save file changes.
Before submitting a Pull Request, please ensure the code lints and builds correctly:
-
Format and Lint:
npm run testWe use
xofor linting andprettierfor formatting.avais set up for basic tests. -
Build:
npm run build
This outputs to
dist/, which is executed by the actualtoolpackglobal bin command.
- Fork the repository and create your branch from
main. - Ensure any new functionality includes updated documentation in
README.mdand/or inline JSDoc comments. - Reference any related issues in your PR description.
- Keep your PR scope focused to make it easier to review.
We're excited to see what you build!