How henriqf/sal works
SALT is a command-line tool for creating named or automatic project builds in a local registry, restoring builds, comparing versions, and viewing registry contents. The main flow starts at the CLI, loads configuration, then dispatches to build, restore, diff, or view behavior. Builds use file traversal and SHA-1-based content handling; registry metadata and content are stored on the local filesystem. The excerpts show the command dispatch and parts of these workflows, but not every implementation detail, so uncertain internal links are omitted.
Main entry points: sal.c Command dispatcher · diff.c Line diff engine · linus.c File traversal · util.c File utilities
Components 18
Command interface
- Command dispatcher
sal.c - Config loader
sal.c
Build and restore
- Build creator
sal.c - Content builder
sal.c - Build restore
sal.c
Registry and comparison
- Build registry
- Hash content
- Build log
- Build comparison
sal.c - Line diff engine
diff/diff.c - Registry viewer
sal.c
Platform and utilities
- File traversal
os/linus.c - File utilities
util.c - Ignore sets
set/set.c - OS file operations
os/linus.c
Other components
- CLI user
- svconfig
svconfig.txt - Local filesystem
Connections 25
- CLI user → Command dispatcher: runs commands
- Command dispatcher → Config loader: initializes
- Config loader → svconfig: reads settings
- Config loader → Ignore sets: populates filters
- Command dispatcher → Build creator: creates builds
- Command dispatcher → Build restore: loads builds
- Command dispatcher → Build comparison: requests diff
- Command dispatcher → Registry viewer: requests view
- Build creator → File traversal: traverses source
- Build creator → Ignore sets: checks exclusions
- Build creator → Content builder: builds snapshot
- Content builder → Hash content: reads and writes hashes
- Build creator → Build registry: writes build metadata
- Build creator → Build log: appends entries
- Build restore → Build registry: reads build metadata
- Build restore → Hash content: reads file hashes
- Build restore → OS file operations: copies files
- Build comparison → Build registry: reads build hashes
- Build comparison → Line diff engine: compares file contents
- Registry viewer → Build registry: reads build records
- Registry viewer → File utilities: displays directories
- File traversal → Local filesystem: enumerates files
- OS file operations → Local filesystem: reads and writes files
- File utilities → Local filesystem: reads files
- Line diff engine → Local filesystem: reads compared files