Skip to content
DamianRavinduPeirisPublic

About

Bolt is an agentic command-line interface that leverages AI to convert natural language instructions into shell commands and execute them.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bolt

image

Bolt is an agentic shell command executor powered by AI. Describe any task in natural language, and Bolt generates and runs the appropriate shell commands safely and with your confirmation.

Quick Start

Requirements: Java 21+ and an AI service (Azure OpenAI).

  1. Clone the repo

    git clone https://github.com/DamianRavinduPeiris/bolt-cli.git
    cd bolt-cli
  2. Configure AI — Create config.json in the project root:

    {
      "azureOpenAI": {
        "endpoint": "https://your-resource.openai.azure.com/",
        "apiKey": "your-api-key",
        "deploymentName": "gpt-4-turbo"
      }
    }
  3. Run Bolt (builds the JAR automatically)

    bolt.bat run "Bootstrap a React project using Vite"

Usage

Bootstrap frameworks with natural language. Bolt generates and confirms commands before executing.

# Bootstrap a React project with Vite
bolt.bat run "Bootstrap a React project using Vite"

# Bootstrap with target directory
bolt.bat run "Bootstrap a Next.js project with TypeScript" --path ./my-nextjs-app

# Preview commands before executing (dry-run)
bolt.bat run "Bootstrap an Angular project with TypeScript" --dry-run

# Bootstrap without confirmation prompt
bolt.bat run "Bootstrap a Vue.js project with TypeScript" --yes

# Bootstrap with verbose output
bolt.bat run "Bootstrap a Svelte project with TypeScript" --verbose

# Combine options
bolt.bat run "Bootstrap a Nuxt.js project" --path ./my-nuxt-app --yes

Or use the JAR directly:

java -jar target/bolt-cli-1.0-SNAPSHOT.jar run "Bootstrap a Next.js project" --path ./dir

Options

Option Short Description
--path <dir> -p Directory where commands execute (default: current directory)
--yes -y Skip confirmation prompt
--dry-run — Print commands only; do not execute
--verbose -v Verbose output

How It Works

  1. You describe a task in natural language
  2. AI generates the appropriate shell commands
  3. Bolt displays the commands and asks for confirmation (unless --yes or --dry-run)
  4. Commands execute sequentially in the specified directory
  5. Output streams to your terminal in real-time

Safety

  • Confirmation by default: Review commands before they run
  • Dangerous commands blocked: rm -rf /, curl ... | sh, format C: and similar are rejected
  • Dry-run mode: Preview commands with --dry-run (never executes)
  • Exit codes: Non-zero exit stops the command sequence

Examples

  • Create projects: "create a Next.js app with TypeScript"
  • Install dependencies: "npm install"
  • Setup tools: "configure Git with my name and email"
  • File operations: "create a monorepo folder structure"
  • Environment setup: "install Node.js dependencies and build"

Configuration

Place config.json in the project root. No environment variables or CLI overrides.

{
  "azureOpenAI": {
    "endpoint": "https://your-resource.openai.azure.com/",
    "apiKey": "your-api-key",
    "deploymentName": "gpt-4-turbo"
  }
}

⚠️ Do not commit config.json with your API key. Add it to .gitignore.

Building

mvn clean package

Output: target/bolt-cli-1.0-SNAPSHOT.jar

About

Bolt is an agentic command-line interface that leverages AI to convert natural language instructions into shell commands and execute them.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages