Skip to main content

cmdmate : Your AI powered terminal assistant 🚀

Project description

cmdmate 🚀

Your AI-powered terminal assistant that helps you find the right commands, explanations, and even generates git commit messages!

Features

  • Command Generation: Get the right terminal commands for any task
  • Explanation Mode: Ask questions and get detailed explanations
  • Git Commit Helper: Generate meaningful commit messages from your git diff
  • Cross-platform: Supports Windows, Linux, and macOS
  • Auto OS Detection: Automatically detects your operating system

Installation

pip install cmdmate

Usage

Basic Command Generation

Generate terminal commands for any task:

cmdmate "list all files in current directory"
cmdmate "find all python files"
cmdmate "compress folder into zip"

Explanation Mode (--explain or -e)

Get explanations for anything:

cmdmate -e "what is docker"
cmdmate --explain "how does git rebase work"
cmdmate -e "difference between chmod 755 and 644"

Git Commit Message Generation (--commitHelp)

Generate meaningful commit messages from your git diff:

git diff | cmdmate --commitHelp
git diff --staged | cmdmate --commitHelp

Example output:

feat: add user authentication with JWT tokens

- Implement login/logout endpoints
- Add JWT token validation middleware
- Create user session management

Specify Target OS (--os or -o)

Force commands for a specific operating system:

cmdmate "list files" --os windows
cmdmate "list files" --os linux
cmdmate "list files" -o mac

Supported OS aliases:

  • windows, win
  • linux, lin
  • mac, darwin

Custom Server (--server)

Use a custom server endpoint:

cmdmate "your query" --server http://localhost:8000/

Examples

Command Generation

$ cmdmate "find all files larger than 100MB"
find . -type f -size +100M

$ cmdmate "kill process on port 3000"
lsof -ti:3000 | xargs kill -9

Explanations

$ cmdmate -e "what does chmod 755 mean"
chmod 755 sets file permissions where:
- 7 (owner): read(4) + write(2) + execute(1) = full permissions
- 5 (group): read(4) + execute(1) = read and execute only
- 5 (others): read(4) + execute(1) = read and execute only

Git Commit Messages

$ git diff | cmdmate --commitHelp
fix: resolve authentication timeout issue

- Increase JWT token expiration to 24 hours
- Add retry logic for failed auth requests
- Update error handling for expired tokens

Command Line Options

Option Short Description
query - The command or task you want to perform
--os -o Target OS (auto-detected if not provided)
--explain -e Ask anything, get explanation
--commitHelp - Generate git commit message from diff input
--server - Server URL (default: https://cmdmate.onrender.com/)

Version

Current version: v0.1.4

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the 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.6.tar.gz (6.3 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.6-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cmdmate-0.1.6.tar.gz
  • Upload date:
  • Size: 6.3 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.6.tar.gz
Algorithm Hash digest
SHA256 ae3abeb8e266350b360dfe1df187ff361e2c7fa0c5f8f4f3dabb61c8b7ddf340
MD5 7031bd82d690517fa825671cb780671c
BLAKE2b-256 f3f461dd3573b9b01b94aacb7d08f4f3972e4b183372c4eb5993c499b391ce54

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmdmate-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 7.3 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 890fa510d3a558c8aed57b53f9faf61803a1db2971281cd6cf338c843e6b5d01
MD5 a1823836aaa20abdc902c6a4df9786fa
BLAKE2b-256 13692c40e52208d0eaf2179335e82ad12923dc14d2e59e24f07b9fb802f8216e

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