Promptix is a command-line assistant that converts natural-language instructions into shell commands using OpenAI's gpt-4o-mini model, then asks for confirmation before executing them.
Instead of remembering exact shell syntax, you type what you want to do in plain English, Promptix translates it into a shell command, shows it to you, and executes it only after you confirm.
- Natural language to shell command: sends your input (plus any accumulated context) to OpenAI's
gpt-4o-miniand runs the returned command viasubprocess. - Context stack: build up multi-step context before issuing a command.
Ctrl+N, push the current input onto the context stackCtrl+B, pop the last context entryCtrl+O, open the in-app configuration menuCtrl+C, exit
- Command confirmation: every generated command is shown and must be confirmed (
Y/n) before it runs. - Encrypted token storage: your OpenAI API token is encrypted at rest with
cryptography(PBKDF2-HMAC key derivation + Fernet), stored under~/.promptix/token.enc, and protected by a master password you set on first run. - In-app configuration menu (via
Ctrl+O): change the master password, change the stored token, toggle "remember password" for the session, or delete all stored data.
On first run, Promptix asks you to set a master password and enter your OpenAI API token; the token is encrypted and saved to ~/.promptix/token.enc. On subsequent runs it prompts for the master password to decrypt the token (unless "remember password" caching is enabled, which caches it in ~/.promptix/password_cache).
Each prompt you type is sent (along with any active context) to OpenAI's chat completions API, which is instructed to return only a single shell command. That command is displayed and executed via subprocess.run only after you confirm.
Install directly from GitHub:
pip install git+https://github.com/brayandm/promptixRun it with:
promptix- Install pyenv and pipenv.
- Install Python 3.12:
pyenv install
- Set the local Python version:
pyenv local - Install dependencies:
PIPENV_VENV_IN_PROJECT=1 pipenv install --dev
- Install pre-commit hooks:
pipenv run pre-commit install
- Install the package in editable mode:
pip install -e . - Run the application:
promptix
openai, talks togpt-4o-minito translate instructions into shell commandsprompt-toolkit, interactive prompt session and key bindingsrich, styled terminal outputcryptography, encrypts the stored OpenAI token (PBKDF2 + Fernet)python-dotenv, environment variable loadingkeyboard
Tooling configured in the repo: black, isort, mypy (strict mode), flake8, and pre-commit.
This is an early-stage (v0.1.0) personal/experimental project, expect a small, evolving codebase (currently a single main.py module) rather than a mature, fully documented tool.