Skip to main content

Gorgeous CLI tools using GPT

Project description

ggpt

Gorgeous CLI tools using GPT.


Installation

pip install ggpt


Setup

  1. Obtain an OpenAI API key at https://beta.openai.com/account/api-keys

  2. Add it to your shell environment variables

    export OPENAI_API_KEY=<YOUR_API_KEY_HERE>
    


Usage


docstring

generates automated docstring based on code changes.

ggpt docstring [OPTIONS]

Option Description
--api-key TEXT OpenAI API Key.
If not provided, OPENAI_API_KEY environment variable is used.
--path PATH Path to the Git repository to search for code changes.
If not provided, the current directory is used.
--hash TEXT Hash of the commit to review.
If not provided, unstaged changes are reviewed by default.
--staged Include only staged changes in the review.
If not provided, unstaged changes are reviewed by default.

https://user-images.githubusercontent.com/123562684/227761450-9297f709-3d61-448c-ad78-a04f9a5f41d8.mov




review

generates automated code review based on code changes.

ggpt review [OPTIONS]

Option Description
--api-key TEXT OpenAI API Key.
If not provided, OPENAI_API_KEY environment variable is used.
--path PATH Path to the Git repository to search for code changes.
If not provided, the current directory is used.
--hash TEXT Hash of the commit to review.
If not provided, unstaged changes are reviewed by default.
--staged Include only staged changes in the review.
If not provided, unstaged changes are reviewed by default.

https://user-images.githubusercontent.com/123562684/227762097-1c42b186-014f-48fe-b116-ee5e6c39f9f7.mov




naming

suggests variable names based on submitted prompt.

ggpt naming PROMPT [OPTIONS]

Option Description
--api-key TEXT OpenAI API Key.
If not provided, OPENAI_API_KEY environment variable is used.

https://user-images.githubusercontent.com/123562684/227763626-d329f156-c7f6-4a46-bfee-57504882d62c.mov


License

MIT LISENCE

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

ggpt-0.2.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

ggpt-0.2.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ggpt-0.2.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.18 Linux/6.2.0-1018-azure

File hashes

Hashes for ggpt-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e45743246ed0e3b5e0364348f92a900989b5434a090bc2a912dae81d42e3ca0e
MD5 3514a6317a753677641ceb50596fc62c
BLAKE2b-256 7454279aa15318d2f2ff9537bf769b082005b57b81c2a6066318ef3f22d4f013

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ggpt-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.18 Linux/6.2.0-1018-azure

File hashes

Hashes for ggpt-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58eef04a87fe3bf9641673cd0b0398fdd3e37d6603f30578d8d1f915004542db
MD5 5e773bb6fd2b5b871a1dd3b10022ea1f
BLAKE2b-256 0398b5936a9ecdd4f56547837193a29df3ef23cbda4efa3523c883a091862ca5

See more details on using hashes here.

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