Skip to main content

The ChatGPT command-line wrapper simplifies the execution of predetermined tasks through ChatGPT.

Project description

GPT simplify your daily Workflow (gptW)

It is no longer necessary to manually input prompts and interact with ChatGPT

With the GPTW tool, prompt operations are fully automated! Simplify your daily workflow.

Example

Translate

You can simply use the "ww" command without having to first instruct ChatGPT that the following task is a translation

Translate to English

$ ww e "今天天气怎么样"

How's the weather today?

Translate to Chinese

$ ww c "who are you? "

你是谁?( shì shéi?)

Polish the document

Polish a document, supporting files as input.

ww d -f README.md

Code Review

$ ww r -f gptw/gptw.py

As an AI language model, I cannot run the code provided, but I can provide some feedback based on the code structure and syntax.

1. The code seems to be well-organized and follows PEP 8 guidelines for Python code.

2. The argparse module is used to parse command-line arguments, which is a good practice for command-line applications.

...

Overall, the code seems to be well-written and organized, but could benefit from some additional security measures and error handling.

Ask

Ask ChatGPT directly

$ ww a "who are you? "

I am an AI language model created by OpenAI.

Add your custom prompt

Prepare your prompt and modify the gptw/config.json file following the existing format. Then, submit a PR or directly raise an issue to explain the command you want to add.

gtpw/config.json:

{
    "version": "v1.0.0",
    "cmds": {
        ## cmd to use
        "e": {
            ## replace with your prompt
            "prompt": "Please translate the following text into English, and polish it to make it sound more natural and in line with native speaker conventions. Please refrain from providing any additional output beyond the translated text",
            ## A simple explanation of what this prompt is used for
            "_comment": "Translate into English"
        },
        ...
    }
}

Currently, the following workflows are supported. You can run "ww -l" to obtain the available workflows.

$ ww --list

cmd | meaning                        | example
e   | Translate into English         | ww e 你好
c   | Translate into Chinese         | ww c how r u
p   | Polish sentence                | ww p hwo are you
a   | Just ask ChatGPT directly      | ww a who are you
d   | Polish document                | ww d -f README.md
r   | Code Review                    | ww r -f gptw/gptw.py
dic | Dictionary                     | ww dic dictionary

Installation

pip install --upgrade gptw
ww --key sk-..... # set your OpenAI API key

Uninstall

pip uninstall gptw

Development

pip install tox
make test

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

gptw-0.1.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

gptw-0.1.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file gptw-0.1.1.tar.gz.

File metadata

  • Download URL: gptw-0.1.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for gptw-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a2d2b7e8cda7b37c283c7cda9a6ce0cf11f52c4e4b9f8df1e82f9fb6e574902c
MD5 7be39b7cfae1a8c4612ca4f493c30597
BLAKE2b-256 b1b34340cf970180f3059fff86244804ae66ab2605d557dd6df6f165b975de69

See more details on using hashes here.

File details

Details for the file gptw-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gptw-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for gptw-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f994a566a3bea7bf42d5a25d7e24a6a873c5f60e06435252fd61b52152a52a9
MD5 d83db9e361640ad5584bbce1a2a9e942
BLAKE2b-256 713b88c5510ed342813ea3d55b8dd4c91871a853d9349de2910b874d74697073

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