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.5.tar.gz (5.9 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.5-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cmdmate-0.1.5.tar.gz
  • Upload date:
  • Size: 5.9 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.5.tar.gz
Algorithm Hash digest
SHA256 b869fb1a4d9d7cbb9fe571533fb69cdb4ed96a88a9c5db2f36b8682dcc34f9c7
MD5 ee91c77606bbbc6c0dcb83c3dfebb031
BLAKE2b-256 1480be7bf48f2d0a36cd775cbb8d59cd16c2b10dcc07e36f16fb0e8c950f0edf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmdmate-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.9 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 05b6ba58b4985b2f29369cf8304455f0a5c531fb298383e30099700a9ad7961f
MD5 905c8bd545c9ed1720964092a9941e4f
BLAKE2b-256 5b6cf8fe56a4e5c1827feb265839c6275948d47aa09cc4dcf710a9a5e08dc153

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