Public Lever postings API (https://api.lever.co/v0/postings). Every Lever
customer exposes an open job board at api.lever.co/v0/postings/{company}
with mode=json, no authentication. The company slug is a path segment
that identifies the employer (e.g. leverdemo, netflix, eventbrite).
Generic CLI: the company slug is the first positional argument on every
command. lever postings list stripe lists Stripe's open roles when
Stripe publishes through Lever.
Quick Start
1. Install
See Install above.
2. Verify Setup
lever-pp-cli doctor
This checks your configuration.
3. Try Your First Command
lever-pp-cli postings list mock-value
Usage
Run lever-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:
LEVER_CONFIG_DIR, LEVER_DATA_DIR, LEVER_STATE_DIR, or LEVER_CACHE_DIR
--home <dir> for this invocation
LEVER_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 LEVER_HOME=/srv/lever
lever-pp-cli doctor
Under LEVER_HOME=/srv/lever, the four dirs resolve to /srv/lever/config, /srv/lever/data, /srv/lever/state, and /srv/lever/cache.
MCP servers do not receive CLI flags from the host. Put relocation in the host env block:
{
"mcpServers": {
"lever": {
"command": "lever-pp-mcp",
"env": {
"LEVER_HOME": "/srv/lever"
}
}
}
}
Precedence matters in fleets: an ambient per-kind variable such as LEVER_DATA_DIR overrides an explicit --home for that kind. Use LEVER_HOME or the per-kind variables for durable fleet relocation; treat --home as the weaker per-invocation lever.
Relocation is one-way. Unsetting LEVER_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 lever-pp-cli doctor --fail-on warn to check path warnings in automation.
Commands
postings
Manage postings
lever-pp-cli postings get - Retrieve a single posting
lever-pp-cli postings list - List all open postings for a company
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.
lever-pp-cli recall <query> - Look up cached resources for a query before running discovery
lever-pp-cli teach - Record a query -> resource mapping (silent on success, safe to background with &)
lever-pp-cli learnings list - Inspect taught rows
lever-pp-cli learnings forget <query> - Undo a teach
lever-pp-cli learnings candidates - List auto-captured candidates awaiting confirm/reject
lever-pp-cli learnings stats - Local loop metrics: recall hit rate, teach-to-reuse, playbook resolution, candidate counts
lever-pp-cli teach-pattern - Install a query/resource template up front
lever-pp-cli teach-lookup - Add an entity mapping (e.g. country code, team alias) for pattern substitution
Pass --no-learn or set LEVER_NO_LEARN=true to disable the loop for deterministic flows.
The local store's schema version stamp is one-way: once this version of lever-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)
lever-pp-cli postings list mock-value
# JSON for scripting and agents
lever-pp-cli postings list mock-value --json
# Filter to specific fields
lever-pp-cli postings list mock-value --json --select id,name,status
# Dry run — show the request without sending
lever-pp-cli postings list mock-value --dry-run
# Agent mode — JSON + compact + no prompts in one flag
lever-pp-cli postings list mock-value --agent
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
- Read-only by default - this CLI does not create, update, delete, publish, send, or mutate remote resources
- 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
lever-pp-cli doctor
Verifies configuration and connectivity to the API.
Configuration
Run lever-pp-cli doctor to see the resolved config, data, state, and cache directories. The platform-default config path is ~/.config/lever-postings-pp-cli/config.toml; --home, LEVER_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