This is a demo of setting up Pen.el for the first time.
The following commands run on your host machine.
sudo adduser --home /home/pen pen
sudo usermod -aG docker pen
sudo usermod -aG sudo pen
sudo login pen
git clone "https://github.com/semiosis/pen.el"
git clone "https://github.com/semiosis/prompts"
# Currently about 8GB
docker pull semiosis/pen.el:latest
mkdir -p $HOME/.pen
# Put in your keys, or do not, it's up to you!
echo "sk-<openai key here>" > $HOME/.pen/openai_api_key # https://openai.com/
echo "<ai21 key here>" > $HOME/.pen/ai21_api_key # https://www.ai21.com/
echo "<hf key here>" > $HOME/.pen/hf_api_key # https://huggingface.co/
echo "<nlpcloud key here>" > $HOME/.pen/nlpcloud_api_key # https://nlpcloud.io/
echo "<alephalpha key here>" > $HOME/.pen/alephalpha_api_key # https://aleph-alpha.de/
echo "<cohere key here>" > $HOME/.pen/cohere_api_key # https://cohere.ai/
# Add the scripts to the PATH
echo export PATH="$(realpath .)/pen.el/scripts:\$PATH" >> $HOME/.profile
# Add this to prevent C-s from freezing the terminal
echo "stty stop undef 2>/dev/null; stty start undef 2>/dev/null" | tee -a $HOME/.zshrc >> $HOME/.bashrc
# Source your .profile
. $HOME/.profile
# Run pen
pen
Assuming the key that you entered is the actual key, continue now to use Pen!
In this test, everything except Apostrophe seemed to be working on a clean installation. I have introduced a bug that I will fix soon. Done!
You will need to source ~/.profile
and setup-term.sh
upon entering a container shell.
From there, you may consult the run.sh
command for initiating the pen daemons for the first time.
These setup instructions are designed for Debian 10 or Ubuntu 20.04.
- emacs 28
https://semiosis.github.io/posts/pen-tutorial/
Get your key.
https://apps.aixsolutionsgroup.com/
You will need your own OpenAI API key.
The shell command openai-complete.sh
requires OPENAI_API_KEY
to be
provided to at as an environment variable.
It’s up to you to provide this to the script.
Alternatively, the script will look for it here $HOME/.pen/openai_api_key
.
Adjust this script for your own installation.
The following emacs init file contains the
base requirements to run pen.el
in a vanilla
emacs.
See the above init.el
file for an example of
where to load your config (after all
dependencies are loaded).
This is tested to run on a Debian 10 docker image.
pen.el
requires some external scripts to be in the path.