Skip to content

Internals

Karialo edited this page Aug 3, 2026 · 1 revision

Internals

Storage layout

Purpose Default location
User command shims and single-file installs ~/.local/bin
Managed applications ~/.local/share/binman/apps
Container metadata ~/.local/share/binman/docker
Source cache ~/.local/share/binman/source
Inventory and state ${XDG_STATE_HOME:-~/.local/state}/binman

System mode changes the command and app roots to /usr/local/bin and /usr/local/share/binman/apps.

File installs

A single file becomes a command named after its final path component with its last extension removed. A directory becomes an application directory and is exposed by a shim that points at its detected or configured entry point.

App detection

BinMan looks for common launchers and metadata, including VERSION, Python entry points, package metadata, and conventional bin/ layouts. Detection is helpful, not clairvoyant. Explicit --entry and --workdir options win when the project is unusual.

Pro mode

BinMan is intentionally local and Bash-based. It stages operations where necessary, validates paths and entries, updates inventory metadata, and prints the shell refresh command required by the caller's shell. It cannot mutate a parent process's environment or command hash table.

The implementation favours portable utilities and capability checks. Optional features are enabled when their tools are present; missing dependencies should be reported rather than silently replaced with a pretend success.

Clone this wiki locally