Open-source CLI that extracts behavior specs from your codebase in seconds. Static analysis powered by Rust + tree-sitter. No LLMs. No cloud.
$ cd ./my-spring-app
$ pecto init
pecto Analyzing ./my-spring-app...
✓ Analyzed 86 files → 29 capabilities
8 entities
109 operations
7 dependencies
---
name: spring-petclinic-rest
capabilities:
- name: owner-entity
entities:
- name: Owner
table: owners
fields:
- name: firstName
constraints: ["@NotBlank"]
pecto serve — interactive dashboard with dependency graph, domain clusters, and flow tracing
Code grows faster than understanding. AI generates code nobody fully grasps. Documentation is always outdated. pecto fixes this.
of developers using AI tools generate code they don't fully understand
spent annually on legacy code maintenance worldwide
to analyze 250+ files and extract every behavior, entity, and endpoint
Extract, analyze, and visualize — from annotations, patterns, and code structure.
Extraction
HTTP methods, paths, parameters, request bodies, validation rules, error responses.
Tables, fields, types, constraints, relationships. JPA/Hibernate and Entity Framework Core.
Operations, transactions, side effects, auth rules, CORS, rate limits, scheduled tasks.
Intelligence
See how controllers, services, and repositories connect. Export as text, DOT, JSON, or interactive HTML.
Auto-group capabilities into business domains. See which domains depend on each other.
pecto impact Owner — know what breaks before you change it.
Workflow
pecto verify in CI catches undocumented behavior changes. pecto diff compares git refs.
pecto serve for a live web dashboard. pecto report for a shareable HTML file.
pecto context — compact project summary optimized for LLM context windows.
Automation
pecto flow — trace endpoint call chains as Mermaid sequence diagrams. Interactive trace highlighting in the dashboard.
pecto pr-diff — auto-post behavior diffs on PRs. See which endpoints, entities, and dependencies changed.
pecto check — validate fitness rules in CI. Catch circular deps, missing auth, and layering violations.
No LLM. No API keys. No cloud. Just fast, deterministic analysis.
@RestController, @GetMapping, @PostMapping@Path, @GET, @POST, @PathParam@Entity, @Table, relationships, EntityManagerJpaRepository + JPA @PersistenceContext@Service, @Stateless, @Inject, side effects@NotBlank, @Email, @Size@PreAuthorize, @RolesAllowed, @PermitAll@Scheduled, @EventListener[ApiController], [HttpGet], [Route]DbSet<T>, [Table], [Key][Required], [EmailAddress], [Range][Authorize], [AllowAnonymous]BackgroundService, IHostedServiceTask<ActionResult<T>> async unwrapping@router.get, @app.post, Depends()@app.route, @blueprint.routeModelViewSet, @api_viewColumn(), mapped_column()table=True, inheritance resolutionCharField, ForeignKeyBaseModel, Field() constraints@shared_task, add_job()router.get, app.post, :param@Controller, @Get/@Post, @UseGuardsexport function GET/POST@Entity, @Column, relationships@Injectable, *Service classesParallel parsing with rayon. No network calls. Pure tree-sitter static analysis.
| Feature | pecto | Swagger | SonarQube |
|---|---|---|---|
| REST endpoints | ✓ | ✓ | ✕ |
| Database entities | ✓ | ✕ | ✕ |
| Business logic / side effects | ✓ | ✕ | ✕ |
| Request flow tracing | ✓ | ✕ | ✕ |
| Security rules | ✓ | ✕ | ~ |
| Architecture fitness rules | ✓ | ✕ | ✓ |
| Behavior drift detection | ✓ | ✕ | ✕ |
| PR behavior diff | ✓ | ✕ | ✕ |
| Fully offline | ✓ | ✓ | ✕ |
| Multi-language (4) | ✓ | ~ | ✓ |
| Speed (250 files) | <1s | N/A | minutes |
# Install
cargo install pecto
# Analyze your project
cd ./my-app
pecto init
# Launch interactive dashboard
pecto serve
Or download pre-built binaries from GitHub Releases.
Questions, feedback, or enterprise inquiries? Reach out directly.