Cross-platform command generator from natural language (Linux/macOS/Windows)
Project description
LinAIx
Simple, safe, cross-platform command generation from natural language
Describe what you want in plain English — LinAIx generates the appropriate shell command for your OS and runs it after confirmation.
🚀 Installation
pip install linaix
⚙️ Setup
Choose a provider and configure your API key:
# Google Gemini
linaix --set-google-key YOUR_API_KEY
# OpenAI ChatGPT
linaix --set-openai-key YOUR_API_KEY
Or use environment variables:
export GOOGLE_API_KEY=your_key
export OPENAI_API_KEY=your_key
📖 Usage
Basic usage (requires confirmation):
linaix --provider google --model gemini-1.5-flash "list all python files"
Quick examples:
# Preview without running
linaix --provider google --model gemini-1.5-flash --dry-run "create backup directory"
# Skip confirmation prompt
linaix --provider openai --model gpt-4o-mini --yes "show disk usage"
# Set timeout
linaix --provider google --model gemini-1.5-flash --timeout 60 "find large files"
# Specify shell (auto-detects by default)
linaix --provider google --model gemini-1.5-flash --shell powershell "list processes"
Available options:
--provider—googleoropenai(default:google)--model— Model name (required, e.g.,gemini-1.5-flash,gpt-4o-mini)--shell—auto,bash,zsh,powershell,cmd(default:auto)--dry-run— Show command without executing--yes— Skip confirmation prompt--timeout— Command timeout in seconds (default: 30)
🔒 Safety Features
- ✅ Single command only (no pipes, redirects, or chaining)
- ✅ Confirmation required before execution (unless
--yes) - ✅ Blocks dangerous commands (
rm,dd,shutdown, etc.) - ✅ Detects suspicious patterns (
rm -rf /, fork bombs, etc.) - ✅ Input validation and sanitization
🛠️ Configuration
Config file: ~/.linaix/config.json
{
"provider": "google",
"google_api_key": "your_key_here",
"openai_api_key": ""
}
🐛 Troubleshooting
| Issue | Solution |
|---|---|
| "No API key" error | Run linaix --set-google-key YOUR_KEY or set environment variable |
| "Permission denied" | Check PATH or reinstall: pip install --force-reinstall linaix |
| Command not found | Add Python Scripts to PATH (Windows) or restart terminal |
📝 License
MIT
This project is licensed under the MIT License - see the LICENSE file for details.
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 linaix-0.1.4.tar.gz.
File metadata
- Download URL: linaix-0.1.4.tar.gz
- Upload date:
- Size: 12.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1eb62a076950f90afe5d7b54fb40fb77fc478ca4bc26d9dfa2a5d2a06d80ec8
|
|
| MD5 |
481e7f22f9ecc7a49d8746cdf344c75c
|
|
| BLAKE2b-256 |
da01e35bdbcee04f83389bf579b0f41ff1f465aba01832d513256e00e045a1d2
|
File details
Details for the file linaix-0.1.4-py3-none-any.whl.
File metadata
- Download URL: linaix-0.1.4-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d6b58be669bd75d22d8fab350c31d74840d3fb8173900309e615a3ae6751bc7
|
|
| MD5 |
4f003663a0f5450db38712556e08b234
|
|
| BLAKE2b-256 |
4e9486bec0ec6a57b42365f917b98d12be7ade07475e5ac37a357d394d1c7ba0
|