# Find saved workspaces

Source: https://libtmux.org/en/py/stable/workspace/guides/discovery/

> Resolve explicit files, project directories and saved workspace names.

Use an explicit YAML or JSON file path when you need an unambiguous input. A
directory resolves its project configuration, and a saved name resolves through
the tmuxp configuration roots.

## Global directories

An existing `TMUXP_CONFIGDIR` takes precedence, followed by the XDG
configuration directory and then the legacy [`~/.tmuxp`](https://libtmux.org/en/py/stable/workspace/guides/discovery/) directory. A nonexistent
explicit directory does not automatically win discovery. See
[environment](https://libtmux.org/en/py/stable/workspace/configuration/environment/) for the relevant variables.

## Project files

Project discovery walks from the current directory toward its ancestors,
stopping at home or the filesystem root. It selects at most one candidate per
directory, preferring [`.tmuxp.yaml`](<https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/.tmuxp.yaml>), then [`.tmuxp.yml`](https://libtmux.org/en/py/stable/workspace/guides/discovery/), then [`.tmuxp.json`](https://libtmux.org/en/py/stable/workspace/guides/discovery/).
Nearer directories come first. It does not recursively enumerate child projects.

Load the current project's configuration:

```console
$ tmuxp load .
```

The normal command can attach or prompt. Use `-d` when you want detached
execution and select `-L` or `-S` for an isolated server. [ls](https://libtmux.org/en/py/stable/workspace/cli/ls/),
[search](https://libtmux.org/en/py/stable/workspace/cli/search/), and [edit](https://libtmux.org/en/py/stable/workspace/cli/edit/) use the same discovery
concepts with their own result and error behavior.

[tmuxp reference source](https://github.com/tmux-python/tmuxp/blob/618b398acc05506d3c682906c36cdeb29dcfa1ff/src/tmuxp/cli/__init__.py).
