One reservation CLI for OpenTable, Tock, and Resy — search all three networks at once, watch for cancellations, book + cancel end-to-end, and track changes from a local store agents can query.
Created by @pejmanjohn (Pejman Pour-Moezzi).
Contributors: @ganes-j (Jesse Ganes), @teebs4140 (Dylan Thibault), @wbell2000 (William Bell).
Quick Start
1. Install
See Install above.
2. Verify Setup
table-reservation-goat-pp-cli doctor
This checks your configuration.
3. Try Your First Command
Usage
Run table-reservation-goat-pp-cli --help for the full command reference and flag list.
Paths & environment variables
This CLI separates local files into four path kinds:
| Kind | Contents |
|---|
config | User-editable settings such as config.toml and saved profiles |
data | Durable local data such as data.db |
state | Runtime state such as persisted queries, jobs, and teach.log |
cache | Regenerable HTTP/cache files |
Each kind resolves independently. The ladder is:
- Per-kind env var:
TABLE_RESERVATION_GOAT_CONFIG_DIR, TABLE_RESERVATION_GOAT_DATA_DIR, TABLE_RESERVATION_GOAT_STATE_DIR, or TABLE_RESERVATION_GOAT_CACHE_DIR
--home <dir> for this invocation
TABLE_RESERVATION_GOAT_HOME for a flat relocated root
- XDG env vars:
XDG_CONFIG_HOME, XDG_DATA_HOME, XDG_STATE_HOME, XDG_CACHE_HOME
- Platform defaults matching existing installs
For containers and agent sandboxes, prefer a single relocated root:
export TABLE_RESERVATION_GOAT_HOME=/srv/table-reservation-goat
table-reservation-goat-pp-cli doctor
Under TABLE_RESERVATION_GOAT_HOME=/srv/table-reservation-goat, the four dirs resolve to /srv/table-reservation-goat/config, /srv/table-reservation-goat/data, /srv/table-reservation-goat/state, and /srv/table-reservation-goat/cache.
MCP servers do not receive CLI flags from the host. Put relocation in the host env block:
{
"mcpServers": {
"table-reservation-goat": {
"command": "table-reservation-goat-pp-mcp",
"env": {
"TABLE_RESERVATION_GOAT_HOME": "/srv/table-reservation-goat"
}
}
}
}
Precedence matters in fleets: an ambient per-kind variable such as TABLE_RESERVATION_GOAT_DATA_DIR overrides an explicit --home for that kind. Use TABLE_RESERVATION_GOAT_HOME or the per-kind variables for durable fleet relocation; treat --home as the weaker per-invocation lever.
Relocation is one-way. Unsetting TABLE_RESERVATION_GOAT_HOME does not move files back to platform defaults, and doctor cannot find files left under a former root. Move the files manually before unsetting relocation variables.
Existing installs keep working because the platform-default rung matches the legacy layout. Run table-reservation-goat-pp-cli doctor --fail-on warn to check path warnings in automation.
Commands
availability
Check open reservation slots across OpenTable, Tock, and Resy
table-reservation-goat-pp-cli availability check - Check open slots for a restaurant on a specific date and party size
table-reservation-goat-pp-cli availability multi-day - Multi-day availability for a single restaurant — Mon-Sun matrix
experiences
List prepaid and tasting-menu experiences (Tock-style)
me
Read your authenticated user profile from both networks
reservations
List, book, modify, and cancel reservations (requires auth login)
OpenTable booking prefers attach mode when TABLE_RESERVATION_GOAT_OT_CHROME_DEBUG_URL is explicitly set. The attached Chrome profile must already be signed in to opentable.com. TRG_ALLOW_BOOK=prepare drives the exact date/time/party flow through an enabled final confirmation control without clicking it; only TRG_ALLOW_BOOK=1 permits that final click.
export TABLE_RESERVATION_GOAT_OT_CHROME_DEBUG_URL=http://127.0.0.1:9223
TRG_ALLOW_BOOK=prepare table-reservation-goat-pp-cli book opentable:3688 --date 2026-07-20 --time 17:00 --party 2 --agent
Attach failures are machine-readable: attach_unreachable, not_signed_in, selector_drift, form_validation, slot_taken, and incomplete_confirmation. A committed booking whose restaurant ID cannot be recovered remains a source: "book" success and carries the restaurant_id_unresolved warning alongside its human-readable hint. Diagnostics expose only a sanitized page path and allowlisted control labels. When the debug endpoint is absent, OpenTable retains the existing HTTP booking path.
Tock booking uses the signed-in Chrome session at TABLE_RESERVATION_GOAT_TOCK_CHROME_DEBUG_URL (default http://localhost:9222) when reachable, with the existing stealth-headless session fallback otherwise. It preserves legacy time-slot buttons, then tries the exact-time /search row and the modern time-combobox/experience-card flow. The attached profile must already be signed in to exploretock.com.
Agent and --no-input runs never prompt for payment data. Set TRG_TOCK_CVC to a 3- or 4-digit CVC only when the venue requires per-booking verification; an omitted required CVC returns typed cvc_required. Layout failures return typed selector_drift with diagnostics limited to a query-free page path, booleans, time labels, and allowlisted control categories.
restaurants
Search and inspect restaurants across OpenTable, Tock, and Resy
table-reservation-goat-pp-cli restaurants get - Get a restaurant's full detail — hours, address, cuisine, price band, photos, accolades
table-reservation-goat-pp-cli restaurants list - List restaurants across OpenTable, Tock, and Resy; filter by location, cuisine, price band, accolades, and party size
wishlist
Read your saved/wishlisted restaurants from both networks
Self-learning loop
This CLI caches per-question discovery so repeat queries skip the walk and structurally similar queries get answered via entity substitution. The loop also self-captures: every invocation is journaled locally, and failed-flag corrections plus fresh teaches surface as candidates on the next recall for confirm/reject judgment. Agents call recall before discovery and fire teach & after answering. See the ## Automatic learning section in SKILL.md for the full protocol.
table-reservation-goat-pp-cli recall <query> - Look up cached resources for a query before running discovery
table-reservation-goat-pp-cli teach - Record a query -> resource mapping (silent on success, safe to background with &)
table-reservation-goat-pp-cli learnings list - Inspect taught rows
table-reservation-goat-pp-cli learnings forget <query> - Undo a teach
table-reservation-goat-pp-cli learnings candidates - List auto-captured candidates awaiting confirm/reject
table-reservation-goat-pp-cli learnings stats - Local loop metrics: recall hit rate, teach-to-reuse, playbook resolution, candidate counts
table-reservation-goat-pp-cli teach-pattern - Install a query/resource template up front
table-reservation-goat-pp-cli teach-lookup - Add an entity mapping (e.g. country code, team alias) for pattern substitution
Pass --no-learn or set TABLE_RESERVATION_GOAT_NO_LEARN=true to disable the loop for deterministic flows.
The local store's schema version stamp is one-way: once this version of table-reservation-goat-pp-cli opens the database, older binaries refuse it with a version error — upgrade the binary rather than downgrading.
Output Formats
# Human-readable table (default in terminal, JSON when piped)
# JSON for scripting and agents
# Filter to specific fields
# Dry run — show the request without sending
# Agent mode — JSON + compact + no prompts in one flag
Agent Usage
This CLI is designed for AI agent consumption:
- Non-interactive - never prompts, every input is a flag
- Pipeable -
--json output to stdout, errors to stderr
- Filterable -
--select id,name returns only fields you need
- Previewable -
--dry-run shows the request without sending
- Explicit retries - add
--idempotent to create retries and add --ignore-missing to delete retries when a no-op success is acceptable
- Confirmable -
--yes for 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-friendly is set
Exit codes: 0 success, 2 usage error, 3 not found, 5 API error, 7 rate limited, 10 config error.
Health Check
table-reservation-goat-pp-cli doctor
Verifies configuration and connectivity to the API.
Configuration
Run table-reservation-goat-pp-cli doctor to see the resolved config, data, state, and cache directories. The platform-default config path is ~/.config/table-reservation-goat-pp-cli/config.toml; --home, TABLE_RESERVATION_GOAT_HOME, and per-kind env vars can relocate it.
Static request headers can be configured under headers; per-command header overrides take precedence.
Troubleshooting
Not found errors (exit code 3)
- Check the resource ID is correct
- Run the
list command to see available items
Generated by CLI Printing Press