Skip to content
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 RunAnywhere CommandBrain

An offline-first command memory + execution copilot. Never repeat the same command twice.

🌐 Live at smart-terminal.onrender.com

CommandBrain is a React + TypeScript browser app that transforms natural language into executable system commands. Built locally-first with @runanywhere/web + WebAssemblyβ€”your data stays on your machine.

Why This Exists

I noticed I was repeating the same ChatGPT prompts again and again. Instead of re-explaining context every time, I built CommandBrain to remember commands locally and execute/refine them instantly without repeating the full conversation.


πŸ’Ύ What Gets Stored (Local Database)

IndexedDB (CommandBrainDB)

Everything is stored locally in your browser:

{
  "commands": [
    {
      "id": "cmd_1",
      "prompt": "download youtube video",
      "generated": "yt-dlp \"<VIDEO_URL>\"",
      "safety": "caution",
      "category": "Media",
      "timestamp": 1710614400000
    }
  ],
  
  "favorites": [
    {
      "commandId": "cmd_1",
      "nickname": "YouTube Download",
      "folder": "Media Tools",
      "tags": ["video", "download", "yt-dlp"],
      "notes": "Best for video extraction and audio conversion"
    }
  ],
  
  "macros": [
    {
      "id": "macro_1",
      "name": "Batch Download",
      "description": "Download multiple videos",
      "commandIds": ["cmd_1", "cmd_2"],
      "runCount": 5
    }
  ],
  
  "patterns": [
    { "category": "Media", "count": 12 },
    { "category": "DevOps", "count": 8 },
    { "category": "Files", "count": 5 }
  ],
  
  "reminders": [
    {
      "commandId": "cmd_1",
      "frequency": "high",
      "lastRun": 1710614300000,
      "snoozed": null
    }
  ]
}

localStorage (Session Data)

{
  "commandbrain_bridge_config": {
    "bridgeUrl": "http://localhost:8888",
    "enabled": true
  },
  "commandbrain_reminder_snooze_map": {
    "cmd_1": "2026-03-24T00:00:00Z"
  }
}

πŸ”’ Zero cloud sync. Everything stays in your browser's local database.


✨ What You Get

πŸ—£οΈ Natural Language Input

Describe what you want in plain English. CommandBrain generates the right command automatically.

πŸ›‘οΈ Safety First

Classify commands as safe, caution, or dangerous. Preview before execution.

πŸ’Ύ Saved Commands

Organize with folders, tags, notes. Search and filter. Never lose a command again.

πŸ“Š Analytics

Track patterns, trends, and execution stats over time with visual charts and tables.

πŸ”” Smart Reminders

Auto-suggest frequently used commands. Snooze for 1 or 7 days with one click.

🎬 YouTube Specialist

Intelligent yt-dlp recipe generation. Download, convert, audio-only, with refinement.


πŸš€ Quick Start

Install & Run:

npm install
npm run dev

Open http://localhost:5173

Production Build:

npm run build
npm run preview

⚑ Main Workflow

  1. Describe β€” Enter what you need in natural language
  2. Preview β€” See generated command + safety classification
  3. Refine β€” Edit parameters (URLs, outputs, placeholders) inline
  4. Execute β€” Run in Simulate or Real mode (with bridge)
  5. Save β€” Store in Saved Commands for instant reuse

🎬 YouTube Command Recipes

For YouTube requests, CommandBrain generates multiple yt-dlp variants:

# Video download (best quality)
yt-dlp "<VIDEO_URL>"

# High-quality MP4 merge
yt-dlp -f "bestvideo+bestaudio" --merge-output-format mp4 "<VIDEO_URL>"

# Audio-only extraction
yt-dlp -x --audio-format mp3 "<VIDEO_URL>"

# List available formats
yt-dlp -F "<VIDEO_URL>"

# Download specific format
yt-dlp -f <FORMAT_CODE> "<VIDEO_URL>"

# Custom output filename
yt-dlp -o "%(title)s.%(ext)s" "<VIDEO_URL>"

Refinement in Action: Type "audio only" or "use this URL" to update the preview in real-time instead of starting from scratch.


πŸ“š Saved Commands

Organize saved commands with:

  • Nicknames β€” Friendly names for quick recall
  • Folders β€” Group by project or category
  • Tags β€” Filter across your command library
  • Notes β€” Context and usage instructions
  • Inline Editing β€” Update metadata directly from cards
  • Search & Filter β€” Find commands in milliseconds

πŸ”” Reminders

Auto-suggest frequently used commands:

  • Shows reminder card for commands you run often
  • Quick execute or explore options
  • Snooze for 1 day or 7 days
  • Open Saved Commands for full context

βš™οΈ Execution Modes

Mode Behavior Use Case
Simulate No real execution, returns mock output Testing, previews
Real Executes through local bridge Actual command execution

Configure bridge in Settings.


πŸ—οΈ Project Structure

src/
  β”œβ”€β”€ App.tsx                    # Main app entry
  β”œβ”€β”€ runanywhere.ts             # RunAnywhere SDK
  β”œβ”€β”€ components/
  β”‚   └── CommandBrainTab.tsx    # 🧠 Core UI
  β”œβ”€β”€ commandbrain/
  β”‚   β”œβ”€β”€ CommandBrain.ts        # Main API
  β”‚   β”œβ”€β”€ interpreter/           # NL β†’ Command
  β”‚   β”œβ”€β”€ safety/                # Safety classification
  β”‚   β”œβ”€β”€ storage/               # IndexedDB management
  β”‚   └── templates/             # Command templates
  └── styles/
      └── index.css              # Global styles

Note: CommandBrain is the active experience. Chat/Vision/Voice tabs are gated behind SHOW_EXTRA_TABS.


πŸš€ Deployment

This app requires Cross-Origin Isolation headers:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: credentialless

vercel.json is included for Vercel deployment.


πŸ“š Documentation


πŸ—οΈ Architecture & Code

Built to solve the problem of repetitive AI prompting by creating an offline-first memory layer for system commands. CommandBrain runs entirely locally in the browser, ensuring your data never leaves your device unless you explicitely share it.

React Vite TypeScript Tailwind OpenAI

πŸ“Œ Ecosystem

SDK Repository: https://github.com/RunanywhereAI/runanywhere-sdks


πŸ“„ License

MIT


Architected by Vicky Kumar

GitHub β€’ LinkedIn β€’ Email

Β© 2026 RunAnywhere CommandBrain

About

Starter App created using web-sdk

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages