JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q39893F
  • License MIT

🚀 The ultimate CLI coding assistant powered by AI - Generate code, analyze projects, and build applications with natural language commands

Package Exports

  • broke-cli
  • broke-cli/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (broke-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

🚀 Broke CLI - Ultimate Coding Assistant

The most powerful CLI coding assistant
Code, fix, debug, and create with AI at your fingertips

Version License Node

📑 Table of Contents

✨ Features

  • 🎯 Smart Code Analysis - Analyze and understand your codebase
  • 🔧 Auto-Fix - Automatically fix bugs and issues
  • 📝 Code Generation - Generate code from natural language descriptions
  • 🐛 Debug Assistant - Get help debugging complex issues
  • 🎨 Beautiful Terminal UI - Rich colors, animations, and modern design
  • 📊 Real-time Logs - Colored, structured logging with multiple levels
  • 🌐 AI Integration - Lightning-fast AI responses
  • 📁 File Context - Understand your project structure
  • 🔍 Smart Search - Find and analyze code patterns
  • 📚 Documentation - Generate and improve documentation
  • 🤖 Auto-Analysis - Automatically detect and analyze existing project structures
  • 🔄 Smart Updates - Intelligently update existing files while maintaining compatibility
  • 🎯 Project Detection - Auto-detect project types, frameworks, and dependencies
  • 📋 Intelligent Suggestions - Provide context-aware suggestions for improvements

🚀 Quick Start

Prerequisites

Installation

# Install globally
npm install -g broke-cli

# Verify installation
broke --version

# Test OpenRouter API connection
broke "Hello, how can you help me with coding?"

First Time Setup

# Create a .env file in the root directory
cp env.example .env

# Edit the .env file and add your OpenRouter API key
# Get your API key from https://openrouter.ai/keys
OPENROUTER_API_KEY=your-api-key-here

Basic Usage

# Start with interactive mode
broke

# Quick project overview
broke auto-analyze --summary

# Generate code
broke generate "Create a React component"

# Analyze existing code
broke analyze src/main.js

📋 Available Commands

🔍 Analysis Commands

  • broke analyze <file> - Analyze and review specific files
  • broke auto-analyze - Automatically analyze entire directory
  • broke auto-analyze --summary - Quick project overview
  • broke auto-analyze --update - Auto-update existing files
  • broke auto-analyze --interactive - Selective file updates
  • broke auto-analyze --fix - Auto-fix common issues
  • broke auto-analyze --create - Create missing essential files

🚀 Generation Commands

  • broke generate <description> - Generate code from description
  • broke generate <description> --project - Generate complete project
  • broke generate <description> --multiple - Generate multiple files
  • broke generate <description> --interactive - Interactive generation

🛠️ Fix & Debug Commands

  • broke fix <issue> - Fix specific issues in code
  • broke debug <problem> - Get debugging help
  • broke edit <file> - Edit files with AI assistance
  • broke edit-dir <directory> - Edit entire directories

📊 Utility Commands

  • broke logs - View command logs

📝 Utility Commands

  • broke prompt <text> - Direct AI prompt
  • broke help - Show help information
  • broke version - Show version information

🔍 Auto-Analyze Command

The new auto-analyze command automatically detects and analyzes your existing project structure:

# Quick overview of your project
broke auto-analyze --summary

# Auto-update existing files with improvements
broke auto-analyze --update

# Interactive mode for selective updates
broke auto-analyze --interactive

# Auto-fix common issues
broke auto-analyze --fix

# Create missing essential files
broke auto-analyze --create

What it does:

  • 🔍 Project Detection: Automatically identifies project type (React, Vue, Python, Java, etc.)
  • 📊 Dependency Analysis: Extracts and analyzes dependencies from package.json, requirements.txt, etc.
  • 🏗️ Framework Recognition: Detects frameworks and libraries in use
  • 💡 Smart Suggestions: Provides context-aware improvement suggestions
  • 🔄 Intelligent Updates: Suggests and applies improvements while maintaining compatibility
  • 📝 File Generation: Creates missing essential files (README, .gitignore, etc.)

💡 Examples

Analyze Existing Project

# Quick overview
broke auto-analyze --summary

# Full analysis with suggestions
broke auto-analyze

# Auto-fix common issues
broke auto-analyze --fix

Generate New Code

# Simple component
broke generate "Create a React button component"

# Complete project
broke generate "Build a REST API with Express" --project

# Multiple files
broke generate "Create a user authentication system" --multiple

Fix Issues

# Fix specific problem
broke fix "Fix the authentication bug in login.js"

# Debug issue
broke debug "Why is my API returning 500 errors?"

# Edit file with AI
broke edit src/components/Header.js

🔧 How It Works

The CLI is pre-configured with our API key, so you can start using it immediately after installation. No configuration files or API keys needed!

🚨 Troubleshooting

Common Issues

"Command not found"

# Reinstall globally
npm uninstall -g broke-cli
npm install -g broke-cli

# Or use npx
npx broke-cli --version```

# Or use npx
npx broke-cli --version

"Permission denied"

# On Unix systems, you might need sudo
sudo npm install -g broke-cli

# Or use nvm to avoid permission issues
nvm install node
nvm use node
npm install -g broke-cli

Getting Help

  • Run broke help for command overview
  • Check logs with broke logs
  • Visit our GitHub Issues

Why No Configuration?

The CLI comes pre-configured with our API key, so you can start using it immediately after installation. No setup, no configuration files, no API keys needed!

📚 Documentation

For detailed documentation and examples, visit:

🎯 Try It Out

We've included a demo script to showcase the auto-analyze features:

📄 License

This project is licensed under the MIT License.