Skip to content
Fallow home
All docs pages

Docs home

fallow coverage

Find the subcommands, options, output and exit codes of fallow coverage, which sets up, analyzes and uploads runtime coverage.

Set up runtime coverage, analyze it, and upload the data that Fallow Cloud joins with it.

For what runtime coverage reports and how to collect it, read Runtime coverage. One local capture is free. Continuous capture needs a license. The commands that read from or upload to Fallow Cloud need an API key.

Synopsis

fallow coverage [OPTIONS] <COMMAND>

Subcommands

SubcommandDescription
setupResumable first-run setup: license, runtime coverage add-on, recipe, analysis
analyzeAnalyze runtime coverage from a local artifact or explicit cloud source
upload-inventoryUpload a static function inventory to Fallow Cloud.
upload-source-mapsUpload JavaScript source maps to Fallow Cloud for bundled runtime coverage
upload-static-findingsUpload static dead-code findings to Fallow Cloud for the source-evidence viewer
review-packetRead the production facts of changed code from Fallow Cloud
deployment-changesRead how production behavior changed between two deployments

setup

Check the license, find or install fallow-cov (the separate program that reads coverage data), write a collection recipe to docs/collect-coverage.md, and run the analysis when coverage data exists. A second run continues where the first run stopped.

fallow coverage setup [OPTIONS]

Run

OptionDescription
-y, --yesAccept all prompts automatically
--non-interactivePrint instructions instead of prompting

Output

OptionDescription
--jsonEmit deterministic setup instructions as JSON. Implies --non-interactive

Fallow Cloud

OptionDefaultDescription
--cloudPlan the Fallow Cloud setup: beacon snippets with the deployed commit SHA, and CI steps that upload the inventory and source maps and register the deployment for that SHA. Writes nothing
--waitWith --cloud: poll Fallow Cloud until every setup step is done. Reads $FALLOW_API_KEY.
--wait-timeout <SECS>600With --wait: the longest wait in seconds
--project-id <PROJECT_ID>With --cloud: project identifier (owner/repo). Default: $GITHUB_REPOSITORY, then $CI_PROJECT_PATH, then the git remote
--git-sha <SHA>With --cloud: the deployed commit SHA that --wait checks. Default: git rev-parse HEAD
--api-key <KEY>With --wait: Fallow Cloud API key. Precedence: this flag > $FALLOW_API_KEY
--api-endpoint <URL>With --cloud: Fallow Cloud API base URL. Precedence: this flag > $FALLOW_API_URL > the default Fallow Cloud URL

--json writes no file, installs nothing and uses no network. --cloud prints a plan for Fallow Cloud: the beacon snippets, the CI steps and the key variables, all for one commit SHA. The plan never holds a key value. --wait reads the setup state of the deployed SHA from Fallow Cloud every 10 seconds, until each step is done or --wait-timeout passes.

Fallow finds fallow-cov in this order: FALLOW_COV_BIN, FALLOW_COV_BINARY_PATH, the project dependencies, ~/.fallow/bin/fallow-cov, then the PATH. Fallow checks the signature of fallow-cov each time it starts it. A missing or invalid signature stops the run with code 4.

analyze

Merge runtime coverage into the static analysis, from a local capture or from Fallow Cloud.

fallow coverage analyze [OPTIONS]

Input

OptionDescription
--runtime-coverage <PATH>File or directory containing local runtime coverage input. A single local capture is free.
--cloud (alias --runtime-coverage-cloud)Fetch latest runtime facts from Fallow Cloud for the selected repo

Fallow Cloud

OptionDefaultDescription
--api-key <KEY>Fallow Cloud API key. Order: flag > $FALLOW_API_KEY > fallow cloud login key
--api-endpoint <URL>Override the Fallow Cloud base URL
--repo <OWNER/REPO>Repository identifier, for example owner/repo. Defaults to $FALLOW_REPO, then the parsed origin URL from git remote get-url origin.
--project-id <ID>Optional monorepo/project disambiguator
--coverage-period <DAYS>30Runtime observation window to request from cloud (1..=90 days)
--environment <ENV>Optional runtime environment filter
--commit-sha <SHA>Optional commit SHA filter for cloud runtime facts

Detection

OptionDefaultDescription
--productionAnalyze production code only
--min-invocations-hot <MIN_INVOCATIONS_HOT>100Threshold for hot-path classification
--min-observation-volume <N>Minimum total trace volume before high-confidence verdicts
--low-traffic-threshold <RATIO>Fraction of total trace count below which an invoked function is low traffic

Output

OptionDescription
--top <TOP>Show only the top N runtime findings and hot paths
--blast-radiusShow the first-class blast-radius section in human output
--importanceShow the first-class importance section in human output
--debug-unmatchedList cloud runtime functions with no local counterpart on stderr

--runtime-coverage takes a V8 directory, a V8 JSON file or an Istanbul coverage map. Cloud mode needs --cloud, --runtime-coverage-cloud or FALLOW_RUNTIME_COVERAGE_SOURCE=cloud. An API key alone does not select it. The key comes from --api-key, FALLOW_API_KEY, or the key of fallow cloud login. --top cuts the lists before fallow renders them, so each format shows the same cut.

upload-inventory

Upload a list of each function in the project to Fallow Cloud, so the dashboard can show the functions that never ran.

fallow coverage upload-inventory [OPTIONS]

Fallow Cloud

OptionDescription
--api-key <KEY>Fallow Cloud API key (bearer token). Precedence: this flag > $FALLOW_API_KEY.
--api-endpoint <URL>Override the Fallow Cloud base URL. Useful for staging and on-premise deployments.
--project-id <PROJECT_ID>Project identifier, for example fallow-cloud-api or owner/repo. Defaults to $GITHUB_REPOSITORY, then $CI_PROJECT_PATH, then the parsed origin URL from git remote get-url origin.
--git-sha <SHA>Explicit git SHA for this inventory. Default: git rev-parse HEAD.
--vercel-deployment-id <DEPLOYMENT_ID>Bind the upload to a Vercel deployment. Defaults to $VERCEL_DEPLOYMENT_ID only when $VERCEL=1.

Input

OptionDescription
--exclude-paths <GLOB>Additional glob patterns to exclude from the walk. Applied after the existing fallow ignore rules.
--path-prefix <PREFIX>Prefix for inventory paths to match the runtime beacon, for example /app for Docker or /var/task for Lambda. Defaults to repo-relative paths.
--with-callersAlso upload importer edges (which files import each function) and the framework entry routes that can statically reach each function. Opt-in: this builds the import graph by running the full static analysis, whereas the default upload is a fast per-file walk.

Run

OptionDescription
--dry-runPrint what would be uploaded and exit. No network call
--allow-dirtyProceed even when the working tree has uncommitted changes, or when git status cannot check it. Warning: the inventory is generated from the working copy, so it may not match the uploaded git SHA.
--ignore-upload-errorsTreat transient upload failures as warnings instead of errors (exit 0). Validation and auth errors still fail hard; this only downgrades transport and server errors

Without --allow-dirty, fallow refuses a working tree with uncommitted changes. --project-id defaults to $GITHUB_REPOSITORY, then $CI_PROJECT_PATH, then the origin remote. --git-sha defaults to git rev-parse HEAD. Use $FALLOW_API_KEY on a shared runner, because other processes can see a key on the command line. Fallow skips declaration files (*.d.ts) and overload signatures. Fallow Cloud refuses an inventory of more than 200,000 functions.

--path-prefix must match the directory of the deployed code, for example /app for a Docker image with WORKDIR /app, /workspace for Cloud Run and /var/task for AWS Lambda. With a wrong prefix, the dashboard shows no untracked functions.

upload-source-maps

Upload the source maps of a build, so that Fallow Cloud can map coverage of bundled or compiled code back to the source files.

fallow coverage upload-source-maps [OPTIONS]

Input

OptionDefaultDescription
--dir <PATH>distDirectory to scan recursively for source maps
--include <GLOB>**/*.mapGlob pattern, relative to --dir, selecting maps to upload
--exclude <GLOB>**/node_modules/**Glob pattern, relative to --dir, selecting files to skip. Repeatable.
--strip-path <BOOL>trueSend only the basename as fileName by default. Use --strip-path=false when your runtime coverage reports bundle paths relative to the build directory, such as assets/app.js. Values: true, false.

Fallow Cloud

OptionDescription
--repo <NAME>Repo name used in the API path. Defaults to package.json repository.url, then git remote get-url origin.
--git-sha <SHA>Commit SHA to key uploads under. Defaults to $GITHUB_SHA, $CI_COMMIT_SHA, $COMMIT_SHA, then git rev-parse HEAD.
--vercel-deployment-id <DEPLOYMENT_ID>Bind the upload to a Vercel deployment. Defaults to $VERCEL_DEPLOYMENT_ID only when $VERCEL=1.
--endpoint <URL>Override the Fallow Cloud base URL

Run

OptionDefaultDescription
--dry-runPrint what would be uploaded and exit. No network call
--concurrency <N>4Parallel upload fanout
--fail-fastStop on first upload error

Fallow reads the API key only from FALLOW_API_KEY. --repo must match the project id of the beacon and of upload-inventory. --git-sha defaults to $GITHUB_SHA, $CI_COMMIT_SHA, $COMMIT_SHA, then git rev-parse HEAD. Fallow tries each upload up to three times after a network error or HTTP 429, 502, 503 or 504. FALLOW_CA_BUNDLE replaces the default root certificates with a PEM bundle.

For a Node service that tsc compiles, run the command from the repository root, and do not set sourceRoot in tsconfig.json.

upload-static-findings

Run the dead-code analysis, and upload the unused files and unused exports for the source view of Fallow Cloud.

fallow coverage upload-static-findings [OPTIONS]

Fallow Cloud

OptionDescription
--api-key <KEY>Fallow Cloud API key (bearer token). Precedence: this flag > $FALLOW_API_KEY.
--api-endpoint <URL>Override the Fallow Cloud base URL. Useful for staging and on-premise deployments.
--project-id <PROJECT_ID>Project identifier, for example fallow-cloud-api or owner/repo. Defaults to $GITHUB_REPOSITORY, then $CI_PROJECT_PATH, then the parsed origin URL from git remote get-url origin.
--git-sha <SHA>Explicit git SHA for these findings. Default: git rev-parse HEAD.

Run

OptionDescription
--allow-dirtyProceed even when the working tree has uncommitted changes, or when git status cannot check it. Warning: findings are generated from the working copy, so they may not match the uploaded git SHA.
--dry-runPrint what would be uploaded and exit. No network call
--ignore-upload-errorsTreat transient upload failures as warnings instead of errors (exit 0). Validation and auth errors still fail hard; this only downgrades transport and server errors

Each upload replaces the findings of the same SHA. The command runs the full analysis, so it takes more time than upload-inventory. It needs a live API key, not an ingest key.

review-packet

Read the production facts of the changed functions from Fallow Cloud. The command runs no local analysis.

fallow coverage review-packet [OPTIONS]

Fallow Cloud

OptionDescription
--api-key <KEY>Fallow Cloud API key. Order: flag > $FALLOW_API_KEY > fallow cloud login key
--api-endpoint <URL>Override the Fallow Cloud base URL
--repo <OWNER/REPO>Repository identifier, for example owner/repo. Defaults to $FALLOW_REPO, then the parsed origin URL from git remote get-url origin.
--project-id <ID>Optional monorepo/project disambiguator
--coverage-period <DAYS>Runtime observation window (1..=90 days). The cloud default is 30
--commit-sha <SHA>Optional commit SHA of the deployment to read

Scope

OptionDescription
--file <PATH>Repo-relative file to include. Repeatable
--function <FILE:NAME[:LINE]>Function to include, as FILE:NAME or FILE:NAME:LINE. Repeatable

Without --file and --function, fallow sends the source files that changed against the base. Fallow finds the base as fallow audit does: --base, then $FALLOW_AUDIT_BASE, then the merge base with the default branch. A read-only key works.

deployment-changes

Read how production behavior changed between two deployments.

fallow coverage deployment-changes [OPTIONS]

Fallow Cloud

OptionDescription
--api-key <KEY>Fallow Cloud API key. Order: flag > $FALLOW_API_KEY > fallow cloud login key
--api-endpoint <URL>Override the Fallow Cloud base URL
--repo <OWNER/REPO>Repository identifier, for example owner/repo. Defaults to $FALLOW_REPO, then the parsed origin URL from git remote get-url origin.
--sha <SHA>Commit SHA of the deployment. Default: git rev-parse HEAD

Output

OptionDescription
--change <KIND>Show only one change kind. Values: stopped, new_not_called, heated_up, cooled_down, new_called, unchanged.
--limit <N>Page size (1..=200)
--cursor <CURSOR>Cursor from meta.cursor of the previous page

The global options are in these groups: Project, Output, Scope, Baselines, Gates, Duplication, Type-aware, Performance.

Each function has one change kind:

KindMeaning
new_calledNew in this deployment, and it ran.
new_not_calledNew in this deployment, and it did not run yet.
heated_upIt runs more often than in the base deployment.
cooled_downIt runs less often than in the base deployment.
stoppedIt ran in the base deployment, and does not run now.
unchangedNo significant change.

When the two deployments cannot be compared, comparable is false and reason gives the cause, for example a deployment that ran less than 6 hours. The report then lists only the new functions that ran. A read-only key works.

Options

fallow coverage has no options of its own. The section of each subcommand under Subcommands lists its options.

Option details

What setup detects

fallow coverage setup reads package.json, the lockfiles and the scripts, and writes instructions for the project:

DetectionUse
FrameworkSelects a recipe for Next.js, NestJS, Nuxt, SvelteKit, Astro, Remix, Vite browser apps, plain Node services, or a general recipe. When one package.json has a Node server framework (Elysia, Express, Fastify, Hono, Koa, @trpc/server) and Vite, the server framework wins, so the recipe targets the API, not the client bundle.
WorkspacesReads workspaces (npm, pnpm, yarn, bun) and writes one recipe for each member that runs code. It skips a library member: a member without a start, preview or dev script and without a Node server dependency.
Package managerUses packageManager, the lockfiles, or both, to select the install commands.
Coverage dataFinds coverage/coverage-final.json, .nyc_output/coverage-final.json, or V8 directories with JSON files.

A project without runtime code, for example a repository that only runs the dev scripts of its children, gets no recipe. The JSON then has framework_detected: "unknown", an empty members array and the warning No runtime workspace members were detected; emitted install commands only.

The generated recipe

docs/collect-coverage.md holds the steps for one capture. For an app with a build script, the steps are:

1. Remove any old dump directory: `rm -rf ./coverage`
2. Build the app: `<build command>`
3. Start the app with V8 coverage enabled: `NODE_V8_COVERAGE=./coverage <start command>`
4. Exercise the routes or jobs you care about.
5. Stop the app and run: `fallow coverage setup`
6. In CI, after the build, run `fallow coverage upload-inventory` with `FALLOW_API_KEY` set. ...

Fallow uses the build, start or preview scripts of the project when they exist. Else it uses the usual commands of the framework. A project that matches no recipe still gets a general docs/collect-coverage.md. After the capture, the next fallow coverage setup runs fallow health --runtime-coverage on the data.

The Fallow Cloud plan

Fallow Cloud joins runtime coverage to your code only when five things name the same commit SHA: the beacon, the inventory, the source maps, the deployment registration and the first runtime data. --cloud writes a plan that gives each part that SHA:

  • Beacon snippets. A server reads the SHA from FALLOW_COMMIT_SHA, VERCEL_GIT_COMMIT_SHA, RENDER_GIT_COMMIT or RAILWAY_GIT_COMMIT_SHA. A browser bundle reads VITE_FALLOW_COMMIT_SHA, which the build sets. In a workspace, each member gets its own runtimeSurface tag.
  • CI steps. cloud.ci.steps holds GitHub Actions steps for the job that builds and deploys: a checkout with fetch-depth: 0, upload-inventory, upload-source-maps for each bundled member, and the deployment registration. cloud.ci.workflows_detected names the workflow files that look like a deploy.
  • Keys. The plan names FALLOW_API_KEY for CI and the server, and VITE_FALLOW_API_KEY for a browser key that can only send data.

--wait retries a network error, a rate limit and a server error. It exits with code 0 when each step is done, 1 when --wait-timeout passes first, and 2 on a key, scope or input error. With --json, cloud.wait holds the result (complete, timeout or error) and the last setup state. Its next field names the step to do now. Read the state as open data, because Fallow Cloud can add step ids and states.

How cloud analysis joins functions

analyze --cloud gives the same runtime_coverage block as a local capture, with data_source: "cloud". Fallow matches each cloud function to a local function in these steps:

  1. It matches on stable ids.
  2. It maps a runtime path, such as /app/src/a.ts of a container, onto the local tree. It compares the file name, then the path segments from the end.
  3. It matches a function whose runtime name differs, for example an anonymous callback reported as map or then, on its position in the file.

Steps 2 and 3 do not guess. When two local files match one runtime path equally well, or two functions start on the same line, the function stays unmatched. Fallow leaves an unmatched function out of the findings and reports it in a cloud_functions_unmatched warning. --debug-unmatched lists them, highest traffic first.

When fewer than 80% of the cloud runtime functions match the local code, the join is incomplete. Each safe_to_delete finding then becomes review_required with medium confidence, and the report adds the cloud_local_join_incomplete warning.

The blast-radius and importance rows of the cloud keep the local structure. When a cloud row has no caller graph, complexity or owners, fallow fills caller_count, the risk band, cyclomatic and owner_count from the local code. The cloud importance score and reason do not change.

  • risk_band follows the importer count only: high at 20 or more importer files, medium at 5 or more, else low. Without --production, the local count also includes test importers. A row whose count fallow cannot fill is unknown.
  • caller_count_weighted_by_traffic is the sum of the production hits in the importer files of the function. It is null when no importer file has runtime data, and in a local health --runtime-coverage run.
  • The id of a hot path, a blast-radius entry and an importance entry hashes the file and the function name, or the stable_id when the file has more than one function of that name. An edit above a function keeps its id. Each entry also has legacy_id, the old id from the file and the line. Match a stored id against id or legacy_id.

In cloud mode, each finding and each hot path has a cloud_context object with the fields of the cloud row that fallow does not read itself, for example errors, performance.cpu, performance.browser, branches, covered_by_test and test_hit_count. A blast-radius entry from the cloud has production_callers, caller_sites and the caller counts in its cloud_context. runtime_coverage.cloud_context holds the top-level fields of the answer, for example capabilities and page. These fields do not change a verdict. A null count or an untracked state means "not measured", never zero.

The actions[].type of a finding is delete-cold-code for the verdict safe_to_delete and review-runtime for review_required. Read an unknown type as a later addition, not as an error.

Function names in the inventory

The runtime join needs the same function names on both sides. Fallow selects the name of each function in this order:

  1. The parent context: a method key, a variable binding, a property key or export default.
  2. The name of the function itself, for example function foo() {}.
  3. (anonymous_N), where N counts the functions of the file.

Entry routes

With --with-callers, the upload has a routes array and a routeIds array for each function. Fallow takes each route pattern from a file name or the source code, never from a request.

  • File-based routes. The Next.js, Remix, SvelteKit and Nuxt plugins find the route files. A route handler gives one route for each exported HTTP method. A TanStack Router file gives the pattern in its createFileRoute("/repo/$repo") argument.
  • Elysia routes. Fallow reads calls such as app.get("/v1/repos/:repo", handler) in each file that imports elysia, and joins the prefixes of the app, of .group() and of each mounted plugin. A route with a path that is not a string literal stays out.

A route in routeIds can reach the function through the imports, but a request did not have to reach it. The upload keeps at most 500 routes and at most 50 route ids for each function. The routeLimits field and a warning show each cut.

Path prefix

The beacon reports the path of a file as the runtime sees it. In a container, that is the path in the image, for example /app/src/foo.ts. The inventory has paths relative to the repository by default. Fallow Cloud joins the two on the path and the function name, so the paths must have the same prefix:

Target--path-prefix
Docker image with WORKDIR /app/app
Cloud Run, Buildpacks/workspace
Older official Node images/usr/src/app
AWS Lambda/var/task
GitHub Actions checkout/home/runner/work/<repo>/<repo>

The prefix starts with / and uses / as separator. After the upload, Fallow Cloud compares recent runtime paths with the inventory. When fewer than half of them match, fallow prints a warning: inventory paths don't overlap with runtime coverage for this SHA (<matched>/<sampled> runtime paths matched).

Upload errors

For a known error code of Fallow Cloud, upload-inventory and upload-static-findings print a hint:

Command and codeMessage
upload-inventory, unauthorizedauthentication failed. Generate an API key at https://fallow.cloud/settings#api-keys and set FALLOW_API_KEY on the runner. Note: this key is separate from the license JWT; `fallow license activate --trial` will not fix this error.
upload-inventory, payload_too_largeinventory exceeds the 200,000-function server limit. Scope the walk with --exclude-paths, or open an issue if this is a legitimately large repo.
upload-static-findings, unauthorizedauthentication failed. Generate a live API key at https://fallow.cloud/settings#api-keys and set FALLOW_API_KEY on the runner. Note: a publishable ingest key (fallow_pub_k1_) is not accepted here, and `fallow license activate --trial` will not fix this error.
upload-static-findings, payload_too_largestatic findings exceed the 200,000-finding server limit. Scope the analysis with your fallow ignore rules, or open an issue if this is a legitimately large repo.

Source maps

When two maps have the same file name, for example two index.js.map files in different folders, fallow sends each one under its path in the build folder, so that no map replaces another. --dry-run does not read FALLOW_API_KEY. Without --fail-fast, fallow uploads the other maps after a failure and prints a summary.

Before the first upload, run the command with --dry-run, and fix each warning about sources that do not resolve to files of the repository. After the deployed service gets traffic, run fallow coverage analyze --cloud. A coverage_unresolved warning means that runtime positions did not map to source for this commit. Upload the maps for the same --git-sha that the beacon reports.

Run the upload in the CI job that builds the app:

# GitHub Actions
- run: npm run build
- run: npx fallow coverage upload-source-maps --dir dist --git-sha "$GITHUB_SHA"
  env:
    FALLOW_API_KEY: ${{ secrets.FALLOW_API_KEY }}
# GitLab CI
upload_source_maps:
  stage: deploy
  script:
    - npm run build
    - npx fallow coverage upload-source-maps --dir dist --git-sha "$CI_COMMIT_SHA"
# CircleCI
- run: npm run build
- run:
    name: Upload source maps to fallow
    command: npx fallow coverage upload-source-maps --dir dist --git-sha "$CIRCLE_SHA1"

Each job needs FALLOW_API_KEY as a secret variable of the CI system.

Output

fallow coverage upload-inventory --dry-run --project-id acme/shop
fallow coverage upload-inventory (dry run)
  project-id:    acme/shop
  git-sha:       a4329022be89e04bebfd1e0a56d13ba21b4cb40f
  functions:     24
  endpoint:      https://api.fallow.cloud/v1/coverage/acme/shop/inventory

first 5 of 24 entries:
  src/lib/format.ts:1  formatPrice
  src/lib/format.ts:3  formatPercent
  src/lib/parse.ts:1   parseAmount
  src/math.test.ts:5   describe
  src/math.test.ts:6   (anonymous_1)
  ... and 19 more

A dry run gives the project, the commit, the number of functions and the URL, and sends nothing. Each entry gives a file, a line and a function name. A function without a name is (anonymous_N).

fallow coverage upload-source-maps --dry-run --repo acme/shop
fallow coverage upload-source-maps: repo=acme/shop sha=a4329022be89e04bebfd1e0a56d13ba21b4cb40f
fallow coverage upload-source-maps: would upload 1 maps (92 B) to https://api.fallow.cloud/v1/coverage/acme%2Fshop/source-maps
  - assets/app.js.map (92 B) -> fileName=app.js.map mapPath=dist/assets/app.js.map
fallow coverage upload-source-maps: dry run, no uploads performed

Agent-readable JSON

fallow coverage setup --json prints kind: "coverage-setup" with these top-level fields. The same project gives the same output.

FieldContent
schema_versionThe version of this output format.
framework_detectednextjs, nestjs, nuxt, sveltekit, astro, remix, vite, plain_node or unknown.
package_managernpm, pnpm, yarn or bun.
runtime_targetsnode, browser or both, for all members together.
membersOne object for each workspace that runs code: name, path, framework_detected, package_manager, runtime_targets, files_to_edit, snippets, dockerfile_snippet, warnings. A project with one app has one member with path ..
commandsThe install commands.
files_to_edit, snippets, dockerfile_snippetCopies of the first member. In a monorepo, read each member.
config_writtenThe path of a written config file, or null.
next_stepsCommands to run next.
warningsProblems. A project without runtime code has an empty members array and a warning.
cloudWith --cloud: project_id, git_sha, endpoint, the key variables, ci with the steps, source_maps, activation_url, wait_command, and wait after --wait.

--explain adds a _meta object with the meaning of each field. The analyze command with --format json gives the runtime_coverage object of fallow health. In cloud mode, each finding and each hot path also has cloud_context. A null count in it means "not measured". review-packet and deployment-changes print the JSON answer of Fallow Cloud. The JSON output reference has each field.

Exit codes

SubcommandCodeMeaning
setup0The step completed, or each step is done.
setup1--cloud --wait passed --wait-timeout before each step was done.
setup2Invalid input, a rejected key, or a key without the scope.
setup, analyze3A license is present, but it is not valid, expired more than 30 days ago, or lacks runtime coverage.
setup, analyze4fallow-cov is missing, its signature is not valid, its protocol does not match, or it stopped.
analyze5Fallow cannot read the coverage input, or fallow-cov refused it.
analyze6fallow-cov reported an internal error.
upload-inventory, upload-static-findings7A network failure.
upload-inventory, upload-static-findings10Validation failed: no API key, no project id, no functions, uncommitted changes without --allow-dirty, a failed git status without --git-sha or --allow-dirty, an analysis error, or a request that the server refused for good (for example a 404 or 422).
upload-inventory, upload-static-findings11The upload is larger than the server allows.
upload-inventory, upload-static-findings12The server refused the key.
upload-inventory, upload-static-findings13A server error (5xx), a timeout (408), a rate limit (429), or an answer that fallow cannot read.
upload-source-maps1One or more maps failed to upload.
upload-source-maps2Invalid input: no FALLOW_API_KEY, no repo or SHA, a missing directory, or no maps.
upload-source-maps7Each map failed with a network error, or fallow cannot start the HTTP client.
review-packet, deployment-changes2Invalid input, for example a --function value that is not FILE:NAME, or no changed source file.
review-packet, deployment-changes3No key, a key that is not valid, a plan without the feature, or a repository or deployment that Fallow Cloud does not know.
review-packet, deployment-changes7A network or server error.

--ignore-upload-errors changes codes 7 and 13 of upload-inventory and upload-static-findings to 0. On an error, the cloud reads print a JSON object with error, message and exit_code. Fallow refuses a cloud answer with more than 48 million JSON values as a server error. See Exit codes.

Examples

# Start the setup, and run it again after you capture traffic
fallow coverage setup

# Print the setup as JSON for an agent
fallow coverage setup --yes --json

# Analyze a local V8 capture
fallow coverage analyze --runtime-coverage ./coverage --format json

# Analyze the runtime data of Fallow Cloud
fallow coverage analyze --cloud --repo acme/web --format json

# Upload the function list from a container build in CI
fallow coverage upload-inventory --path-prefix /app

# Upload the source maps of the build
fallow coverage upload-source-maps --dir dist --git-sha "$GITHUB_SHA"

# Read the production facts of one function
fallow coverage review-packet --function src/cart.ts:addItem

# List the functions that stopped in the current deployment
fallow coverage deployment-changes --change stopped