CLI Commands
Reference for the Recce command-line tools.
Overview
Recce provides two pip packages:
-
recce-cloud (
pip install recce-cloud) - Lightweight library for Cloud operations. Cloud users only need this to connect to sessions.- Prerequisite: Recce Cloud setup completed
-
recce (
pip install recce) - Full OSS library with local server for data validation and diffing.- Prerequisite: OSS Setup completed
recce-cloud Commands
Connect to Cloud sessions locally or upload artifacts in CI/CD pipelines.
Installation
Connect to Cloud sessions
Step 1: Authenticate
Step 2: Initialize the project
Link your local project to your Cloud organization:
Step 3: Find your session
Step 4: Launch the server
The server runs locally on http://localhost:8000 but fetches state from Cloud. Your changes automatically sync back when you close the session.
CI/CD integration
Upload dbt artifacts to Cloud in your pipelines:
# CD workflow: Upload baseline after merge to main
recce-cloud upload --type prod
# CI workflow: Upload PR artifacts (auto-detected)
recce-cloud upload
Environment variables:
| Platform | Variable | Description |
|---|---|---|
| GitHub | GITHUB_TOKEN |
Authentication token (automatic in Actions) |
| GitLab | CI_JOB_TOKEN |
Authentication token (automatic in CI/CD) |
See Setup CI and Setup CD for complete guides.
Command reference
recce-cloud login
| Option | Description |
|---|---|
--status |
Check current authentication status |
recce-cloud init
Links your local project to a Cloud organization and project.
recce-cloud list
| Option | Description |
|---|---|
--type <type> |
Filter by session type: pr, dev, prod |
recce-cloud upload
| Option | Description |
|---|---|
--type <type> |
Session type: prod for baseline, omit for auto-detection |
--target-path <path> |
Path to dbt artifacts. Default: target/ |
--dry-run |
Test configuration without uploading |
recce Commands
Run data validation locally with the full OSS library.
Installation
Local development workflow
# Start interactive session
recce server
# Continue from saved state
recce server my_state.json
# Share with reviewer (they load in review mode)
recce server --review my_state.json
See OSS Workflow for the complete guide.
Command reference
recce server
Arguments:
| Argument | Description |
|---|---|
STATE_FILE |
Optional state file path. Loads if exists, creates if not. |
Options:
| Option | Description |
|---|---|
--session-id <id> |
Connect to a Cloud session by ID |
--review |
Review mode. Uses artifacts from state file instead of target/ |
--port <port> |
Port to run the server on. Default: 8000 |
--api-token <token> |
API token for Cloud connection |
Notes:
- Runs on
http://localhost:8000by default - For OSS usage, requires artifacts in
target/andtarget-base/unless using--reviewmode
recce run
Executes preset checks and saves results to a state file.
| Option | Description |
|---|---|
--state-file <file> |
Path to state file. Default: recce_state.json |
--github-pull-request-url <url> |
GitHub PR URL for CI context |
recce summary
Generates a summary report from a state file.
recce debug
Verifies configuration and environment setup.
Checks for required artifacts and warehouse connection.
recce --help
Display all available commands and options.
Troubleshooting
Port already in use
If port 8000 is already in use, specify a different port:
Summary fails with "state file is required for review mode"
recce summary recce-state.json
[Error] Failed to generate summary
The state file is required for review mode
The recce summary command requires artifacts embedded in the state file. State files from local sessions may not include artifacts. Export a state file from a review session or use Cloud for summary generation.
Related
- Configuration - Preset check configuration
- State File - State file format