Trying to build a basic code analysis CLI (to learn Go along the way).
- Go (> 1.18)
- OpenAI API key
-
Clone the repository:
gh repo clone varunrandery/coder
-
Navigate to the project directory:
cd coder -
Write your OpenAI API key to .env:
echo "OPENAI_API_KEY=<key>" > .env
-
Run with
go run .!
Output of /help:
Usage:
- Type your message and press Enter to get a response.
- "/new": start a new conversation.
- "/include <file-path> <prompt>": include a file in context.
- "/session": view current-conversation token consumption.
- "/model info": view current model info.
- "/model switch <model-name>": change current model.
- "/write [-code] <file-path>": write the previous response to a file. Use -code to write the first code block only.
- "/exit": exit the program.
MIT License.