monkeys

Quickstart

curl -fsSL https://monk3ys.dev/install | sh
monkeys set OPENROUTER_API_KEY

Write the thing that needs the key. It reads a variable, the way any program reads one:

cat > hello.sh <<'SCRIPT'
#!/bin/sh
curl -s https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"google/gemma-4-26b-a4b-it:free","messages":[{"role":"user","content":"say hello world"}]}' |
  python3 -c 'import json,sys; print(json.load(sys.stdin)["choices"][0]["message"]["content"].strip())'
SCRIPT
chmod +x hello.sh

Then let monkeys hand it over:

monkeys run OPENROUTER_API_KEY ./hello.sh
Hello world!

The key is in that one process and nowhere else. It never reached your shell history, your startup file, or the line you just typed. run becomes the command once the values are set, so the exit status, the output and the signals are the command's own.