Making own Copilot-X command line with GPT-3

Thar Htet
2 min readMay 20


I’m a big fan of GitHub Copilot, and I use it all the time in VS Code and NeoVim for assisted programming and documentation writing. Recently, I was inspired by the command line output of Copilot-X, so I decided to build my own command line program that produces similar output.

My program is called AOK (all ok), and it’s based on the OpenAI GPT-3.5 Chat completion API.

AOK is still under development, but I’m really happy with how it’s turned out so far. It’s a great way to get help with programming, and it can save you a lot of time.

If you’re interested in trying AOK, the code is available on GitHub.

Here are some additional details about AOK:

  • The system prompt is optimized to be sensitive to certain keywords to produce concise output like in Copilot-X command line output.
  • The system prompt baseline is about 250 tokens and output is limited to 512 tokens, the total is kept under 1000 tokens.
  • It is estimated to be about 2 cents per 10 queries.
  • The program does not keep the chat history or store it in a file.

The system prompt is designed to be sensitive to the followings;

  1. Command for, Command to and How to are used to generate a command code example and explanation.
  2. What is and Explain are used to generate a definition and explanation.
  3. Code example and Sample code are used to generate a code example in a specified language and explanation.
  4. Steps or step by step are used to generate a numbered list of step-by-step guide.
  5. Summary or Summarize are used to generate a summary of the input text or code.
  6. If there is no specific instruction in the input, it will summarize the input text or code.

I hope you find AOK helpful!

Example usage video as follows:



Thar Htet

A Software Engineer turned Entrepreneur, running a Software Company in Myanmar serving Web, Mobile and Cloud solutions to Consumer, Businesses & Public.