GPTCLI
👉 https://github.com/FlorianMgs/gpt-cli
This library provides a UNIX-ey interface to OpenAI.
Say hello to your own highly specialized GPT4 personal assistant, directly in your terminal!
Productivity stonks 📈
Consider 🌟 the repo if you find this tool useful 🔥
Features
- Use the pipe to pass the output of commands to GPT or Dall-E 2.
- Choose your GPT model, GPT4 supported if you have access.
- Dall-E support: generate images directly in your terminal.
- Contexts prompts tailored for your needs: add/update predefined context prompts or write your own when running the command.
- Conversation history: have chat sessions with GPT just like https://chat.openai.com/ but in your terminal. However you'll be limited by the token number (which is 4097 for GPT3.5).
Examples
$ gpt give me a very short description of the moon landscape | gpt --dalle
Image saved in current directory to 7db7ab2e8914175d4f4819e033226563.png
$ uptime | gpt convert this to json
{
"time_of_measurement": "13:48:26",
"up_time": "30 days, 18:07",
"users": 3,
"load_average": [
0.46,
0.61,
0.79
]
}
$ gpt -c "you are Vitalik Buterin, the creator of Ethereum. You know very well the whole EVM ecosystem and how to write perfectly optimized Solidity smart contracts" -p "Write a simple ERC20 token smart contract using OpenZeppelin library, respond only by the smart contract, do no write explanations" > erc20.sol
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract MyToken is ERC20 {
constructor(uint256 initialSupply) ERC20("MyToken", "MTK") {
_mint(msg.sender, initialSupply);
}
}
$ git commit -m "$(git status | gpt write me a commit message for these changes)"
[master 7d0271f] Add new files and modify README.md
See more examples, installation & setup instructions on repo 👍