hanabi-cli
About
A terminal AI chat interface for any LLM model, with file context, MCP, and deployment support.
Details
- Author
- cashsun
- Categories
- Developer Tools, AI
Jump to
Setup
Install hanabi-cli in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/cashsun/hanabi
Follow the installation instructions in the repository README, then restart your MCP client.
⟡ A terminal AI chat interface for any LLM model, with file context, MCP and deployment support.
- Local multi skilled agent with files, clipboard & MCP support
- Project folder scoped - different agent per project
- Host your agent web chat UI (Next.js) from command line in seconds and ready for deployment
- Create a multi-agent cluster with predefindstrategies.
- CheckoutHanabi Config Filefor full list of features.
- Install
- CLI
- Default Model
- MCP Servers
- Exclude files
- Local envs
- Custom System Prompt
- Local config file override
- Streaming Mode
- Answer Schema (Deterministic Output Format)
- Web Chat UI Server (with APIs)
- Advanced - Multi Agents System
- Advanced - Deploy Your Agent
- TODOs
Ask single question and print result. (Yes Hanabi auto injects today's date and timezone for you as context)
$ hanabi ask "how's the weather tomorrow?" $ hanabi ask "generate a react todo app" > ./todo-app-instructions.md
The default model is the active model to be used byhanabi-cli. This should be set up for you via CLi interface. Please note the default temperature is0.5. Some models like GPT-5 requires temperature to be set to1. Temperature config is added inhanabi-cliin version1.4.6.
You can also modify the model directly. In your<user home folder>/.hanabi.json, add or modify thedefaultModelobject:
{ "llms": [ { "id": "fdd1abc5-6791-4c29-b754-4f1174692c22", "provider": "OpenAI", "apiKey": "your-api-key", "apiVersion": "2025-01-01-preview" }, ], "defaultModel": { "provider": "openai", "model": "gpt-4", "temperature": 0.7 } }
In your<user home folder>/.hanabi.json, addmcpServersconfig.
{ "llms": [ // ... ], "defaultModel": { // ... }, "mcpServers": { "home-ai": { "name": "Home AI", "transport": "stdio", "command": "node", "args": ["c:/folder/home-mcp.js"] }, "context7": { "name": "context7", "transport": "stdio", "command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"] }, "browser-use": { "name": "Browser-use automation", "transport": "sse", "url": "http://172.17.0.1:3003/sse", "headers": { "authentication": "Bearer api-token" } }, // npx stdio approach is flaky & slow. highly recommend // to npm install -g <mcp-server> and use the following. // see https://github.com/modelcontextprotocol/servers/issues/64 // "file-system": { // "name": "file system", // "transport": "stdio", // "command": "path/to/your/node.exe", // "args": [ // "path/to/global/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js", "."] // }, "tavily": { "name": "Tavily Search", "transport": "stdio", "command": "npx", "env": { "TAVILY_API_KEY": "your-api-key" }, "args": ["-y", "tavily-mcp@0.1.4"] }, // npx is slow! use above recommendation "file-system": { "name": "file system", "transport": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "."] }, "my-calendar": { "name": "My Calendar", "transport": "streamable_http", "url": "http://172.17.0.1:3001/mcp", "headers": { "authentication": "Bearer my-auth-token" } } } }
To prevent files from being accessed, addglobbypatterns in the config
All files included in the .gitignore will also be auto excluded.
// <user home folder>/.hanabi.json { "exclude": ["certificates", "screenshots//", "passwords/", ".pid"], "llms": [ // ... ], "defaultModel": { // ... } }
Hanabi supports local dot env files (.env). You can also addenvsfield to.hanabi.json. usefile://prefix URL to inject file content as env variable Supports only plain text files e.g..json,.txt,.htmletc. To inject PDF file content into process.env, convert them to text files by using something likepdf2json.
addALLOWED_ORIGINenv to add cors protection for the API server.
// .hanabi.json { "envs": { "FOO": "bar", "MY_DOC: "file://./README.md", "ALLOWED_ORIGIN": "http://localhost:3042" }, "llms": [ // ... ], "defaultModel": { // ... } }
If you do not want to store provider api key or any other tokens in.hanabi.json, delete theapiKeyfields and save them inside working directly.envinstead. Key names are as below. seeProvidersor.env.examplefor api key env names.
OPENAI_API_KEY=xxx GOOGLE_GENERATIVE_AI_API_KEY=xxx DEEPSEEK_API_KEY=xxx ANTHROPIC_API_KEY=xxx GROQ_API_KEY=xxx XAI_API_KEY=xxx # MCP keys TAVILY_API_KEY=xxx
Hanabi comes with predefined simple system prompt to show docs on terminal commands and provide date & timezone context. You can provide extra system prompt inhanabi.system.prompt.mdat working directory. Use/genhandle orhanabi gento generate one for you.
Variables are supported via${VAR_NAME}syntax, they are read from process.env. seeLocal envs.
# act as a polite chat bot collecting user feedback via conversational loop. ## context Product name is ${PRODUCT_NAME} ## ask user the follwing questions one by one and prints a well formatted report - What is your name - How do you feel about our product? (classify answer as "Bad" | "OK" | "great") - What is your company
You can copy<user home folder>/.hanabi.jsonto your working directly (e.g. project level) to override user level config. LLMs are merged by provider name. Use/genorhanabi genhandle to generate one for you.
Toggle"streaming":trueat<user home folder>/.hanabi.jsonor the one at working directory.
It's quite important for workflow agent to output answer in a deterministic schema, e.g when asking agent to generate API call payload. To achieve that, defineanswerSchemathat's Zod schema compliant in the config file.
- cli chat answers when @schema handle is active
- cli single question modehanabi ask "list top 10 movies in 2023" > output.json
- Web UI chat with toggle
- server APIs e.g./api/generate
Use/genhandle orhanabi gento generate one for you.
- https://ai-sdk.dev/docs/reference/ai-sdk-core/json-schema
- https://v4.zod.dev/json-schema#metadata
// .hanabi.json { "answerSchema": { "type": "object", "required": ["answer"], "properties": { "reason": { "type": "string", "description": "detailed reasoning for the final output." }, "answer": { "type": "string", "description": "the final output without reasoning details. For math related question, this is the final output number." } } }, "serve": { ... }, "llms": [ // ... ], "defaultModel": { // ... } }
It's recommended to create a local.hanabi.jsonfor independent chat server
In Hanabi cli, use/serveto start the web server with current context (MCPs & system prompt). This will saveserveconfig to your.hanabi.json.
Usehanabi serveto start the web UI server directly - useful for deployments. UseapiOnlyto disable chat UI.
// .hanabi.json { "serve": { "mcpKeys": ["home-ai"], "port": 3041, / name of the agent / name?: string; / disable chat UI and only expose API endpoints / apiOnly?: boolean; }, "llms": [ // ... ], "defaultModel": { // ... } }
You can orchestrade multiple (remote) agents in variousstrategies or patterns
- In the cli chat, use@agentshandle to activate.
- In web UI chat, multi agents mode is always enabled if set in.hanabi.json
- Only the final worker agent's response will be streamed to the UI.
Currently hanabi supports the following strategy types
seeHanabi Config Filefor more details on this strategy.
- Use/genhandle orhanabi gento generate one for you.
// .hanabi.json { "multiAgents": { "strategy": "routing", / default false - question with no classification will be passed through to routing agent / "force": false, "agents": [ { "name": "calendars", "apiUrl": "http://localhost:3051/api", "classification": "school calendar events and UK public holiday" }, { "name": "math", "apiUrl": "http://localhost:3052/api", "classification": "math problem" }, { "name": "api-doc", "apiUrl": "http://localhost:3053/api", "classification": "API document" } ] }, "llms": [ // ... ], "defaultModel": { // ... } }
workflow (i.e. run worker agents sequentially)
seeHanabi Config Filefor more details on this strategy.
- in this mode, chat history is ignored. Each user message triggers a new, independent workflow.
- Use/genhandle orhanabi gento generate one for you.
// .hanabi.json { "multiAgents": { "strategy": "workflow", "steps": [ { "apiUrl": "http://localhost:3051/api", "name": "process user email into trade instruction" }, { "apiUrl": "http://localhost:3052/api", "name": "trade booking with payload" } ] }, "llms": [ // ... ], "defaultModel": { // ... } }
seeHanabi Config Filefor more details on this strategy.
- send user query to multiple agents for different types of tasks inparalleland output aggregated summary.
- Use/genhandle orhanabi gento generate one for you.
// .hanabi.json { "multiAgents": { strategy: 'parallel', agents: [ { name: 'code quality agent', apiUrl: 'http://localhost:3051/api', prompt: 'Review code structure, readability, and adherence to best practices.', }, { name: 'code performance agent', apiUrl: 'http://localhost:3052/api', prompt: 'Identify performance bottlenecks & memory leaks.', }, { name: 'code security agent', apiUrl: 'http://localhost:3053/api', prompt: 'Identify security vulnerabilities, injection risks, and authentication issues', }, ], }, "llms": [ // ... ], "defaultModel": { // ... } }
Seedocker-agent-examplefolder to see how to deployment your agent as a docker image.
- include local files in chat
- mcp support
- add config to exclude custom files pattern
- support for custom system prompt (via local .md file)
- support working dir level.hanabi.jsonoverride, smililar to how .npmrc works
- streaming mode
- add web server chat bot mode (ie api and web interface)
- improve web server mode (API keys, UX improvements, Update UI mode readme)
- Multi Agent System(WIP)
- web ui file support
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
MCP bridge that lets Claude Code delegate heavy tasks to the Antigravity CLI (agy) — purpose-built tools, model routing with fallback, session continuity, and output truncation to save Claude's context and tokens.
Local agent workbench bundling OpenHands, Goose, Aider, and ashlrcode against one local LLM, with ashlr-plugin MCP servers pre-wired.
A collection of MCP servers that provide cognitive enhancement tools for large language models.
Transforms linear AI reasoning into structured, auditable thought graphs, enabling language models to externalize their reasoning process as a directed acyclic graph (DAG).
An open-source desktop application for hosting MCP servers that integrates with function-calling LLMs.
Unified MCP server providing access to Claude Code, Codex, and Gemini CLIs through a single gateway. Features multi-LLM orchestration, persistent session management, async job execution with polling, approval gates, retry with circuit breakers, and token optimization. Install: npx -y llm-cli-gateway
a complete and intuitive SDK for building MCP Servers, MCP Agents, and LLM integrations (OpenAI, Claude, Gemini) with minimal effort. It abstracts all the complexity of the MCP protocol, provides an intelligent agent with automatic model routing, and includes a universal client for external APIs all through a single, simple, and powerful interface. Perfect for chatbots, enterprise automation, internal system integrations, and rapid development of MCP-based ecosystems.
A CLI host application that enables Large Language Models (LLMs) to interact with external tools through the Model Context Protocol (MCP).
A TypeScript agent that integrates MCP servers with Ollama, allowing AI models to use various tools through a unified interface.
Tools for logging, analyzing, and improving Claude Desktop prompts to enhance prompt engineering skills.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




