Skip to main content

A CLI tool to get UNIX commands from text explanations using AI

Project description

❓💻 watcmd

A CLI tool to get UNIX commands from text explanations using AI

Installation

You can install watcmd directly from PyPI:

pip install watcmd

Setup

After installation, you need to configure your OpenRouter API key. You can do this by running:

watcmd --setup YOUR_API_KEY

Replace YOUR_API_KEY with your actual OpenRouter API key (get one at https://openrouter.ai/keys). This will save your API key securely in a configuration file, so you don't need to set it as an environment variable each time.

Alternatively, you can set the OPENROUTER_API_KEY environment variable.

Usage

Once you've set up your API key, you can use the tool like this:

watcmd your command description

For example:

watcmd to list all files in a directory

The tool will return an explanation of how to perform the task in a UNIX system.

You can also use the explicit query command:

watcmd query your command here

Development

If you want to contribute or modify the tool:

  1. Clone this repository:

    git clone https://github.com/alramalho/watcmd.git
    cd watcmd
    
  2. Install the package in editable mode:

    pip install -e .
    
  3. Make your changes and test them locally.

Publishing to PyPI

To publish updates to PyPI:

  1. Update the version in pyproject.toml
  2. Build the package: python -m build
  3. Upload to PyPI: python -m twine upload dist/*

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Alex Ramalho (@alramalho)

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

watcmd-0.2.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

watcmd-0.2.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file watcmd-0.2.0.tar.gz.

File metadata

  • Download URL: watcmd-0.2.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for watcmd-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1dd43495595717eb58f033aa6d12372c788970fad62029d7f3200821dca643fe
MD5 19d1d8ab5b094b4098b6ed5fcb51ea4e
BLAKE2b-256 33dd953753f0b73a41eb4e64f2f1ff519ab64d4f145ec6123064266741cebe9b

See more details on using hashes here.

File details

Details for the file watcmd-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: watcmd-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for watcmd-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cabde31b4086da6fe46993e34378aafc0a2247aa98063f17f1ec0ddd0e9bfe28
MD5 cef0be934551d6df8ea8109466478880
BLAKE2b-256 59cd45bfcf7e5280d83477adbab6dce4dc3879acc3dc7e2c27fe67bb60767cc7

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