bot-forge
v1.6.0
Published
CLI + MCP for Bot Forge — create and manage embeddable AI chatbots for any website.
Maintainers
Readme
bot-forge
CLI + MCP for Bot Forge — create and manage embeddable AI chatbots for any website, from your terminal or an AI agent.
Get an API key
Create one in the dashboard → API keys at https://bot.ops4ge.com/admin/keys. Scope a key to a single chatbot to limit its access.
CLI
# set your key:
export BOTFORGE_API_KEY=bf_live_your_key
# PowerShell: $env:BOTFORGE_API_KEY = "bf_live_..."# build & configure
npx bot-forge create acme.json # create/update from a JSON file
npx bot-forge set acme branding.greeting="Hi!" # update individual fields
npx bot-forge domains acme https://acme.com,https://www.acme.com # set embed domains
npx bot-forge delete acme --yes # delete a chatbot
# knowledge (RAG)
npx bot-forge knowledge acme faq.txt # ingest ('-' = stdin)
npx bot-forge knowledge list acme # list stored chunks
npx bot-forge knowledge clear acme --yes # clear all chunks
# inspect & verify
npx bot-forge whoami # verify key + list chatbots
npx bot-forge list # list chatbots
npx bot-forge get acme # show config
npx bot-forge models # valid model ids per provider
npx bot-forge test acme "what are your hours?" # ask the bot, print its reply
npx bot-forge leads acme # list captured leads
npx bot-forge embed acme # print the <script> embed snippet
# agents
npx bot-forge prime # print the /prime onboarding promptRun npx bot-forge help for the full list. Install globally for a bare
bot-forge command: npm i -g bot-forge.
Security: set each chatbot's allowed domains (
domainscommand orallowedDomainsin JSON). A chatbot with no allowed domains is locked to same-origin only;*allows any site (use for public demos only).
Env: BOTFORGE_API_KEY (required), BOTFORGE_URL (optional, defaults to
https://bot.ops4ge.com). A .env / .env.local in the current folder is loaded
automatically.
MCP (AI agents)
The recommended way to use Bot Forge with an agent is the hosted MCP server — nothing to install. One line (works in bash, zsh, and PowerShell):
claude mcp add --transport http bot-forge https://bot.ops4ge.com/api/mcp --header "Authorization: Bearer bf_live_your_key"For an offline/local stdio MCP server, this package also ships a
bot-forge-mcp bin:
claude mcp add bot-forge -e BOTFORGE_API_KEY=bf_live_your_key -- npx -y -p bot-forge bot-forge-mcpTools: whoami, list_models, list_chatbots, get_chatbot, create_chatbot,
patch_chatbot, delete_chatbot, add_knowledge, list_knowledge,
delete_knowledge, test_message, list_leads, get_embed_snippet. The
server's initialize instructions explain the lifecycle, models, the chat SSE
protocol, and the security model up front.
/prime — build a bot from a codebase
Connect the MCP in a client's repo and run npx bot-forge prime (or the /prime
slash command): the agent studies the codebase, drafts the bot's facts, detects
the production domain for allowedDomains, creates the bot, and verifies it with
test_message — then hands you the embed snippet.
License
MIT
