StackPanel

stackpanel nixify

Convert a file into a Nix file entry expression

stackpanel nixify

Convert an existing file into a stackpanel.files.entries Nix expression.

This reads the file at the given path and produces a Nix snippet that, when added to your stackpanel configuration, will generate an identical file.

Supported types: line-set Treats each non-empty line as an entry in a deduplicated, sorted set (ideal for .gitignore, .dockerignore, etc.) json-ops Emits path-based JSON mutations (ideal for package.json)

Examples: stackpanel nixify .gitignore # auto-detects line-set stackpanel nixify .gitignore --type line-set # explicit type stackpanel nixify apps/web/package.json # emits json-ops stackpanel nixify path/to/.dockerignore # works for any path

Usage

stackpanel nixify <path>

Flags

FlagTypeDefaultDescription
--type, -tstringnoneContent type (line-set, json-ops). Auto-detected when omitted.

Backup-on-Adopt

When Stackpanel first starts managing a tracked file through preflight-era mutations, it can back up the existing file to <path>.backup before applying its managed changes.

This is especially useful for package.json, where Stackpanel now prefers path-based JSON mutations over replacing the entire file.

Typical flow:

# generate a Nix snippet for the existing file
stackpanel nixify apps/web/package.json

# add the emitted stackpanel.files.entries snippet to your Nix config
# then re-enter the shell or run:
stackpanel preflight run

If Stackpanel adopts the file, it will preserve the original as apps/web/package.json.backup.

Global Flags

These flags are inherited from parent commands.

FlagTypeDefaultDescription
--daemon, -dboolfalseRun in daemon mode (no TUI, for background processes)
--no-colorboolfalseDisable color output
--no-tuiboolfalseDisable interactive TUI mode
--verbose, -vboolfalseEnable verbose output

On this page