-
Notifications
You must be signed in to change notification settings - Fork 4
Home
After install, the first thing to do is to set the OpenAI token using the command cb set-token YOU_TOKEN
. This command will save the API Key on your machine.
To get a token, go to the API keys page and generate a new API key.
There are only 3 global flags.
-
-model
: used to set the AI model (default is "gpt-3.5-turbo"). -
-token
: used to set the token to be used for the request. (if you have usedset-token
this flag will never be needed). -
-debug
: in some cases, show more information about the request.
Create a file with the response from ChatGPT.
-
cb create test -path [FILE|DIR]
: Reads a file or each file from the directory, sends to the AI asking to write a unit test. After get a response, write a new file with the same name plus the suffix _test. If the flag-output
wasn't set on the command, the file will be written in the same directory as the original. -
cb create file -content "write a poem about cpu and memory" -output ~/cpu_mem.txt
: This command will send the content of the flag-content
to the AI and then write a file set on-output
with the content of the response.
Do something with a file.
-
cb do code-review -path ./category/utils.go
: Reads theutils.go
file and send to the AI asking for a code review. The response will be printed on your terminal.
Send a single message to AI.
-
cb message can you sing?
: Sends all words after "message" to the AI. The response will be printed on your terminal.
Starts a new chat with ChatGPT.
-
cb chat
: Starts a new multi-turn chat with ChatGPT. To exit the chat, press ctrl + c.