Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsApr 1, 2026·1 min de lectura

AI Shell — Natural Language to Shell Commands

AI Shell converts natural language into shell commands using AI. 5.2K+ stars. 13+ languages, chat mode, custom endpoints. MIT. By Builder.io.

Listo para agents

Staging seguro para este activo

Este activo primero queda en staging. El prompt copiado pide inspeccionar los archivos staged antes de activar scripts, config MCP o config global.

Stage only · 17/100Política: staging
Superficie agent
Cualquier agent MCP/CLI
Tipo
Script
Instalación
Stage only
Confianza
Confianza: Established
Entrada
ai-shell.md
Comando de staging seguro
npx -y tokrepo@latest install da61dedb-cb50-41f6-bb0c-72013a520bd6 --target codex

Primero deja archivos en staging; la activación requiere revisar el README y el plan staged.

TL;DR
AI Shell translates plain English descriptions into shell commands you can execute, revise, or cancel.
§01

What it is

AI Shell is a CLI tool by Builder.io that converts natural language into shell commands using AI. You describe what you want in plain English, and it suggests the exact command to run. It supports 13+ languages, interactive chat mode, silent mode for scripting, and custom OpenAI-compatible API endpoints.

It is designed for developers who frequently look up command syntax or want faster shell workflows without memorizing flags and options.

§02

How it saves time or tokens

Instead of searching documentation or Stack Overflow for the right combination of flags, AI Shell gives you the command in seconds. The token estimate for this workflow is 369 tokens per invocation. Silent mode (ai -s) lets you pipe output directly into scripts, removing the manual copy-paste step entirely.

§03

How to use

  1. Install globally via npm: npm install -g @builder.io/ai-shell
  2. Set your API key: ai config set OPENAI_KEY=sk-...
  3. Run a query: ai 'list all log files larger than 10MB'
  4. Choose [E]xecute, [R]evise, or [C]ancel from the interactive prompt
§04

Example

# Install AI Shell
npm install -g @builder.io/ai-shell

# Configure your API key
ai config set OPENAI_KEY=sk-your-key-here

# Convert natural language to commands
ai 'find all Python files modified in the last 7 days'
# Suggests: find . -name '*.py' -mtime -7
# [E]xecute, [R]evise, [C]ancel

# Chat mode for multi-turn conversations
ai chat

# Silent mode for scripting
ai -s 'list running docker containers' | sh
§05

Related on TokRepo

§06

Common pitfalls

  • Forgetting to set the API key before first use causes a silent failure with no helpful error message
  • Silent mode pipes commands directly to the shell, which can be dangerous if you do not review the output first
  • Custom endpoints must be fully OpenAI-compatible; partially compatible APIs may return malformed suggestions

Preguntas frecuentes

What models does AI Shell support?+

AI Shell works with any OpenAI-compatible API endpoint. By default it uses OpenAI models, but you can configure custom endpoints to use other providers that expose an OpenAI-compatible chat completions API.

Can AI Shell run commands automatically without confirmation?+

Yes. Use silent mode with the -s flag: ai -s 'your query'. This outputs only the command text without the interactive prompt, which you can pipe to sh for automatic execution. Use with caution.

Does AI Shell work on Windows?+

AI Shell runs on any platform that supports Node.js. It works on macOS, Linux, and Windows. Install via npm and configure your API key the same way on all platforms.

How is AI Shell different from GitHub Copilot CLI?+

AI Shell is open source (MIT licensed) and works with any OpenAI-compatible API, not just GitHub's infrastructure. It was inspired by GitHub Copilot X CLI but provides more flexibility with custom endpoints and 13+ language support.

Can I use AI Shell with local LLMs?+

Yes. Point AI Shell to a local OpenAI-compatible server (such as Ollama or LM Studio) by configuring a custom endpoint. Quality depends on the local model's ability to generate accurate shell commands.

Referencias (3)
🙏

Fuente y agradecimientos

Created by Builder.io. MIT. BuilderIO/ai-shell — 5,200+ GitHub stars

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados