CLI Run and Export
The DataParade CLI scans a codebase and generates a dataflow.json file you can import into the app to bootstrap diagrams and node properties.
Current language support for repository scanning is TypeScript, JavaScript, Python, and Terraform (.tf / .tfvars), including common AWS, Azure (azurerm), and Kubernetes (kubernetes_*) provider resources.
Local by default. A structural scan — the default — runs on your machine: your code is never uploaded, .env files are never read, and no workspace scan quota is used. Structural scans are free and unlimited, and you don’t need an account to run one. Network access happens only for features you opt in to; see What leaves your machine for the complete list.
Run the CLI
The CLI is published to npm as @dataparade/cli and requires Node 20+.
From npm (recommended):
npx @dataparade/cli scan <path>Or with pnpm:
pnpm dlx @dataparade/cli scan <path>This scans the given path and writes dataflow.json to the directory you ran the command from. List all commands and global options, or the options for scan only:
npx @dataparade/cli --help
npx @dataparade/cli scan --helpNew to the CLI? Follow Scan your first repo for the end-to-end path from scan to diagram.
Commands
scan <path>— Runs the full pipeline and writesdataflow.json.upload <file>— Sends an existingdataflow.jsonto the dashboard as an import preview draft. See Upload to dashboard.config [path]— Prints the effective scan configuration as JSON for the project at[path](default: current working directory). Defaults merge with optionaldataparade.config.jsonin that project directory and environment variables. API keys in that output are shown as<redacted>— handy for CI or before changing flags.scanandconfigresolve[path]the same way: a directory is the scan/config root; a file uses its parent directory (soconfigandscanstay aligned for monorepos and Lambda-style layouts).
Defaults worth knowing
- Security defaults:
.envfiles are not scanned by default; AI inference is on by default (opt out with--no-ai-inferenceorSCAN_AI_INFERENCE=false). See What leaves your machine, Scan arguments, and AI inference. - Upload to dashboard: After
scan, the CLI auto-uploadsdataflow.jsonby default (with or without a workspace API key). With a key, the link opens the dashboard for that workspace; without a key, the link opens sign up and attaches the preview after you create an account. You can also runuploadlater. This opens Preview & Edit in the app — it does not create an assessment by itself and does not use scan quota. See Upload to dashboard. - Workspace quota: Platform AI with a workspace API key uses workspace scan quotas (preflight, per-infer billing, complete). Structural-only scans and upload/auto-upload never call the quota API.
Deterministic output
Structural scans are deterministic: repeated scans of the same codebase with the same configuration produce the same logical graph.nodes and graph.edges in dataflow.json (run metadata such as scan duration will differ). The optional AI inference pass is additive and opt-in, and model output is not covered by this guarantee — leave it off (the default) when you need reproducible output, for example in CI.
Configuration
Scan behavior is controlled by CLI flags (Scan arguments), environment variables (Environment variables), dataparade.config.json at the scan root (Config file), and defaults. Precedence is flags → environment → config file → defaults. Structural detection and classification rules themselves come from YAML under cli/patterns/ (Scan patterns).
Running from source (contributors)
If you are working in the DataParade monorepo instead of using the published package:
cd cli
pnpm build
node dist/bin/cli.js scan <path>From the repository root (with the CLI already built): pnpm --filter @dataparade/cli exec node dist/bin/cli.js scan <path>. Everywhere the docs show npx @dataparade/cli …, the built node dist/bin/cli.js … form is equivalent.
In this section
- What leaves your machine — exactly which features make network calls, what they send, and how to opt out.
- Scan patterns — YAML files under
cli/patterns/that drive detectors, property inference, classifiers, and optional AI topology. - Scan arguments — positional path and every
scanflag. - dataparade.config.json — project config file, precedence, default excludes, and field reference.
- AI inference — per-node third-party enrichment, tool-loop controls, data-flow insights, and agentic trace metadata.
- Upload to dashboard — auto-upload after
scan, theuploadcommand, preview deep links, and quota behavior. - Environment variables —
SCAN_*,SCAN_BYOK_*,DATAPARADE_WORKSPACE_API_KEY,DATAPARADE_APP_URL, optional OpenAI and LangSmith variables, andcli/.env. - Output and results — console behavior, the
dataflow.jsonwrapper, and which properties are filled from code.