@eternal-sentinel/cli
v0.1.1
Published
Command-line companion for Eternal Sentinel (onceimgone.com). Confirm dead-man's-switch check-ins from your terminal.
Maintainers
Readme
Sentinel CLI
Command-line companion for Eternal Sentinel. Confirm "I'm alive" check-ins from your terminal instead of clicking a link in an email.
Install
npm install -g @eternal-sentinel/cliOr, from a clone of this repo:
cd cli
npm install
npm run build
npm link # makes `sentinel` available on $PATHRequires Node 20 or later.
First-time setup
Open the dashboard, go to Settings → Companion app, and generate a personal access token. Copy it — it's shown only once.
Run:
sentinel loginPaste the token when prompted. The CLI validates it against the server before saving.
Commands
sentinel status
Shows your current check-in state.
Sentinel status
Status: active
Cadence: monthly
Last check-in: 5/13/2026, 7:42:11 AM (12 min ago)
Next check-in: 6/13/2026, 7:42:11 AM (in 31 days)
No pending check-in. You're up to date.Add --json to print the raw API payload, suitable for piping into jq:
sentinel status --json | jq '.polling.nextCheckInDue'When a check-in is pending the output shifts to highlight it:
Sentinel status
Status: grace period 1 of 3
Cadence: monthly
Last check-in: 4/13/2026, 7:42:11 AM (30 days ago)
Next check-in: 5/20/2026, 7:42:11 AM (in 7 days)
⚠ You have a pending check-in. Run `sentinel confirm` to confirm you're alive.
Expires: 5/20/2026, 7:42:11 AM (in 7 days)
Sent via: EMAIL, SMSsentinel confirm
Resolves the pending check-in. Idempotent — succeeds even when no check-in is currently due (acknowledged-only mode).
✓ Confirmed.
Next check-in: 6/13/2026, 7:42:11 AM (in 31 days)Add --json for the raw payload.
sentinel login
Saves a personal access token to disk. Three input modes:
sentinel login # interactive prompt (recommended)
echo "$TOKEN" | sentinel login --stdin
sentinel login --token sntl_pat_... # discouraged — visible in shell historyFor self-hosted Sentinel servers, override the URL:
sentinel login --api-url https://sentinel.internal.example.comsentinel logout
Removes the local config file. Does not revoke the token server-side — to invalidate it everywhere, revoke it from the dashboard.
Config file
The CLI stores its config at a platform-appropriate path:
| OS | Path |
| --- | --- |
| Linux | $XDG_CONFIG_HOME/sentinel/config.json or ~/.config/sentinel/config.json |
| macOS | ~/.config/sentinel/config.json |
| Windows | %APPDATA%\sentinel\config.json |
On POSIX systems the file is written with mode 0600. The file contains your API URL and your bearer token in plaintext, so back it up like any other secret — and never commit it to git.
Exit codes
| Code | Meaning |
| --- | --- |
| 0 | Success. |
| 1 | Any failure (auth, network, rate limit, validation). The error message goes to stderr. |
Scripting tip: pipe stderr to /dev/null and inspect $? if you want silent failure detection.
Development
cd cli
npm install
npm run dev -- status # run a command without building
npm run dev -- login --token sntl_pat_...
npm run build # compile to ./dist
npm run test:run # run testsThe project uses TypeScript, native fetch, and commander. No native modules — clean cross-platform installs.
License
MIT.
