fingerprint

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fingerprint

type Fingerprint struct {
	Name           string         // repo/directory name
	Languages      []LanguageInfo // detected languages with percentages
	TotalFiles     int
	TotalLines     int
	Dependencies   int // count from package manager files
	HasTests       bool
	HasCI          bool
	License        string
	GitInfo        *GitInfo
	PackageManager string // npm, go mod, cargo, pip, etc.
}

Fingerprint holds a structured summary of a repository or directory.

func Generate

func Generate(dir string) (*Fingerprint, error)

Generate produces a fingerprint for the given directory.

func (*Fingerprint) Format

func (f *Fingerprint) Format() string

Format renders the fingerprint as a concise string suitable for LLM context injection. The output targets under 500 tokens.

func (*Fingerprint) FormatMarkdown

func (f *Fingerprint) FormatMarkdown() string

FormatMarkdown renders the fingerprint as markdown for display.

type GitInfo

type GitInfo struct {
	Branch       string
	CommitCount  int
	LastCommit   string
	Contributors int
}

GitInfo holds version-control metadata extracted via git commands.

type LanguageInfo

type LanguageInfo struct {
	Name       string
	Percentage float64
	Files      int
	Lines      int
}

LanguageInfo holds detection results for a single programming language.

Jump to

Keyboard shortcuts

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