Skip to main content

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

Metadata

Release files for ggpt 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 ggpt 0.2.0
File Size Uploaded
ggpt-0.2.0.tar.gz 7.7 kB Details

Built distribution (wheel)

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

Total release size: 17.7 kB

Release files / ggpt-0.2.0.tar.gz

Download URL ggpt-0.2.0.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e45743246ed0e3b5e0364348f92a900989b5434a090bc2a912dae81d42e3ca0e
BLAKE2b-256 checksum
How to use checksums
7454279aa15318d2f2ff9537bf769b082005b57b81c2a6066318ef3f22d4f013
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.8.18 Linux/6.2.0-1018-azure

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

Download URL ggpt-0.2.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58eef04a87fe3bf9641673cd0b0398fdd3e37d6603f30578d8d1f915004542db
BLAKE2b-256 checksum
How to use checksums
0398b5936a9ecdd4f56547837193a29df3ef23cbda4efa3523c883a091862ca5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.8.18 Linux/6.2.0-1018-azure

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.4

2 release files

0.1.3

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