A versatile CLI tool built with Bun and TypeScript that provides AI-powered modes for code assistance, planning, and Telegram integration.
- CLI Mode β Agent, Plan, and Ask sub-modes for code assistance
- Telegram Mode β Interact with the AI through a Telegram bot
- AI-Powered β Uses NVIDIA AI models through the NVIDIA API
- Web Search β Optional Firecrawl integration for web research
- Safe Operations β Changes can be staged and require approval before being applied
- Tool Calling β AI agents can inspect and work with the project through configured tools
- Plan Mode β Research a codebase and generate implementation plans
- Bun installed
- NVIDIA API key β required
- Firecrawl API key β optional, for web search
- Telegram Bot Token β optional, for Telegram mode
bun installTo use cli-build as a global command from any directory, link the project using Bun:
bun linkAfter installing dependencies, configure the CLI using the following commands:
# NVIDIA configuration
cli-build config set nvidia-api-key "your_nvidia_api_key_here"
cli-build config set model "nvidia/nemotron-3-super-120b-a12b"
# Fallback model if the primary model is unavailable
cli-build config set model "nvidia/nemotron-3-ultra-550b-a55b"
# Firecrawl - Web Search
cli-build config set firecrawl-api-key "your_firecrawl_api_key_here"
# Telegram Mode
cli-build config set telegram-bot-token "your_telegram_bot_token_here"
cli-build config set telegram-owner-id "your_telegram_user_id_here"Create a .env file in the project root.
You can use .env.example as a template:
# Required
NVIDIA_API_KEY=your_nvidia_api_key_here
# Optional but recommended
FIRECRAWL_API_KEY=your_firecrawl_api_key_here
# Optional - for Telegram mode
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
TELEGRAM_OWNER_ID=your_telegram_user_id_here
# NVIDIA Models
NVIDIA_DEFAULT_MODEL=nvidia/nemotron-3-super-120b-a12bIf the primary model is unavailable, you can change the value to:
NVIDIA_DEFAULT_MODEL=nvidia/nemotron-3-ultra-550b-a55b
If a value is configured in both CLI configuration and .env, CLI configuration takes priority.
Keep your real API keys and tokens private. Never commit
.envor~/.cli-build/config.jsonto Git.
cli-build wakeup When you start the application, you can choose between:
- CLI Mode β Access Agent, Plan, and Ask modes
- Telegram Mode β Interact with the AI through Telegram
- Exit β Quit the application
Ask questions about your codebase or programming topics.
- Select Ask Mode
- Enter your question
- The AI analyzes the available context and tools
- Receive an AI-generated answer
- Optionally save the response if supported
Best for: Quick questions, explanations, debugging, and codebase exploration.
Create step-by-step implementation plans for larger tasks.
- Select Plan Mode
- Enter your goal
- The AI researches the relevant parts of the workspace
- Review the generated implementation plan
- Select the steps you want to execute
- Confirm before implementation
Example:
Create a REST API for user management
Best for: New features, architectural changes, and complex implementation tasks.
Give the AI a concrete coding task and let it work through the task using available tools.
- Select Agent Mode
- Enter a concrete task
- The agent analyzes the workspace
- The agent performs the required operations
- Review changes before applying them
Example:
Add error handling to the login function
Best for: Coding tasks, refactoring, debugging, and project modifications.
Interact with the AI through Telegram.
- Select Telegram Mode
- The bot starts using your configured Telegram credentials
- Open your Telegram bot
- Send messages normally
- Press
Ctrl+Cin the terminal to stop the bot
Requires:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
TELEGRAM_OWNER_ID=your_telegram_user_id_hereThe model can be configured through CLI configuration or environment variables:
cli-build config set model "nvidia/nemotron-3-super-120b-a12b"Alternative model:
If nvidia/nemotron-3-super-120b-a12b is unavailable or fails, configure:
cli-build config set model "nvidia/nemotron-3-ultra-550b-a55b"For .env configuration:
NVIDIA_DEFAULT_MODEL=nvidia/nemotron-3-super-120b-a12bIf needed, replace it with:
NVIDIA_DEFAULT_MODEL=nvidia/nemotron-3-ultra-550b-a55b| Variable | Purpose |
|---|---|
NVIDIA_DEFAULT_MODEL |
Model used by default for Ask and Agent modes |
FIRECRAWL_API_KEY |
Enables optional web search |
TELEGRAM_BOT_TOKEN |
Enables Telegram integration |
TELEGRAM_OWNER_ID |
Restricts Telegram access to the configured user |
You can replace the NVIDIA model IDs with other compatible models supported by your configuration.
If you want to use paid AI models or a different AI provider, you can change the AI provider and model configuration in:
ai/ai.config.ts
- Staging Area β Changes can be staged before applying them
- Approval Flow β Changes require user approval where configured
- Limited Permissions β Read-only tonols are available where appropriate
- Step Limits β Limits agent iterations to help prevent runaway execution
- Tool Restrictions β Different modes expose different tool capabilities
cli/
βββ index.ts # Main entry point
βββ package.json # Dependencies and scripts
βββ .env.local # Environment variable template
βββ tui/ # Terminal UI components
β βββ wakeup.ts # Banner and mode selection
β βββ terminal-md.ts # Terminal Markdown rendering
βββ modes/ # Application modes
β βββ agent/ # Agent mode
β βββ plan/ # Plan mode
β βββ ask/ # Ask mode
β βββ telegram/ # Telegram mode
β βββ cli.ts
βββ ai/ # AI provider and model configuration
The CLI supports both CLI configuration and .env configuration.
For .env, check that:
.envexists in the project root.NVIDIA_API_KEYis set correctly.- The API key is valid.
- You restarted the CLI after changing environment variables.
You can safely check whether Bun sees the key without printing it:
bun -e "console.log(Boolean(process.env.NVIDIA_API_KEY))"It should print:
true
Check:
- Your Telegram bot token is correct.
TELEGRAM_OWNER_IDcontains the correct numeric Telegram user ID.- You have started a conversation with the bot.
- The bot is running in Telegram mode.
Response time depends on the selected model, request size, tool usage, reasoning configuration, and current API/server conditions.
For example, different NVIDIA models can have significantly different response times.
If a model consistently responds slowly, try another compatible NVIDIA model.
Set through CLI:
cli-build config set firecrawl-api-key "your_firecrawl_api_key_here"Or use .env:
FIRECRAWL_API_KEY=your_firecrawl_api_key_hereThen restart the CLI.
Run:
cli-build wakeupThen:
- Select CLI Mode
- Select Ask Mode
- Ask:
What is 2+2?
If the AI responds successfully, your NVIDIA configuration is working.
You can then test Plan Mode:
Explain how to create a basic HTTP server
Finally, test Agent Mode with a small, safe task.
For your first run:
bun install
bun link
cli-build wakeupThen try:
- Ask Mode β Ask a simple programming question
- Plan Mode β Create an implementation plan
- Agent Mode β Give the agent a small coding task
- Telegram Mode β Connect your Telegram bot if configured
Built with Bun, TypeScript, and NVIDIA AI.