Documentation
Alaska Airlines CLI
alaska-airlines-pp-cli
Install
npx -y @mvanhorn/printing-press-library install alaska-airlinesInstalls the CLI binary and the agent skill for Claude Code, Codex, Cursor, Gemini CLI, Copilot, and more. Add --cli-only or --skill-only for one half. Requires Node.
Documentation
Search Alaska Airlines flights and check Atmos Rewards balance from the terminal, with offline-cached airports and agent-native JSON output.
Single static binary that talks to alaskaair.com's SvelteKit endpoints over a Chrome-fingerprinted HTTP transport. Offline SQLite cache for the airport catalog. Cookie-import auth via your logged-in Chrome session for endpoints that need a guestsession JWT. This CLI is read-only; the final pay POST is not replayable from a static binary and is not attempted.
Learn more at Alaska Airlines.
Created by @mvanhorn (Matt Van Horn). Contributors: @tmchow (Trevin Chow).
Authentication
Run auth login --chrome once. It extracts Alaska's cookies from your logged-in Chrome profile (AS_ACNT, AS_NAME, guestsession, ASSession, etc.) via your macOS keychain. Future commands replay them via Surf transport with a Chrome TLS fingerprint. Run doctor to verify the session is valid.
Quick Start
# import your Alaska cookies from Chrome - one-time setup
alaska-airlines-pp-cli auth login --chrome
# verify auth and API reachability
alaska-airlines-pp-cli doctor
# populate the local airport store
alaska-airlines-pp-cli airports sync
# search for a family of 6, round trip
alaska-airlines-pp-cli flights search --origin SFO --destination SEA --depart 2026-11-27 --return 2026-11-30 --adults 2 --children 4 --json
# check current Atmos Rewards points balance
alaska-airlines-pp-cli atmos-rewards balance --json
Known Gaps
These capabilities were scoped in the manuscript for this CLI but were not implemented in this generation. They are not currently available; planning around them will fail with "unknown command" or "unknown flag" errors:
- Pre-checkout deeplink booking (
book prepare). The final pay POST is CSRF-tokened and unreplayable from a static Go binary, but the deeplink to the pre-filled cart was planned. Not implemented; the CLI ships read-only. - Family-of-N seat finder (
flights search --want-seats-together). Filter for flights with N contiguous economy seats. Not implemented. - Fare drift watch (
flights watch). Save a search, poll on an interval, notify on a price drop. Not implemented. - Award-vs-cash cost-per-mile (
flights compare --points). Cents-per-Atmos-point comparison across fare classes. Not implemented. - Atmos status progress (
atmos status). Tier progress and miles-to-next-tier joined view. Useatmos-rewards balancefor the raw points balance instead. - Multi-city smart search (
flights search multi). Multi-leg composition. Not implemented; run separateflights searchinvocations per leg. - Cookie expiry pre-flight check (
doctor --auth). Dedicated JWT decode flag. Not implemented;doctorperforms the general auth/reachability check.
Unique Features
These capabilities aren't available in any other tool for this API.
Agent-native plumbing
-
flights search --select— Generic --select flag narrows the ~50KB search/results JSON to just the fields the agent needs.Lets the agent ask for exactly what it needs and skip the chrome.
alaska-airlines-pp-cli flights search --origin SFO --destination SEA --depart 2026-11-27 --json --select flights.flightNumber,flights.fares.saver.price,flights.duration
Usage
Run alaska-airlines-pp-cli --help for the full command reference and flag list.
Commands
account
Login status, session tokens
alaska-airlines-pp-cli account login-status- Check if current cookie session is authenticatedalaska-airlines-pp-cli account token- Refresh primary session JWT
airports
Airport lookup, codeshare partner info, and full catalog
alaska-airlines-pp-cli airports get- Get airport details by IATA code, including codeshare carrier coveragealaska-airlines-pp-cli airports list- Full Alaska Airlines + codeshare airport list (IATA + city + region + lat/lon)
atmos-rewards
Atmos Rewards loyalty program account data
alaska-airlines-pp-cli atmos-rewards balance- Current Atmos Rewards points balancealaska-airlines-pp-cli atmos-rewards token-refresh- Refresh Atmos Rewards token via cookie session
cart
Cart state for a constructed itinerary deeplink (read-only inspection)
alaska-airlines-pp-cli cart- Inspect cart state for a constructed itinerary deeplink (requires--leg1and--adultsto identify the cart)
flights
Search Alaska Airlines flights with pricing, fare classes, and flexible-date matrices
alaska-airlines-pp-cli flights business- Alaska for Business program metadataalaska-airlines-pp-cli flights et-info- Electronic ticket info / general metadataalaska-airlines-pp-cli flights get-features- Feature flags scoped to a user (used internally by site)alaska-airlines-pp-cli flights search- Search flights between two airports for given dates and passenger mix. Returns the fare matrix per flight per cabin class (Saver / Main / Premium / First).alaska-airlines-pp-cli flights shoulder-dates- Flexible-date pricing matrix - get fares for dates near your target
Output Formats
# Human-readable table (default in terminal, JSON when piped)
alaska-airlines-pp-cli airports list
# JSON for scripting and agents
alaska-airlines-pp-cli airports list --json
# Filter to specific fields
alaska-airlines-pp-cli airports list --json --select id,name,status
# Dry run — show the request without sending
alaska-airlines-pp-cli airports list --dry-run
# Agent mode — JSON + compact + no prompts in one flag
alaska-airlines-pp-cli airports list --agent
Agent Usage
This CLI is designed for AI agent consumption:
- Non-interactive - never prompts, every input is a flag
- Pipeable -
--jsonoutput to stdout, errors to stderr - Filterable -
--select id,namereturns only fields you need - Previewable -
--dry-runshows the request without sending - Explicit retries - add
--idempotentto create retries when a no-op success is acceptable - Confirmable -
--yesfor explicit confirmation of destructive actions - Piped input - write commands can accept structured input when their help lists
--stdin - Offline-friendly - sync/search commands can use the local SQLite store when available
- Agent-safe by default - no colors or formatting unless
--human-friendlyis set
Exit codes: 0 success, 2 usage error, 3 not found, 4 auth error, 5 API error, 7 rate limited, 10 config error.
Health Check
alaska-airlines-pp-cli doctor
Verifies configuration, credentials, and connectivity to the API.
Configuration
Config file: ``
Static request headers can be configured under headers; per-command header overrides take precedence.
Troubleshooting
Authentication errors (exit code 4)
- Run
alaska-airlines-pp-cli doctorto check credentials Not found errors (exit code 3) - Check the resource ID is correct
- Run the
listcommand to see available items
API-specific
- auth login fails with keychain access denied — macOS asked Chrome for 'Chrome Safe Storage' access; click Always Allow in the keychain prompt and retry
- search returns empty results but the website works — your guestsession JWT may be expired; run
auth login --chrometo re-import cookies - atmos-rewards balance returns 401 — the Atmos Rewards token cookie expired; run
auth login --chrometo re-import cookies - Surf transport throws TLS errors — rebuild the binary or set ALASKA_DISABLE_SURF=1 to fall back to stdlib http (lower-fidelity fingerprint, may be flagged)
HTTP Transport
This CLI uses Chrome-compatible HTTP transport for browser-facing endpoints. It does not require a resident browser process for normal API calls.
Sources & Inspiration
This CLI was built by studying these projects and resources:
- awardwiz — TypeScript (350 stars)
- flightplan — JavaScript (130 stars)
- flight-award-scraper — Go (18 stars)
Generated by CLI Printing Press
For agents: pass /documentation/alaska-airlines/agents.md to install this CLI from a prompt.