Skip to main content

Documentation

Everything you need to get started with Thirdwatch.

Quick Start

1. Install

$ npm install -g thirdwatch

2. Scan your repo

$ thirdwatch scan .

3. View the manifest

$ cat thirdwatch.json

CLI Reference — thirdwatch scan

Scan a codebase and produce a Thirdwatch Dependency Manifest (TDM).

$ thirdwatch scan [path] [options]

Arguments

FlagDescription
pathDirectory to scan. Defaults to current directory (.)

Options

FlagDescription
-o, --output <file>Output file path. Defaults to ./thirdwatch.json
-f, --format <format>Output format: json (default) or yaml
--languages <langs...>Languages to scan (default: auto-detect)
--ignore <patterns...>Glob patterns to ignore
--config <file>Path to .thirdwatch.yml config file
--no-resolveSkip environment variable resolution
--verboseShow detailed scan progress
--quietSuppress all output except the TDM
--no-colorDisable colored output
-h, --helpShow help
-v, --versionShow version

Configuration

Thirdwatch can be configured via a .thirdwatch.yml file in your project root.

# .thirdwatch.yml
output: thirdwatch.json
format: json
exclude:
  - "node_modules/**"
  - "**/*.test.*"
  - "dist/**"

Ignore File

Create a .thirdwatchignore file to exclude paths from scanning. Uses gitignore syntax.

# .thirdwatchignore
node_modules/
dist/
*.test.ts
fixtures/

Examples

Scan current directory

$ thirdwatch scan

Scan with YAML output

$ thirdwatch scan . --format yaml -o deps.yaml

Verbose mode

$ thirdwatch scan . --verbose

Quiet mode (TDM only)

$ thirdwatch scan . --quiet

TDM Schema

The canonical JSON Schema for the Thirdwatch Dependency Manifest is available at schema/v1/tdm.schema.json.