Skip to content

Interface Contracts: CLI Full-Stack Parity ​

Feature: 031-cli-fullstack-parityDate: 2026-11-16

1. CLI Command Tree (src/camply/cli/) ​

text
camply [--provider PROVIDER] [--debug | --no-debug] [--help] [--version]
├── providers [--debug | --no-debug] [--json]
├── recreation-areas [--provider PROVIDER] [--debug | --no-debug]
│                    [--search TEXT] [--state CODE] [--limit N] [--json]
├── campgrounds [--provider PROVIDER] [--debug | --no-debug]
│               [--search TEXT] [--state CODE]
│               [--rec-area ID]... [--campground ID]...
│               [--limit N] [--json]
├── campsites [--provider PROVIDER] [--debug | --no-debug]
│             [--rec-area ID]... [--campground ID]... [--campsite ID_OR_NAME]...
│             --start-date YYYY-MM-DD ... --end-date YYYY-MM-DD ...
│             [--day DAY]... [--weekends] [--nights N]
│             [--campsite-type TYPE]... [--electric] [--accessible] [--rv-length FEET]
│             [--notifications CHANNEL]... [--state-file PATH]
│             [--search-once] [--interval MINUTES] [--json]
├── test-notifications [--debug | --no-debug]
│                      --notifications CHANNEL ...
├── serve                       (unchanged)
│   ├── frontend
│   ├── backend
│   ├── worker
│   ├── beat
│   └── healthcheck
└── db                          (info, migrate, delete unchanged)
    ├── info
    ├── migrate
    ├── delete
    └── metadata [--provider-id ID_OR_NAME_OR_ALL] [--provider NAME_OR_ALL]

2. Option & Validation Contracts ​

camply campsites New Options ​

OptionType / ChoicesDefaultContract & Validation
--campsiteRepeatable string()Exact campsite ID or case-insensitive campsite name. Requires at least one --campground or --rec-area. Rejects blank strings.
--campsite-typeRepeatable case-insensitive (TENT, RV, CABIN, OTHER)()Fails with UsageError if the selected provider's filter_capabilities.preferred_types is False.
--electricFlag (bool)FalseRequire electric hookup (is_electric is True). Fails if filter_capabilities.require_electric is False.
--accessibleFlag (bool)FalseRequire ADA accessibility (is_accessible is True). Fails if filter_capabilities.require_accessible is False.
--rv-lengthInteger (1..200)NoneMinimum compatible vehicle/RV length in whole feet (max_vehicle_length >= N). Rejects <= 0 or > 200 and unsupported providers.
--notificationsRepeatable case-insensitive (pushover, ntfy)()When omitted, console-only mode runs with zero credential reads.
--state-fileFile pathNoneOptional JSON file path storing seen stay keys across runs to suppress duplicate alerts.
--search-onceFlag (bool)FalsePerform one availability check cycle and exit 0.
--intervalInteger (>= 5)10Wait interval in minutes between continuous checks. Rejects values < 5.
--jsonFlag (bool)FalseEmit JSON array of stays to stdout and route all logs to stderr. Requires --search-once.

camply test-notifications Options ​

OptionType / ChoicesRequiredContract & Validation
--notificationsRepeatable case-insensitive (pushover, ntfy)YesSelect one or both channels to verify.
--debug/--no-debugBoolean flagNoStandard diagnostic switch; never logs secret tokens.

camply recreation-areas & camply campgrounds New Options ​

OptionTypeDefaultContract & Validation
--limitInteger 1..50050Maximum results to display; probes limit + 1 upstream to emit a truncation warning when more than --limit exist.
--jsonFlag (bool)FalseEmit JSON array of discovery results to stdout and route all logs to stderr.

camply providers New Behavior ​

  • --json flag emits structured provider metadata including filter_capabilities.
  • Standard log output includes supported site-attribute filters (e.g., site types, electric, accessible, RV length) alongside discovery and availability capabilities.

camply db metadata New Behavior ​

  • --provider-id (and alias --provider) accepts numeric provider IDs (1–26), canonical CLI provider names/aliases (case-insensitive, e.g. RecreationDotGov, ReserveCalifornia), or all.