Skip to main content

No project description provided

Project description

GPTask

GPTask is a command-line tool to leverage the power of GPT-4 to automatically format files according to specific prompts.

Installation

Download the package and install using pip:

pip install gptask_cli

Usage

The binary of the package is gptask. Here are some of the commands:

  1. To run the gptask on a specific file:
gptask -p your_prompt file

your_prompt should be a prompt stored in ~/.gptask/prompts.

  1. To run the gptask on all files in a directory:
gptask -p your_prompt example/
# Runs on /example/test.py, /example/test2.js, but NOT /example/sub/test.py
  1. To run the gptask on a glob pattern, just specify the pattern in double quotes:
gptask -p your_prompt "example/*.py"
# Runs on /example/test.py but NOT /example/test2.js or /example/sub/test.py
  1. To run the gptask on all files in a directory recursively:
gptask -r -p your_prompt example/
# Runs on /example/test.py, /example/test2.js, AND /example/sub/test.py
  1. To force execution even if some conditions are not met:
gptask -f -p your_prompt file

If a prompt doesn't exist, GPTask will display available prompts.

For example:

gptask -p non_existent_prompt example.js

This will output:

Prompt non_existent_prompt not found
Available prompts:
  doc-reviewer
  your-prompt
  ...

Contribution

Contributions are welcomed! Feel free to open an issue or create a pull request.

Running in development: Run ./scripts/test.sh or alternatively run:

rm -rf dist
poetry build
poetry install
python3 -m pip install --force-reinstall dist/gptask_cli-*-py3-none-any.whl

Deployment instructions:

python3 -m pip install homebrew-pypi-poet
python3 -m pip install gptask_cli
poet -f gptask_cli # Copy to ruby file

License

This project is licensed under the MIT License.

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

gptask_cli-0.2.0.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

gptask_cli-0.2.0-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page