Skip to main content

A natural language interface for terminal commands

Project description

CommandRex 🦖

A natural language interface for terminal commands. Talk to your terminal in plain English!

Features

  • 🗣️ Use natural language to run terminal commands
  • 🔍 Preview commands before execution
  • 🔒 Built-in safety checks for dangerous commands
  • 💻 Cross-platform support (Windows, Linux, macOS)
  • 📝 Command history with search
  • ⌨️ Arrow key navigation
  • 📊 Usage statistics

Installation

pip install commandrex-cli

Requirements

Quick Start

  1. Install CommandRex:
pip install commandrex-cli
  1. Run CommandRex:
commandrex
  1. On first run, you'll be prompted to enter your OpenAI API key.

  2. Start typing commands in plain English:

Show me all files in the current directory
Create a new folder called projects
What's my current directory
  1. Update-
pip install --upgrade commandrex-cli

Usage Tips

  • Use arrow keys (↑/↓) to navigate command history
  • Press Ctrl+R to search command history
  • Type 'help' for more information
  • Type 'history' to see command history
  • Type 'stats' to see usage statistics
  • Type 'exit' or 'quit' to leave

Common Commands

Here are some example commands you can try:

  • "Show all files"
  • "Create a new folder called test"
  • "What's my IP address"
  • "Show system information"
  • "Create a file called notes.txt"

Safety Features

  • Commands are shown and explained before execution
  • Dangerous commands are flagged with warnings
  • Confirmation required before execution
  • Platform-specific command adaptation

Special Commands

  • help - Show help information
  • history - Show command history
  • stats - Show usage statistics
  • clear - Clear the screen
  • reset-key - Reset OpenAI API key
  • exit or quit - Exit CommandRex

Configuration

The OpenAI API key is stored securely using your system's keyring. You can:

  1. Set it via environment variable:
export OPENAI_API_KEY=your-key-here
  1. Let CommandRex prompt you for it on first run

  2. Reset it anytime with:

commandrex reset-key

License

MIT License - see 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

commandrex_cli-0.1.7.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

commandrex_cli-0.1.7-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file commandrex_cli-0.1.7.tar.gz.

File metadata

  • Download URL: commandrex_cli-0.1.7.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.3 Windows/11

File hashes

Hashes for commandrex_cli-0.1.7.tar.gz
Algorithm Hash digest
SHA256 d7bfd6eb885699955eea4c9d394fbe756bcc69d9efa6c39024131109eeaf81a5
MD5 f5e4729dd316be67c2d13e7d2ae0d476
BLAKE2b-256 38c6267eb5b7cacc1efee18c2e89c1780c51e5c0f1dbf9ec6b799cf7709ec95e

See more details on using hashes here.

File details

Details for the file commandrex_cli-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: commandrex_cli-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.3 Windows/11

File hashes

Hashes for commandrex_cli-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 0f07ca8f4c825e8d5d515c44751d4302c76a00f7bc4ec5adac2228cf2d15b3f9
MD5 ad23a8b3477606fe69514a893c8cdffe
BLAKE2b-256 6b4cd07fd99752856debaef0ab48e84c28eb3a4b2e9660f9744bd65d1ed2d84a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page