Migrating to Twig 3.1

The current application is Rust. Python 2.1.4 source remains on legacy-python. Use the installation guide for the latest release.

From Python 2.x

The Python package twg installed both twig and twg; Rust installs twig only. Uninstall the old package using its original manager (uv tool uninstall twg, pipx uninstall twg, or your environment's pip). Check which executable your shell resolves if both installations coexist.

WorkflowTwig 3.1
twig <file>Same interactive entry point
twg <file>Use twig; the alias is not installed
-v / --versionSupported, alongside -V
--fix --printRepair, then format the repaired value
--indent NJSON stdout and output-file formatting; -i is now an alias
-o / --outputAtomic output-file replacement
--rebuild-dbForce parsing; source changes now invalidate caches automatically
--checkNoninteractive validation and timing
--no-cacheTemporary SQLite storage without persistent cache publication
--clear-cacheRemove cached database files, including older versions

Neither the inspected Python 2.1.4 parser nor Rust defines --file; use the positional argument. Stdin JSON is supported with - in print/fix/check modes. The TUI requires a terminal. Mouse and keyboard navigation are available; consult the current controls.

From Rust 3.0

Configuration

Supported themes remain catppuccin-mocha and solarized-dark. Unknown JSON keys are retained; unknown theme names fall back to Catppuccin.

Linux and Windows keep their normal platform config locations. Rust uses ~/Library/Application Support/twig/config.json on macOS. Python used $XDG_CONFIG_HOME/twig/config.json or ~/.config/twig/config.json. Version 3.1 imports the old config when the new file is absent; an existing new config takes precedence. A save failure is reported rather than silently treated as success.

Data and resource contracts

Both implementations use SQLite, not a Python flat-file cache. New caches are private but unencrypted, with retention and cleanup controls. --no-cache still uses temporary disk storage. See local data.

TUI YAML is represented as an array of JSON-compatible documents. Original comments, anchors, whitespace, and quoting are not preserved. Complex mapping keys, non-finite numbers, and tagged values are outside the TUI data model. JSON has bounded node batches; YAML parser memory can still scale with input. Clipboard/export and large scalar values can also allocate significant memory.

Live watch mode and custom theme definitions are not implemented. These are explicit non-goals for this release, not promised compatibility features.