Skip to main content

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.

Release files for gptask-cli 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gptask-cli 0.2.0
File Size Uploaded
gptask_cli-0.2.0.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gptask-cli 0.2.0
File Interpreter ABI Platform
gptask_cli-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.8 kB

Release files / gptask_cli-0.2.0.tar.gz

Download URL gptask_cli-0.2.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6c749b5493b5a3238a03ade45d66160929ed2f24b0dc6e896db6fe64788984fc
BLAKE2b-256 checksum
How to use checksums
c7e7170fa05a10ca62ac71622d85e50b372d6403099fcdbf2dd3a12c3748c724
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.0 Darwin/22.1.0

Release files / gptask_cli-0.2.0-py3-none-any.whl

Download URL gptask_cli-0.2.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cd81af17a3ebd856588f0a72f02bea997d7ef5fdb79328510c8016d873e7f74
BLAKE2b-256 checksum
How to use checksums
73ce8acb88d27a6d395bcd882542a7a1a88aacd93eb83e337f0e21227127f682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.0 Darwin/22.1.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page