Public repo hygiene (pushed to git.shrug.pw, public): - Stop redistributing NimbleBit's client code: untrack data/raw/client-* (git-ignored now; regenerable via `pp-bundle archive`). Keep only the single RE'd bundle as provenance + data/raw/README.md explaining why. - Portability: template the hardcoded /home/neil paths — env-overridable (PP_REPO_DIR/PP_SWAMP_BIN) in pp-update.sh, `%h` in the systemd units. - Untrack .claude/settings.local.json (personal/machine-specific). - README: add a "Setup (for swamp users)" section (vault secret + datastore; behaviors are self-contained in extensions/ + models/, nothing to install). - Add CLAUDE.md orienting agents: read-only guardrail, swamp wiring, repo map. No secrets/PII in HEAD or history (verified). Secrets stay in the git-ignored local `default` vault.
Pocket Pilots — tools
Read-only companion tooling for Pocket Pilots: a CLI console, a reverse-engineered board generator, and swamp trackers. Nothing here writes to the game — every command is a GET or a local computation.
Run everything from the repo root:
cd ~/dev/pocketpilots
Requires Node 18+ (for fetch) and swamp on your PATH.
Setup (for swamp users)
Everything swamp needs is in the repo — the behavior types are declared in
extensions/behaviors/*.ts (auto-discovered from extensions/) and the instances
live in models/. There is no extension to install and nothing published to a
registry; a clone is self-contained. You supply two local things: a datastore and
your own game credential.
git clone <this-repo> && cd pocketpilots
# 1. Point swamp at this repo (or run from inside it).
export SWAMP_REPO_DIR="$PWD"
# 2. The committed .swamp.yaml expects a local `default` vault (local_encryption)
# and a filesystem datastore at .swamp/ (both git-ignored — yours, not shared).
# If `swamp vault list-keys default` errors, create it:
swamp vault create local_encryption default --json
# 3. Store YOUR Pocket Pilots sync code. Get it in-game:
# Settings → Account/Sync → the sync/transfer code for your pilot.
# This is the only credential the career tracker needs; it's read-only
# (POST /api/career {op:"get"}) and never leaves your machine.
swamp vault put default pilots_sync_code # prompts for the value
# 4. Confirm it resolves, then sync your career.
swamp behavior type search pocket # should list @kneel/pocket-pilots-*
swamp behavior run pp-career sync # read-only; writes your snapshot
node bin/pp.mjs status
Notes for cloners:
- The
@kneel/namespace is just the author tag baked into each behavior'stype; you don't need to be@kneelto run them. pp-career-2/pilots_sync_code_2are a second-account convenience — ignore them (or delete thepp-career-2instance) if you only fly one account.- Game data under
data/is pre-extracted and committed, so most commands work before you ever run app-bundlesync. Seedata/raw/README.mdfor why the full client mirror is regenerated locally rather than committed.
pp — the console (bin/pp.mjs)
node bin/pp.mjs status # your career at a glance (default)
node bin/pp.mjs board # the LIVE in-game job board, right now
node bin/pp.mjs jobs [file] # score a captured board file
node bin/pp.mjs help
pp board — roll your live board
The headline tool. It reproduces the exact job board the game would show you (validated job-for-job), and shows net pay — gross minus fuel/upkeep — the way the game screen does, sorted best net-per-hour first.
node bin/pp.mjs board # auto: where you are + what you fly, from career
node bin/pp.mjs board SCPC # a specific airport you've been to
node bin/pp.mjs board SCPC skylark # ...with a specific plane
Under the hood this is a thin wrapper: the CLI figures out where you are from
your career, runs the pp-board behavior (which does all the read-only game
I/O and the roll), then renders the stored snapshot. The CLI itself never touches
the game API. To capture a board directly without the CLI:
swamp behavior run pp-board roll \
--input code=SCPC --input lat=-39.29 --input lon=-71.92 --input plane=packhorse
Auto mode reads your career snapshot to find your current airport and plane. If you just moved, refresh it first so it knows where you are:
swamp behavior run pp-career sync # read-only; updates the snapshot
node bin/pp.mjs board
Notes:
- A new board appears every 30 minutes (on :00/:30). The header shows how long the current one lasts.
- Company / event / building-project jobs aren't included yet (base, charter, connecting, tour/SAR/fire etc. all are).
pp board <CODE>needs to know whereCODEis — it works for hubs and any airport in your career. For an obscure strip you haven't visited, use auto mode while parked there.
Turn off colour with NO_COLOR=1 (e.g. piping to a file).
swamp trackers (read-only)
swamp behavior run pp-career sync # refresh your career snapshot
swamp behavior run pp-board roll --input code=.. --input lat=.. --input lon=.. --input plane=..
# capture a live board snapshot (what `pp board` runs)
swamp behavior run pp-bundle check # did the game ship a new build? (anchor drift)
swamp behavior run pp-bundle sync # extract game data from the current build
swamp behavior run pp-bundle archive # mirror the full client to data/raw/
swamp behavior run pp-leaderboard sync # public Top Pilots leaderboard
A systemd timer (pp-sync) already runs career + bundle sync every 15 min.
Verify the board generator (tests)
node test/pp-board.diff.mjs # port primitives vs the game's own functions (212k checks)
node test/pp-air.diff.mjs # airport decoder vs the game's decoder (offline)
Both exit 0 when green. They prove the ported generator (extensions/behaviors/lib/ pp-board.mjs) and airport decoder (pp-air.mjs) match the game byte-for-byte.
Where things live
| path | what |
|---|---|
bin/pp.mjs |
the pp console |
extensions/behaviors/board.ts |
the pp-board behavior (live board capture) |
extensions/behaviors/lib/pp-board.mjs |
the ported job-board generator |
extensions/behaviors/lib/pp-air.mjs |
airport-CDN decoder |
extensions/behaviors/lib/pp-extract.mjs |
game-data extraction (drift-proof anchors) |
data/raw/bundle-*.js |
the RE'd game bundle kept as provenance (see data/raw/README.md) |
data/raw/client-*/ |
local-only client mirror — git-ignored, regenerate with pp-bundle archive |
data/analysis/board-generator-re.md |
how the board generator works (the decode) |
All of this is read-only by design — see the ToS note in the decode doc.