AI-powered cross-environment terminal assistant
Project description
Bashly
AI-powered cross-environment terminal assistant. Type your request in plain English — Bashly instantly generates the right command for your target environment, lets you securely approve or deny it, and executes it.
Supported Environments
Bashly automatically detects your active operating system, and will even distinguish between PowerShell and CMD when running on Windows!
| Environment | Can run locally? |
|---|---|
| Windows (PowerShell) | Yes |
| Windows (CMD) | Yes |
| Linux (bash) | Yes |
| macOS (zsh) | Yes |
| Android (Termux) | Copy only |
| MicroPython (ESP32 / Pi Pico) | Copy only |
| Arduino CLI | Copy only |
| Raspberry Pi (bash + GPIO) | Copy only |
🚀 Quick Start
1. Installation
The easiest way to install Bashly globally is using uv or pip:
Using uv (Recommended):
uv tool install bashly-cli
Using pip:
pip install bashly-cli
2. Run Bashly
Once installed, you can start Bashly from any directory by simply typing:
bashly
3. First-Time Setup
On your very first run, Bashly will ask you for an OpenRouter API Key.
- Get one for free at openrouter.ai.
- Paste it into the terminal when prompted.
- It will be securely saved to
~/.bashly_config.jsonautomatically.
💡 Usage
Bashly is designed to feel like a continuous chat within your terminal.
Bashly (Linux) > find all log files older than 7 days
Bashly (MicroPy) > blink the onboard LED every 500ms
Bashly (Win/PS) > list all running processes sorted by memory
Built-in Commands
If you type any of these keywords, Bashly performs built-in actions instead of asking the AI:
| Command | Action |
|---|---|
help |
Show the help menu |
history |
View your last 10 commands |
clear history |
Safely delete all your saved command history |
sysinfo |
View your OS, Architecture, and Python version |
api key |
Update your OpenRouter API key |
switch env |
Change your target environment on the fly! |
exit |
Quit the application |
Interactive Approvals
Bashly will never run a command without your explicit permission.
For local environments (Windows, Linux, macOS):
y— run the command locally.n— skip it.c— copy to clipboard without running.?— explain step-by-step what the command actually does.
For cross-compiling/remote targets (MicroPython, Arduino, Termux):
y/c— copy to clipboard.?— explain.
🛡️ Built-in Security
Bashly parses your generated commands against strict RegEx blocklists to prevent disastrous mistakes:
- 🔴 DANGEROUS — Destructive patterns (
rm -rf,format c:,Invoke-Expression, fork bombs). Execution is hard-blocked. You can only copy the command if you deliberately want to run it. - 🟡 CAUTION — Elevated privilege commands (
sudo,chmod,taskkill). Execution is allowed but visually warned. - 🟢 SAFE — Standard commands without known danger patterns.
🛠️ Developing Locally
If you want to contribute to Bashly or tweak its core prompts:
- Clone the repository:
git clone https://github.com/albinnnnn/bashly && cd bashly - Install it in editable mode:
uv pip install -e . - Tweak the core LLM instructions directly in
src/bashly/prompts.py!
bashly/
├── src/bashly/
│ ├── cli.py Entry point, UI, and approval loop
│ ├── llm.py OpenRouter API integration
│ ├── executor.py Subprocess execution and Danger RegEx
│ ├── history.py Append-only JSON history logging
│ ├── environments.py System prompt configuration mapping
│ ├── prompts.py Centralized dashboard for tweaking prompts!
│ └── config.py Persistent API Key manager
├── pyproject.toml PyPI package metadata
└── README.md
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bashly_cli-0.1.4.tar.gz.
File metadata
- Download URL: bashly_cli-0.1.4.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb0b1247e707c7077030ae5ef9cd44817319cc09ec085766d23272f1b8889460
|
|
| MD5 |
ba917b124f21c5602d78084e54cda46e
|
|
| BLAKE2b-256 |
ba1d679f8bc8cc635fea884b51304b1faa0b74fb343cd4de6965ad9e5ea0ba26
|
File details
Details for the file bashly_cli-0.1.4-py3-none-any.whl.
File metadata
- Download URL: bashly_cli-0.1.4-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fd9e4fb86c9be407797a25d64cad73458e93993951d0027a3edd41a9254eed0
|
|
| MD5 |
0845f058c51c1a9927a59ac496a4d9a4
|
|
| BLAKE2b-256 |
b222dd40b683d4333154bf031b674a3231183d93f52e351e59175ab403eb7666
|