Upgrading to Twig 3.2

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

From Rust 3.1

The CLI commands, native cache locations, and file-opening workflow stay the same. Reinstall or upgrade using the installation guide.

See the browser guide for loading, copying, limits, and privacy.

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.

WorkflowCurrent Twig
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

Themes are now dark and light, shared with the browser explorer. Both old catppuccin-mocha and solarized-dark preferences resolve to dark; toggling with t saves a canonical name. Unknown JSON keys are retained; unknown theme names fall back to Dark.

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 the Python and Rust terminal apps use SQLite. The web explorer uses memory. 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. Use the existing file-opening workflow and built-in Dark/Light palettes.

Edit this page on GitHub ↗