analyze

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package analyze implements the `supermodel analyze` command. It uploads a repository ZIP to the Supermodel API, runs the full analysis pipeline, and caches the resulting graph locally.

This is a vertical slice. It must not import any other slice package. It may import from the shared kernel: internal/api, internal/cache, internal/config, internal/ui, internal/build.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGraph

func GetGraph(ctx context.Context, cfg *config.Config, dir string, force bool) (*api.Graph, string, error)

GetGraph returns the display graph for dir, running analysis if the cache is cold or force is true. It returns the graph and the cache key.

Uses git-based fingerprinting (~1ms for clean repos) to check the cache before creating a zip. Only creates and uploads the zip on cache miss.

func Run

func Run(ctx context.Context, cfg *config.Config, dir string, opts Options) error

Run archives dir, uploads it to the Supermodel API, caches the result, and prints a summary. Uses the cache when available unless Force is set.

Types

type Options

type Options struct {
	Force  bool   // bypass cache and re-upload
	Output string // "human" | "json"
}

Options configures the analyze command.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL