Shelby
Shelby is a safety-first, AI-powered natural language terminal assistant. It translates plain English requests into executable shell commands, providing detailed explanations and risk assessments before anything runs.
Demo
Getting Started (Step-by-Step)
1. Installation
The easiest way to install Shelby is via pip:
pip install shelby-ai
If you are a developer and want to install it from source:
git clone https://github.com/sk16er/shelby.git
cd shelby
pip install -e .
2. Configuration
Before your first use, you need to configure an AI provider. Shelby supports OpenAI, Anthropic, Google Gemini, and local models via Ollama.
Run the setup wizard:
shelby --setup
Follow the prompts to select your provider and enter your API key. Keys are stored securely in your system's keyring.
3. Your First Command
Try asking Shelby to do something simple:
shelby "list all files in the current directory"
Shelby will generate the command, explain it, and ask for your confirmation.
Usage Modes
Inline Query
Run a single command directly:
shelby "recursively find all .log files and delete them"
Interactive REPL
Type shelby without arguments to enter a persistent session. The REPL remembers the output of previous commands, allowing for follow-up requests:
shelby > list the largest files here
...
shelby > now move the top 3 to /tmp
Pipe Mode
Shelby can process input from other commands:
echo "list docker containers" | shelby
Safety System
Shelby classifies every command into one of three risk tiers to prevent accidental damage:
| Tier | Behavior | Examples |
|---|---|---|
| SAFE | Press Enter to execute | ls, grep, cat, git status |
| CAUTION | Type y to confirm |
cp, mv, chmod, pip install |
| DANGER | Retype the command name to confirm | rm -rf, dd, DROP TABLE |
Safety Flags:
--dry-run: Display the command and explanation without executing it.--safe: Block all DANGER tier commands entirely.--yes: Skip all confirmation prompts (use with caution).
Advanced Features
- Explain: Break down any existing command without running it.
shelby explain "tar -xzvf archive.tar.gz"
- Fix: Analyze a failed command and suggest a correction.
shelby fix - History: Perform semantic search over your past Shelby commands.
shelby history "how did I list those docker images?"
License
MIT License. See LICENSE for details.
Metadata
Release files for shelby-ai 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shelby_ai-0.1.1.tar.gz | 11.9 kB | Without provenance | Details for shelby_ai-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shelby_ai-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for shelby_ai-0.1.1-py3-none-any.whl |
Total release size: 26.1 kB
Release files / shelby_ai-0.1.1.tar.gz
| Download URL | shelby_ai-0.1.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8772950f8e945a752438b4b61fe5ef8ba04fb3b0041294ecfe1d86de84fa7884
|
|
BLAKE2b-256 checksum How to use checksums |
5cd09823fc1bec976d3b8b1c8d9ade7d24c4e2ff27ebb73c278e5659c72c5eeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / shelby_ai-0.1.1-py3-none-any.whl
| Download URL | shelby_ai-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f453c6f47d86dd5946b3147d1e2f1f23cdd465b0eee82f5e362de2ce03a2d168
|
|
BLAKE2b-256 checksum How to use checksums |
be62d2efa51954b6db9670a42dd430c65201fd069ea57bc33cbe0a687e9eae76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for shelby-ai 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.