# Choose the packages your application needs

Source: https://libtmux.org/en/ocaml/latest/guides/packages/

> Choose the packages your application needs: libtmux documentation.

This repository is one Dune project with separately installable opam packages.
Each package has an authored manifest. Internal dependencies require the same
package version, so a client or workspace adapter uses its matching core.

The core and pure workspace library have no third-party runtime dependencies.
They use OCaml 5.5.2's standard library, including [`Iarray`](<https://ocaml.org/manual/5.5/api/Iarray.html>), [`Seq`](<https://ocaml.org/manual/5.5/api/Seq.html>), [`List`](<https://ocaml.org/manual/5.5/api/List.html>) and
`result`. Test and documentation tools remain development dependencies.

| Package | Role | Runtime dependencies |
| --- | --- | --- |
| `libtmux` | Immutable graph, typed queries, commands and observation values | OCaml standard library |
| `libtmux-workspace` | Pure configuration validation, plans and execution journals | `libtmux` |
| `libtmux-unix` | Blocking Linux transport and workspace executor | Core, workspace, standard [`Unix`](<https://ocaml.org/manual/5.5/api/Unix.html>), private Linux bindings |
| `libtmux-eio` | Concurrent transport and workspace executor | Core, workspace, blocking transport, Eio |
| `libtmux-json` | Validated query and workspace JSON codecs | Core, workspace, Yojson |
| `libtmux-workspace-cli` | Installed `tmux-workspace` command | The libraries above, Eio's entry point and Cmdliner |

Pure workspace planning depends on captured observations and an explicit tmux
version. It does not start a scheduler, read files or contact tmux. Execution
uses the adapter supplied by [`Libtmux_unix.Workspace`](<https://libtmux.org/en/ocaml/latest/workspace/reference/libtmux_unix-workspace/>) or [`Libtmux_eio.Workspace`](<https://libtmux.org/en/ocaml/latest/workspace/reference/libtmux_eio-workspace/>).
The CLI combines file loading, JSON decoding, planning and the Eio executor.

An application querying a captured graph needs only `libtmux`. A blocking
script chooses `libtmux-unix`; an Eio application chooses `libtmux-eio` and owns
its scheduler and switch. Add `libtmux-json` for external query documents or JSON
workspaces. These integrations do not add dependencies to the pure core.

See [installation](https://libtmux.org/en/ocaml/latest/guides/getting-started/), [workspace examples](https://libtmux.org/en/ocaml/latest/workspace/source-guide/) and
[public interfaces](https://libtmux.org/en/ocaml/latest/reference/). The source-install walkthrough installs all current
packages; a consuming Dune project lists only the libraries it uses.

## Scope policy

Prefer standard-library types and ordinary functions. Keep transport, JSON and
CLI dependencies at their integration boundaries. Use the current stable OCaml
compiler in 2026; older-compiler shims and compatibility matrices are excluded.

MCP integration is outside this port's scope. The project does not ship or
vendor an MCP SDK or server. Native OCaml APIs and the workspace CLI are its
automation interfaces; MCP discovery and conformance are excluded from the
project's adoption and completion criteria.
