Skip to main content

cmdmate : Your AI powered terminal assistant 🚀

Project description

cmdmate

Python 3.8+ OpenAI GPT-4 Cross Platform

cmdmate is an AI-powered command-line assistant that converts natural language queries into terminal commands. Simply describe what you want to do, and cmdmate will generate the appropriate command for your operating system.

✨ Features

  • 🧠 AI-Powered: Uses OpenAI's GPT-4 to understand natural language queries
  • 🖥️ Cross-Platform: Works on Windows, macOS, and Linux
  • 🔒 Safe Execution: Always asks for confirmation before running commands
  • 🎯 OS-Aware: Generates commands specific to your operating system
  • Simple CLI: Easy-to-use command-line interface

🚀 Installation

Clone the repository:

pip install cmdmate

📖 Usage

Quick Start

Run cmdmate directly from the project directory:

cmdmate "<your natural language command>"

Example:

cmdmate "list all files in current directory"
cmdmate -o win "list all files in current directory"

Example Commands

File Operations

cmdmate "find all Python files in this directory"
cmdmate "create a new directory called my-project"
cmdmate "copy all .txt files to a backup folder"
cmdmate "delete all .log files older than 7 days"

System Information

cmdmate "show disk usage for this directory"
cmdmate "display all running processes"
cmdmate "check available memory"
cmdmate "show network connections"

Git Operations

cmdmate "stage all changes and commit with message 'fix bugs'"
cmdmate "create and switch to a new branch called feature-login"
cmdmate "show git log for the last 5 commits"
cmdmate "push current branch to origin"

Example Session

$ cmdmate "show me all hidden files in this directory"

🤖 [cmdmate] Generated Command:
ls -la

Tips for Better Results

  • Be specific: "list Python files" vs "show files"
  • Include context: "in current directory" or "recursively"
  • Mention your intent: "for backup", "to delete", "to analyze"
  • Use natural language: cmdmate understands conversational commands

### Supported Operating Systems

- **macOS**: Uses `/bin/zsh` as the default shell
- **Linux**: Uses `/bin/zsh` as the default shell  
- **Windows**: Uses `cmd.exe` as the default shell

## 🛡️ Safety Features

- **Confirmation Prompt**: Always asks before executing commands
- **Error Handling**: Gracefully handles execution errors
- **No Auto-Execution**: Commands are never run without user consent

## 📋 Requirements

- Python 3.8 or higher
- Internet connection for AI queries

## 📝 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ⚠️ Disclaimer

cmdmate generates commands using AI, which may not always be perfect. Always review commands before execution, especially for:
- File deletion operations
- System configuration changes
- Network operations
- Administrative commands

## 🙋‍♂️ Support

If you encounter any issues or have questions:
1. Check the existing issues on GitHub
2. Create a new issue with detailed information
3. Include your OS, Python version, and error messages

---

Made with ❤️ by Chinmay Rao

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

cmdmate-0.1.3.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmdmate-0.1.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file cmdmate-0.1.3.tar.gz.

File metadata

  • Download URL: cmdmate-0.1.3.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cmdmate-0.1.3.tar.gz
Algorithm Hash digest
SHA256 373a942b09ce6b8851c570461148cfb9e372c85e7abe69d2e7687a28d22cc2eb
MD5 acac8d2af478307439c5533f2874978d
BLAKE2b-256 7c96c9d63c57f8f6dfa082bc7e4741936cc9b11404bf1944ca2551f1f6dea4cf

See more details on using hashes here.

File details

Details for the file cmdmate-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: cmdmate-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cmdmate-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 14fbf8e9fc3a9d5e35a56fea47f674729182ef3ec3268654794f5c64b5fe4e35
MD5 fcdd0f2aa647c5b19e1b0bdfa26d9777
BLAKE2b-256 7094afcc55d3dbffff5890d3e311634ec256e099fccad9acf9e6dcc310b76fbe

See more details on using hashes here.

Supported by

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