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 -a "what is docker"
cmdmate --ask "how does git rebase work"

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

Response based on input

$ cat ReadMe.md | cmdmate "summarize this file for me"
$ git diff | cmdmate "what does the changes do?"
$ cat app.log | cmdmate "can you find any errors in the log file?"

Command Line Options

Option Short Description
query - The command or task you want to perform
--os -o Target OS (auto-detected if not provided)
--ask -a 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.7

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.7.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.7-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cmdmate-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 b58afefbbb35e702b4d2d828592f5d1aca20c38465d2d3fb463990ef3b36f6bc
MD5 3ef48f4a05e976f8755b79fe095b1d01
BLAKE2b-256 7d7616ef2a34da56cde0c56dba5b76c61cae5042152cbf2034a8b2047a9b5858

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmdmate-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 7.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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 fce94379d8d8a1a82c9112d4b241741475b70fa56f0674b8e25a2a325bf53481
MD5 1ae42d68bfde35fb6d915051f84371e2
BLAKE2b-256 11c9ace4554c5e532931c073ad8a3698943354f17bb702b78bc2e928568c4482

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