CLI On this page add Add a tool to an existing ChatJS project
npx @chat-js/cli@latest add [tools...] [options]
# Install a single tool
npx @chat-js/cli@latest add word-count
# Install multiple tools, skip confirmation
npx @chat-js/cli@latest add word-count pdf-summary --yes
# Use a local registry (monorepo development)
npx @chat-js/cli@latest add word-count \
--registry ./packages/registry/items/{name}.json \
--cwd apps/chat
For each tool name, the command:
Fetches {name}.json from the registry
Recursively resolves any registryDependencies
Writes the tool’s files into your project (under the path configured in chat.config.ts)
Installs any npm dependencies the resolved items declare
Warns if the installed items declare missing environment variables
Injects imports and registrations into the CLI-managed registry files at tools/chatjs/tools.ts and tools/chatjs/ui.ts by default
Was this page helpful?
Thanks for your feedback!
Previous create Next config