CPK is a little utility script that allows you to add public keys to a server and update your private key on the client.
To add a public key, log into the server you wish to add the key to and run the following:
curl -sL public.cpk.thomasricci.dev | bash -s -- $PUBLIC_KEYWhere $PUBLIC_KEY is your public key.
To update your private key, run the following on the client:
curl -sL private.cpk.thomasricci.dev | bash -s -- $PRIVATE_KEY $PUBLIC_KEYWhere $PRIVATE_KEY is your private key or the file containing your private key, and $PUBLIC_KEY is your public key (used to set the .pub file).
CPK is made of two Bash scripts, public.sh and private.sh. It is deployed to Cloudflare Pages via a Github Actions workflow triggered on every push to main. So, to update a script, just push.
Note
The scripts can be deployed manually via the Actions tab as well.
The workflow relies on a few secrets, namely:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_IDGITHUB_TOKEN(automatically provided at runtime)