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.4.tar.gz (5.1 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.4-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cmdmate-0.1.4.tar.gz
  • Upload date:
  • Size: 5.1 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.4.tar.gz
Algorithm Hash digest
SHA256 2f7f74dc31fe9cd428db6d48f3cda5cfeec90d87a8ec557e6b0c43048887913e
MD5 f8969abc113ee89d959449cb5f95d3d1
BLAKE2b-256 c2deb036d0ac9b0aa7ffb1964b186d5aa0842c571671cfbb5b55e37c76944ba4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmdmate-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5956d9aafd2b882c541ab615ee0ba4363d0aa428b3c120d4e036084bead45f41
MD5 70963ee0251305d2e746cd91be5107ca
BLAKE2b-256 2e6ad224bf3ea90a7433545795b9494c94d113ec9b3511a3c548a98b89a4cb47

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