Skip to content

XinnBlueBird/shellforge

Repository files navigation

ShellForge

AI-powered shell command generator with safety ratings

Describe what you need in plain English. Get production-ready terminal commands with safety classifications, detailed explanations, and alternative approaches.

Next.js TypeScript Tailwind License


What is ShellForge?

ShellForge is a developer tool that bridges the gap between intent and terminal syntax. Instead of memorizing obscure flags, searching man pages, or copying from Stack Overflow, you describe your goal in plain English and MiMo v2.5 Pro translates it into a safe, production-ready command.

Every generated command comes with a safety rating (Safe / Cautious / Dangerous), a line-by-line explanation of each flag and argument, and alternative approaches that achieve the same result differently. Destructive operations like rm -rf or dd always receive a red Dangerous badge with a clear risk explanation.

Why ShellForge?

Existing shell assistants either generate raw commands without context, or provide documentation without generation. ShellForge combines both — generation, safety analysis, and education in a single interaction. The model reasons through intent, flag compatibility, and side effects before producing output, so you learn while you generate.

Features

Natural Language Input

Describe your task in plain English. No need to remember flag combinations, pipe syntax, or tool-specific syntax. ShellForge handles the translation.

Safety Ratings

Every command is classified:

  • Safe — read-only operations, no data modification
  • Cautious — modifies files or state, review before executing
  • Dangerous — destructive or irreversible operations, proceed with care

Detailed Explanations

Each command includes a breakdown of every flag, pipe, redirection, and argument. Understand what each part does before you run it.

Alternative Commands

Get 0-2 alternative approaches that achieve the same result with different tools or strategies. Learn multiple ways to solve the same problem.

Multi-Shell Support

Switch between Bash, Zsh, and PowerShell output modes. Commands adapt to your target shell environment.

Tech Stack

Layer Technology
Framework Next.js 16 (App Router, Turbopack)
Language TypeScript
Styling Tailwind CSS v4 (@theme inline)
Icons Lucide React
AI Model MiMo v2.5 Pro
Deployment Vercel

Getting Started

Prerequisites

Installation

git clone https://github.com/XinnBlueBird/shellforge.git
cd shellforge
npm install

Configuration

cp .env.example .env.local

Edit .env.local with your MiMo API key:

MIMO_API_KEY=your_mimo_api_key_here

Development

npm run dev

Open http://localhost:3000.

Environment Variables

Variable Required Description
MIMO_API_KEY Yes MiMo v2.5 Pro API key from the 100T grant program

Project Structure

shellforge/
├── src/
│   ├── app/
│   │   ├── globals.css          # Tailwind v4 theme (slate + teal)
│   │   ├── layout.tsx           # Root layout with Inter + JetBrains Mono
│   │   ├── page.tsx             # Landing page (hero, features, safety legend, FAQ)
│   │   ├── api/
│   │   │   └── generate/
│   │   │       └── route.ts     # Server-side MiMo API proxy
│   │   └── app/
│   │       └── page.tsx         # Tool interface (input, results, safety badges)
├── .env.example                 # Environment template
├── README.md
└── package.json

How It Works

User types prompt (plain English)
        │
        ▼
┌─ /api/generate (Next.js server route) ─┐
│  1. Read MIMO_API_KEY from process.env  │
│  2. Build structured system prompt      │
│  3. Call MiMo v2.5 Pro API              │
│  4. Parse JSON response into            │
│     CommandResult (command, safety,     │
│     explanation, alternatives)          │
│  5. Return typed JSON to client         │
└─────────────────────────────────────────┘
        │
        ▼
Client renders:
  - Command in code block with copy button
  - Color-coded safety badge
  - Explanation panel
  - Alternative commands list

API Route Details

The /api/generate route handler:

  • Reads the API key server-side (never exposed to client)
  • Sends a structured system prompt requesting JSON output
  • Parses the model response into a typed CommandResult object
  • Returns { command, explanation, safety, safetyNote, alternatives }

MiMo endpoint: https://token-plan-sgp.xiaomimimo.com/v1/chat/completions

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT — see LICENSE for details.


Built with MiMo v2.5 Pro · Powered by Next.js

About

AI-powered shell command generator. Describe tasks in plain English, get production-ready terminal commands with safety ratings, explanations, and alternatives. Built with MiMo v2.5 Pro.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors