CLI reference

The crypto-discovery CLI scans repositories and uploads normalized inventories. Related binaries: crypto-discovery-api (control plane), crypto-discovery-runner (scanner node agent), and crypto-discovery-mcp (knowledge server).

Install

The CLI is built from source. From a checkout of the repository, with Go 1.26+ installed:

go build -o crypto-discovery ./cmd/crypto-discovery

That produces a crypto-discovery binary you can move onto your PATH. Prebuilt, signed binaries are not published yet — build from source for now.

scan

crypto-discovery scan <path> [flags]
FlagPurpose
--orgOrganization to upload to (required for upload).
--repoOverride the detected repository name.
--commit-shaAttach source revision metadata.
--jsonWrite the normalized inventory JSON.
--mdWrite a Markdown report.
--upload-urlProtected ingest endpoint.
--api-keyNode-issued discovery credential.
--enable-moduleOpt into a module: external/gosec, external/slither, runtime/certificates.
--ignore-dirAppend directory names to the default ignore set.
--timeoutBound the scan lifetime.

Upload settings resolve in order: explicit flags → local config written by crypto-discovery init → the CRYPTO_DISCOVERY_API_KEY environment variable.

init

Stores node_id, api_key, and upload_url in the user config directory with 0600 permissions, so later scans can omit them:

crypto-discovery init \
  --node-id eu-west-cluster-alpha \
  --api-key ndc_example_node_credential \
  --upload-url http://localhost:8080/api/v1/scans

API and node environment variables are listed in Configuration.