CLI for PaLM API (Text Generation)
Using apt
(Debian-based distros)
- Import the public key to
/usr/share/keyrings
sudo curl -o /usr/share/keyrings/cxmrykk-archive-keyring.gpg https://repo.merrick.cam/pub.gpg
- Save the repository to
/etc/apt/sources.list.d/
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cxmrykk-archive-keyring.gpg] http://repo.merrick.cam/ stable main" \
| sudo tee /etc/apt/sources.list.d/cxmrykk.list
- Update & install
sudo apt update && sudo apt install palm
Make sure crystal
and git
are installed on the user's system.
git clone https://github.com/Cxmrykk/Palm-CLI.git
cd Palm-CLI
crystal build ./src/palm.cr
This will produce a binary named palm
in the current directory.
Usage: palm {flag} [prompt]
-h, --help Shows this message
-v, --version Prints the current version
-c, --config-path Prints the path to the configuration file
-l, --history-path Prints the path to the history file
-a, --api-path Prints the path to the api configuration file
-f, --forget Forgets the existing conversation (Resets history)
Upon first execution, the program will generate a directory in the home folder with three files: config.json
, history.json
and api.json
. Before using the program you will need to supply a valid API key to api.json
, which you can obtain here: https://developers.generativeai.google/
palm "What is the capital of France?"