locswijch

Bidirectional bridge between dune pkg and opam switches.

locswijch is a command-line tool; it installs no library, so this page is the whole of its documentation.

Overview

dune pkg stores built packages in _build/.pkg/, invisible to the standard opam switch mechanism that tools like ocamllsp, merlin, and utop rely on. locswijch mirrors those built artifacts into a real opam switch using hard links, so editor tooling works unchanged, and the switch doubles as a backup of dune.lock/ and _build/.pkg/ that survives dune clean.

Subcommands

locswijch sync    --project DIR
locswijch restore --project DIR
locswijch migrate --switch NAME --project DIR
locswijch trip    --switch NAME --project DIR

More

See the project repository for build instructions, design notes, and the test suite.