semvec/pypi-packages huggingface dataset:
linaix 0.1.4
Cross-platform command generator from natural language (Linux/macOS/Windows)
License: MIT
Requires Python: >=3.7
Keywords: terminal, linux, nlp, cli

# 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

```bash
pip install linaix
```

## ⚙️ Setup

Choose a provider and configure your API key:

```bash
# Google Gemini
linaix --set-google-key YOUR_API_KEY

# OpenAI ChatGPT
linaix --set-openai-key YOUR_API_KEY
```

Or use environment variables:
```bash
export GOOGLE_API_KEY=your_key
export OPENAI_API_KEY=your_key
```

## 📖 Usage

**Basic usage** (requires confirmation):
```bash
linaix --provider google --model gemini-1.5-flash "list all python files"
```

**Quick examples**:
```bash
# 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` — `google` or `openai` (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`

```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](LICENSE) file for details.


<div align="center">


[![GitHub stars](https://img.shields.io/github/stars/AdirAli/linaix?style=social)](https://github.com/AdirAli/linaix)
[![GitHub forks](https://img.shields.io/github/forks/AdirAli/linaix?style=social)](https://github.com/AdirAli/linaix)
[![GitHub issues](https://img.shields.io/github/issues/AdirAli/linaix)](https://github.com/AdirAli/linaix/issues)

</div>
PyRubik 0.1.0.2
A Python module to make speedcubing projects a piece of cake.
License: MIT
Requires Python: >=3.10
Keywords: cubing rubik rubik's cube solver scramble cube pyrubik

# PyRubik
PyRubik is python module create to assist the creation of speedcubing
softwares made in Python. For example, if you are creating a speedcuber
timer using Flask, this module may help you.

## How to install
```sh
pip install pyrubik
```

## Usage
The module has so many features. Just take a look:

### Generate official WCA scrambles
> This code generate a scramble for a 2x2x2 cube:

```python
# This is a 2x2.py file
from PyRubik import Scramble

if __name__ == '__main__':
  scramble: list = Scramble.Cube2x2x2() # Create the scramble
  print(f'A 2x2x2 Scramble: {scramble}')   # Show it
```

```sh
# Your output must look similar like this:
A 2x2x2 Scramble: ['R2', "F'", 'R2', 'F', "R'", 'U', 'R2', 'U', "F'"]
```

> This another one generate for 3x3x3 cube, but without the list syntax

```python
# This is a 3x3.py file
from PyRubik import Scramble

if __name__ == '__main__':
  scramble: list = Scramble.Cube3x3x3() # Create the scramble

  # Show it
  for move in scramble:
      print(move, end='  ')
  print()
```

```sh
# Your output must look similar like this
U  L  U2  F'  U'  D'  F2  U'  F  L'  R  F2  B2  L2  R'  F  U'  B  F2  U'  F  B2  L  U
```

### PyRubik docs
You can get the project documentation [right here](https://pyrubik.readthedocs.io/en/latest/commands.html).

---

Made with ❤️ in Brazil 🇧🇷