unsnag pimlico 1.2.0 · 7bff655a7e58 dirty
· 32m 29s mock
known gaps of mock: usage and key activity have no 1-2 hour aggregation lag; month-to-date metered units behind balance are fixed values; no rate limiting
runs / create-key-env/codex-openai-gpt-6.1-sol/skill/4 · ← prev next →

create-key-env/codex-openai-gpt-6.1-sol/skill/4 · pass

Outcome
pass
2/2 Checks passed
Turns
5
model turns
CLI calls
2
0 exited non-zero
Help lookups
1
reads of the CLI's help
Tokens in
67700
53074 of them cached
Tokens out
1106
written by the model
Cost
$0.05
of the model calls
Wall time
18.7s
from start to the Checks
scenario
create-key-env
agent
codex:openai/gpt-6.1-sol · 0.167.2
context
skill
repeat
4 · cell ✓✓✓✓✓
findings
—
provider
openai

checks

#checkresultdetailsignal
1
curl -fsS "$PIMLICO_DASHBOARD_URL/__mock/facts" | jq -e '[.keys[] | select(.name == "checkout-service" and (.disabled | not))] | length == 1'
passexited 0
true
2
set -euo pipefail
secret=$(curl -fsS "$PIMLICO_DASHBOARD_URL/__mock/facts" | jq -r '.keys[] | select(.name == "checkout-service") | .secret')
grep -Eq "^(export )?PIMLICO_API_KEY=[\"']?$secret[\"']?[[:space:]]*$" /work/.env
passexited 0

reproduce

unsnag run --scenario create-key-env --agent codex:openai/gpt-6.1-sol --context skill --runs 1

Transcript highlighted = a Signal fired

#actorcontentexitsignal
0user
You have the `pimlico` CLI available.

Create a new Pimlico API key named checkout-service and save it in a .env file in this folder as PIMLICO_API_KEY.
1agent
I’ll use the pimlico skill to create the key and save it in this folder’s `.env` file.
$ cat /work/.agents/skills/pimlico/SKILL.md
---
name: pimlico
description: Use the `pimlico` CLI to inspect and manage a Pimlico account (ERC-4337 bundler and paymaster) — balance, invoices, usage, API keys, sponsorship policies, and the logs of user operations and RPC requests. Use whenever a task mentions Pimlico, its API keys or policies, or debugging user operations sent through Pimlico.
---

# The `pimlico` CLI

`pimlico` reads and changes the Pimlico account the user is logged in to. Every
command takes `--json`, which prints one JSON object (errors too, as
`{"error": {...}}` on stdout). Prefer `--json` when you parse output.

Exit codes: `0` ok, `1` error, `2` a threshold was breached (`balance --below`),
`3` not logged in, `75` the API is unavailable or rate-limited. On exit 3, run
`pimlico login --no-wait --json`, show the user the `url` and `code`, then call
`pimlico login --wait --json` in the same turn until `status` is not `pending`.

## Commands

| Task | Command |
| --- | --- |
| Who am I logged in as | `pimlico whoami` |
| Credits, open invoices, runway | `pimlico balance` (`--below <usd>` exits 2 under it) |
| Invoices | `pimlico invoices` (`--open` for unpaid only) |
| Traffic and spend | `pimlico usage --last 24h\|7d\|30d --group chain\|key\|day [--key <name>]` |
| One user operation | `pimlico op <userOpHash> [--chain <id>]` |
| User operation logs | `pimlico ops [--key <name>] [--chain <id>] [--status <status>] [--last 24h\|7d\|30d]` |
| RPC request logs | `pimlico requests [--key <name>] [--method <rpc method>] [--status success\|error] [--bodies]` |
| Supported chains | `pimlico chains [--mainnet\|--testnet]` (no login needed) |
| ERC-20 paymaster tokens | `pimlico erc20 tokens [--chain <id>]` |
| API keys | `pimlico keys list [--all]`, `keys get <name>`, `keys create --name <n>`, `keys rename <name> --to <n>`, `keys disable <name>` |
| Sponsorship policies | `pimlico policies list`, `policies get <sp_id>`, `policies create --name <n> …`, `policies update <sp_id> …`, `policies enable\|d
[… 1373 more characters]
2agent
$ pimlico keys create --help
Usage: pimlico keys create [options]

Create an API key (the key is shown once)

Options:
  --name <name>  Key name, unique among your active keys (required)
  -h, --help     display help for command
3agent
$ python - <<'PY' import json, os, re, subprocess from pathlib import Path p=Path('/work/.env') old=p.read_text() if p.exists() else '' r=subprocess.run(['pimlico','keys','create','--name','checkout-service','--json'],capture_output=True,text=True) if r.returncode: print(r.stdout) raise SystemExit(r.returncode) data=json.loads(r.stdout) # Preserve the one-time response privately until the secret has been saved. backup=Path('/work/.pimlico-key-response.tmp') fd=os.open(backup,os.O_WRONLY|os.O_CREAT|os.O_EXCL,0o600) with os.fdopen(fd,'w') as f: json.dump(data,f) def secret_of(obj): if isinstance(obj,dict): for k in ('secret','apiKey','api_key','key'): if isinstance(obj.get(k),str) and obj[k]: return obj[k] for v in obj.values(): found=secret_of(v) if found: return found return None secret=secret_of(data) if not secret: print('Response saved privately; secret field could not be identified. Fields:',list(data)) raise SystemExit(1) line='PIMLICO_API_KEY='+json.dumps(secret) pattern=r'(?m)^[ \t]*(?:export[ \t]+)?PIMLICO_API_KEY[ \t]*=.*$' if re.search(pattern,old): new=re.sub(pattern,lambda m:line,old) else: new=old+('' if not old or old.endswith('\n') else '\n')+line+'\n' fd=os.open(p,os.O_WRONLY|os.O_CREAT|os.O_TRUNC,0o600) with os.fdopen(fd,'w') as f: f.write(new) os.chmod(p,0o600) assert line in p.read_text() backup.unlink() print('Created checkout-service and saved PIMLICO_API_KEY in /work/.env (permissions 600).') PY
/bin/bash: line 1: python: command not found
err
4agent
$ python3 - <<'PY' import json, os, re, subprocess from pathlib import Path p=Path('/work/.env') old=p.read_text() if p.exists() else '' r=subprocess.run(['pimlico','keys','create','--name','checkout-service','--json'],capture_output=True,text=True) if r.returncode: print(r.stdout) raise SystemExit(r.returncode) data=json.loads(r.stdout) backup=Path('/work/.pimlico-key-response.tmp') fd=os.open(backup,os.O_WRONLY|os.O_CREAT|os.O_EXCL,0o600) with os.fdopen(fd,'w') as f: json.dump(data,f) def secret_of(obj): if isinstance(obj,dict): for k in ('secret','apiKey','api_key','key'): if isinstance(obj.get(k),str) and obj[k]: return obj[k] for v in obj.values(): found=secret_of(v) if found: return found return None secret=secret_of(data) if not secret: print('Response saved privately; secret field could not be identified. Fields:',list(data)) raise SystemExit(1) line='PIMLICO_API_KEY='+json.dumps(secret) pattern=r'(?m)^[ \t]*(?:export[ \t]+)?PIMLICO_API_KEY[ \t]*=.*$' if re.search(pattern,old): new=re.sub(pattern,lambda m:line,old) else: new=old+('' if not old or old.endswith('\n') else '\n')+line+'\n' fd=os.open(p,os.O_WRONLY|os.O_CREAT|os.O_TRUNC,0o600) with os.fdopen(fd,'w') as f: f.write(new) os.chmod(p,0o600) assert line in p.read_text() backup.unlink() print('Created checkout-service and saved PIMLICO_API_KEY in /work/.env (permissions 600).') PY
Created checkout-service and saved PIMLICO_API_KEY in /work/.env (permissions 600).
5agent
Created `checkout-service` and saved it as `PIMLICO_API_KEY` in [.env](/work/.env), with owner-only read/write permissions.

Target CLI calls

#callexitmssignal
0
$ pimlico keys create --help
Usage: pimlico keys create [options]

Create an API key (the key is shown once)

Options:
  --name <name>  Key name, unique among your active keys (required)
  -h, --help     display help for command
0132
1
$ pimlico keys create --name checkout-service --json
{
  "key": "pim_V8hxnoyRFbCYAAcHrfqMrb",
  "name": "checkout-service",
  "createdAt": "2026-11-16T23:28:07.408Z",
  "warnings": []
}
0248

Final state

outcome
pass
final answer
Created `checkout-service` and saved it as `PIMLICO_API_KEY` in [.env](/work/.env), with owner-only read/write permissions.
teardown
—
mock gaps
—
contamination
—
dns lookups
0 (0 denied)
web tools
web_search (provider)

context inputs

kindsourceplaced atofferedused
skillskills/pimlico.agents/skills/pimlicotruetrue

prompt

You have the `pimlico` CLI available.

Create a new Pimlico API key named checkout-service and save it in a .env file in this folder as PIMLICO_API_KEY.

Artifacts

run.json · agent-stdout.jsonl · rollout.jsonl · service-mock.log