pecto Docs

Getting Started

Install pecto and analyze your first project in under a minute.

Installation

From source (requires Rust)

cargo install pecto

Pre-built binaries

Download from GitHub Releases for Linux, macOS (Intel + ARM), and Windows.

Your first analysis

Navigate to any Java, C#, Python, or TypeScript project and run:

cd ./my-project
pecto init

pecto automatically detects the language by looking for project files: pom.xml/build.gradle (Java), .csproj/.sln (C#), pyproject.toml/requirements.txt (Python), package.json/tsconfig.json (TypeScript). You can also specify explicitly:

pecto init --language java
pecto init --language csharp
pecto init --language python
pecto init --language typescript

Example output

$ cd ./my-spring-app
$ pecto init

pecto Analyzing ./my-spring-app...
✓ Analyzed 86 files → 29 capabilities

  8 entities
  109 operations
  7 dependencies

The spec is printed to stdout as YAML by default. Save it to a file:

pecto init ./my-project --output specs.yaml

Or as JSON:

pecto init ./my-project --format json --output specs.json

Explore your project

View domains

See how capabilities cluster into business domains:

pecto domains ./my-project

Dependency graph

See how services connect to each other:

# Text output
pecto graph ./my-project

# Graphviz DOT format
pecto graph ./my-project --format dot | dot -Tpng > graph.png

# JSON for tooling
pecto graph ./my-project --format json

Impact analysis

Find out what breaks if you change something:

pecto impact Owner ./my-project

Interactive dashboard

Launch a local web dashboard with an interactive dependency graph:

pecto serve ./my-project
# Opens http://localhost:4321

HTML report

Generate a shareable, self-contained HTML report:

pecto report ./my-project --output report.html

Detect behavior drift

Commit your spec to the repo, then check for drift in CI:

# Generate initial spec
pecto init . --output specs.yaml

# Later: verify code still matches
pecto verify specs.yaml

Exit code 1 means the spec has drifted. See CI Integration for pipeline setup.

Compare git refs

See behavior changes between branches or commits:

pecto diff main HEAD
pecto diff v1.0.0 v2.0.0

Next steps