internal/

directory
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0

Directories

Path Synopsis
Package calllog records every invocation of a sofia-repo tool to a shared JSON-lines log so calls can be analysed and optimised later.
Package calllog records every invocation of a sofia-repo tool to a shared JSON-lines log so calls can be analysed and optimised later.
Package cc reads Claude Code session transcripts (the JSONL files under ~/.claude/projects/<encoded-path>/<session-id>.jsonl) and turns them into compact, TOON-friendly digests.
Package cc reads Claude Code session transcripts (the JSONL files under ~/.claude/projects/<encoded-path>/<session-id>.jsonl) and turns them into compact, TOON-friendly digests.
Package cli builds the master Cobra command tree for the `sf` binary.
Package cli builds the master Cobra command tree for the `sf` binary.
Package cliflags holds tiny, dependency-free Cobra flag helpers shared by every tool in the repo (format aliases, etc.).
Package cliflags holds tiny, dependency-free Cobra flag helpers shared by every tool in the repo (format aliases, etc.).
Package codectx extracts surrounding-scope context from source files without depending on a full AST.
Package codectx extracts surrounding-scope context from source files without depending on a full AST.
common
changed
Package changed implements `sf changed` — a compact, classified summary of a git diff: per file its status, churn (+/-), category, language, and the enclosing functions/classes touched (read from git's own hunk-header function context, no file parsing).
Package changed implements `sf changed` — a compact, classified summary of a git diff: per file its status, churn (+/-), category, language, and the enclosing functions/classes touched (read from git's own hunk-header function context, no file parsing).
code
Package code implements `sf code` — a compact structural summary of source files, without function bodies, so the agent needn't cat a whole file just to see its shape/API (where read tokens go in practice).
Package code implements `sf code` — a compact structural summary of source files, without function bodies, so the agent needn't cat a whole file just to see its shape/API (where read tokens go in practice).
code/gocode
Package gocode is the Go backend for `sf code`: a structural summary of a Go source file (package, imports, types, func/method signatures, consts, vars) and single-symbol slicing — via the stdlib go/parser (syntax only, no type-checking), so it works on any file regardless of whether it compiles.
Package gocode is the Go backend for `sf code`: a structural summary of a Go source file (package, imports, types, func/method signatures, consts, vars) and single-symbol slicing — via the stdlib go/parser (syntax only, no type-checking), so it works on any file regardless of whether it compiles.
code/phpcode
Package phpcode is the PHP backend for `sf code`: a structural summary of a PHP file (namespace, class/interface/trait/enum, extends/implements, attributes, enum cases, constructor deps, properties, method signatures) and single-method slicing.
Package phpcode is the PHP backend for `sf code`: a structural summary of a PHP file (namespace, class/interface/trait/enum, extends/implements, attributes, enum cases, constructor deps, properties, method signatures) and single-method slicing.
code/tscode
Package tscode is the TypeScript/Vue backend for `sf code`.
Package tscode is the TypeScript/Vue backend for `sf code`.
composer
Package composer implements `sf composer` — compact, TOON-first views over a tree of PHP packages described by composer.json files.
Package composer implements `sf composer` — compact, TOON-first views over a tree of PHP packages described by composer.json files.
doctor
Package doctor implements `sf doctor` — a one-call health check of the local sf install.
Package doctor implements `sf doctor` — a one-call health check of the local sf install.
github
Package github implements `sf github ci` — a compact view of a repo's GitHub Actions runs via the `gh` CLI, with an optional `--watch` that blocks until the latest run finishes and prints only its final status (instead of gh's verbose live stream).
Package github implements `sf github ci` — a compact view of a repo's GitHub Actions runs via the `gh` CLI, with an optional `--watch` that blocks until the latest run finishes and prints only its final status (instead of gh's verbose live stream).
grep
Package grep implements a generic, language-agnostic TOON-emitting search across a project tree, built on the same walker + matcher + enclosing infrastructure as this toolkit's other structural tools.
Package grep implements a generic, language-agnostic TOON-emitting search across a project tree, built on the same walker + matcher + enclosing infrastructure as this toolkit's other structural tools.
gripe
Package gripe records and lists agent complaints about sf — the one failure the call log can't capture on its own: sf exited 0 but gave the wrong thing, or the agent had to fall back to cat/rg/grep because sf couldn't do what was needed.
Package gripe records and lists agent complaints about sf — the one failure the call log can't capture on its own: sf exited 0 but gave the wrong thing, or the agent had to fall back to cat/rg/grep because sf couldn't do what was needed.
hook
Package hook implements Claude Code hook endpoints (`sf hook pre`).
Package hook implements Claude Code hook endpoints (`sf hook pre`).
packagist
Package packagist implements `sf packagist status` — per-package release health for a tree of PHP packages: the latest local git tag vs whether that tag is pushed to origin vs the latest version published on Packagist.
Package packagist implements `sf packagist status` — per-package release health for a tree of PHP packages: the latest local git tag vs whether that tag is pushed to origin vs the latest version published on Packagist.
php
Package php reads a PHP source file and returns a structured summary of the first class/interface/trait/enum declaration it finds: namespace, FQCN, modifiers, parent/implements, public methods, constructor dependencies, and the docblock summary.
Package php reads a PHP source file and returns a structured summary of the first class/interface/trait/enum declaration it finds: namespace, FQCN, modifiers, parent/implements, public methods, constructor dependencies, and the docblock summary.
vue
Package vue implements `sf vue` — helpers over a Vue frontend.
Package vue implements `sf vue` — helpers over a Vue frontend.
worktrees
Package worktrees implements `sf worktrees` — a read-only, cross-project view of git-worktree dev forks under a configured parent directory (see DefaultWww).
Package worktrees implements `sf worktrees` — a read-only, cross-project view of git-worktree dev forks under a configured parent directory (see DefaultWww).
Package emit enforces the core invariant of every token-saving sofia tool: a tool that stands in for a standard command (cat, grep, …) must never cost MORE tokens than that command would.
Package emit enforces the core invariant of every token-saving sofia tool: a tool that stands in for a standard command (cat, grep, …) must never cost MORE tokens than that command would.
Package envfile loads .env-style files, prompts interactively for missing required values, and writes them back.
Package envfile loads .env-style files, prompts interactively for missing required values, and writes them back.
Package history reads the sofia call log and surfaces invocation history.
Package history reads the sofia call log and surfaces invocation history.
Package matcher scans a file line-by-line for occurrences of one or more patterns, returning hits with line/column information.
Package matcher scans a file line-by-line for occurrences of one or more patterns, returning hits with line/column information.
Package mcpserver exposes sofia's public-safe Context Providers to LLM coding agents over the Model Context Protocol (MCP), on the stdio transport.
Package mcpserver exposes sofia's public-safe Context Providers to LLM coding agents over the Model Context Protocol (MCP), on the stdio transport.
Package strdist provides small string-distance helpers for typo-tolerant CLI suggestions ("did you mean X?").
Package strdist provides small string-distance helpers for typo-tolerant CLI suggestions ("did you mean X?").
Package tokens estimates how many LLM tokens a given string costs.
Package tokens estimates how many LLM tokens a given string costs.
Package toon implements low-level helpers for the TOON (Token-Oriented Object Notation) text format.
Package toon implements low-level helpers for the TOON (Token-Oriented Object Notation) text format.
Package version holds the sf release version so both the CLI (`sf --version`) and `sf doctor` report the same string without an import cycle between internal/cli and internal/common/doctor.
Package version holds the sf release version so both the CLI (`sf --version`) and `sf doctor` report the same string without an import cycle between internal/cli and internal/common/doctor.
Package walker enumerates files in a directory tree, applying include/exclude rules.
Package walker enumerates files in a directory tree, applying include/exclude rules.

Jump to

Keyboard shortcuts

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