Skip to content
/ x Public
forked from arpitbbhayani/x

Run shell commands in natural language.

License

Notifications You must be signed in to change notification settings

solancer/x

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

x

A natural language shell command executor.

  • No external dependencies (just curl or wget)
  • Supports OpenAI, Gemini, Anthropic, and Ollama as providers
  • Shows command before execution for confirmation
  • Automatically picks the best available model

Installation

curl -sSL https://raw.githubusercontent.com/arpitbbhayani/x/master/install.sh | sudo sh

Set your API key (choose one):

export OPENAI_API_KEY="your-key"
export ANTHROPIC_API_KEY="your-key"
export GEMINI_API_KEY="your-key"
export OLLAMA_MODEL="llama3.2"

Add to your shell config (~/.bashrc, ~/.zshrc, etc):

echo 'export OPENAI_API_KEY="your-key"' >> ~/.bashrc

Usage

x <instruction>

Examples:

x get all the git branches
x list all files modified in the last 7 days
x show disk usage of current directory
x count lines in all python files

The script generates a command and asks for confirmation before executing.

License

MIT

About

Run shell commands in natural language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%