···23232424## Static Tools (config-driven)
25252626+For how `workspace_dir`, `file_cache_dir`, and `file_state_dir` fit together, see [Filesystem Roots](/guide/filesystem-roots).
2727+2628Shell defaults are platform-specific:
27292830- Linux/macOS: `bash` enabled by default, `powershell` disabled by default.
+21
web/vitepress/docs/guide/cli-flags.md
···5757- `--timeout`: Overall timeout.
5858- `--tool-repeat-limit`: Force final output when the same successful tool call repeats too many times.
59596060+## `chat`
6161+6262+- `--api-key`: API key override.
6363+- `--compact-mode`: Compact display mode for interactive chat output.
6464+- `--endpoint`: Provider base URL override.
6565+- `--llm-request-timeout`: Per-LLM HTTP request timeout.
6666+- `--max-steps`: Max tool-call steps.
6767+- `--max-token-budget`: Max cumulative token budget.
6868+- `--model`: Model override.
6969+- `--no-workspace`: Start chat without a workspace attachment.
7070+- `--parse-retries`: Max JSON parse retries.
7171+- `--profile`: Named LLM profile override.
7272+- `--provider`: Provider override.
7373+- `--skill`: Skill name or id to load. Repeatable.
7474+- `--skills-dir`: Skills root directory. Repeatable.
7575+- `--skills-enabled`: Enable configured skills loading.
7676+- `--timeout`: Overall timeout.
7777+- `--tool-repeat-limit`: Force final when the same successful tool call repeats this many times.
7878+- `--verbose`: Show info-level logs during chat.
7979+- `--workspace`: Attach a workspace directory for this chat session.
8080+6081## `console serve`
61826283- `--allow-empty-password`: Allow console to run without `console.password` or `console.password_hash`.
+3-1
web/vitepress/docs/guide/config-patterns.md
···2424mistermorph install
2525```
26262727-Default workspace is `~/.morph/`.
2727+By default, state is stored under `~/.morph/` and cache under `~/.cache/morph`.
2828+2929+For the difference between `workspace_dir`, `file_cache_dir`, and `file_state_dir`, see [Filesystem Roots](/guide/filesystem-roots).
28302931## Config Sources (precedence)
3032
+2
web/vitepress/docs/guide/config-reference.md
···242242243243## Loop Limits and File Storage
244244245245+For how runtime-provided `workspace_dir` relates to `file_cache_dir` and `file_state_dir`, see [Filesystem Roots](/guide/filesystem-roots).
246246+245247- `max_steps`
246248- `parse_retries`
247249- `max_token_budget`
···11+---
22+title: Filesystem Roots
33+description: What workspace_dir, file_cache_dir, and file_state_dir mean, and how Mistermorph uses them.
44+---
55+66+# Filesystem Roots
77+88+Mistermorph uses three different filesystem roots for three different jobs:
99+1010+- `workspace_dir`: the attached project directory for the current session or topic.
1111+- `file_cache_dir`: rebuildable cache files.
1212+- `file_state_dir`: persistent runtime state.
1313+1414+Keep them separate. The model behaves better when the project tree, temporary files, and runtime state do not blur together.
1515+1616+## The Three Roots
1717+1818+| Root | What it means | Typical contents | Persistence |
1919+|---|---|---|---|
2020+| `workspace_dir` | The active project tree the agent should treat as "the thing I am working on". This is runtime-scoped, not a global config key. | source code, docs, config files, project notes | usually user-managed |
2121+| `file_cache_dir` | Rebuildable files created while the system runs | downloads, temporary conversions, fetched artifacts, generated media | safe to prune |
2222+| `file_state_dir` | Files that should survive restarts and preserve agent state | memory, tasks, skills, guard state, workspace attachments | keep persistent |
2323+2424+By default:
2525+2626+- `file_state_dir` is `~/.morph`
2727+- `file_cache_dir` is `~/.cache/morph`
2828+2929+`workspace_dir` is different. It is attached by the current runtime instead of coming from one global config field.
3030+3131+## How `workspace_dir` Is Attached
3232+3333+In CLI chat:
3434+3535+```bash
3636+mistermorph chat --workspace .
3737+```
3838+3939+Current behavior:
4040+4141+- `mistermorph chat` attaches the current working directory by default.
4242+- `mistermorph chat --workspace <dir>` attaches a specific directory.
4343+- `mistermorph chat --no-workspace` starts without a workspace attachment.
4444+- Inside chat, `/workspace`, `/workspace attach <dir>`, and `/workspace detach` inspect or change the attachment.
4545+4646+Other runtimes can provide `workspace_dir` in their own way. The important point is the same: `workspace_dir` describes the project tree for the current conversation, not the global state home.
4747+4848+## Path Aliases
4949+5050+These aliases make the target root explicit:
5151+5252+- `workspace_dir/...`
5353+- `file_cache_dir/...`
5454+- `file_state_dir/...`
5555+5656+Use them when you want to avoid ambiguity, especially in prompts, scripts, or tool parameters.
5757+5858+## How Tools Resolve Paths
5959+6060+### `read_file`
6161+6262+- Relative paths resolve under `workspace_dir` when one is attached.
6363+- Without a workspace attachment, relative paths resolve under `file_cache_dir`.
6464+- Aliases can force a specific root.
6565+6666+### `write_file`
6767+6868+- Relative paths resolve under `workspace_dir` when one is attached.
6969+- Without a workspace attachment, relative paths resolve under `file_cache_dir`.
7070+- Writes are restricted to `workspace_dir`, `file_cache_dir`, or `file_state_dir`.
7171+- Aliases can force a specific root.
7272+7373+### `bash` and `powershell`
7474+7575+- Command text can use `workspace_dir`, `file_cache_dir`, and `file_state_dir` aliases.
7676+- When shell `cwd` is omitted and `workspace_dir` exists, the shell starts there by default.
7777+7878+This is why `workspace_dir` matters even when you are not explicitly calling `read_file` or `write_file`.
7979+8080+## Practical Rules
8181+8282+- Put the repo or project you want the agent to edit in `workspace_dir`.
8383+- Put temporary downloads and throwaway generated files in `file_cache_dir`.
8484+- Put memory, installed skills, task state, and other durable runtime files in `file_state_dir`.
8585+8686+## Related Pages
8787+8888+- [CLI Flags](/guide/cli-flags)
8989+- [Config Fields](/guide/config-reference)
9090+- [Built-in Tools](/guide/built-in-tools)
9191+- [Config Patterns](/guide/config-patterns)
+12-2
web/vitepress/docs/guide/quickstart-cli.md
···1818mistermorph install
1919```
20202121-Mister Morph initializes the required files. By default it installs into `~/.morph/` and uses `~/.morph/config.yaml` as the config file.
2121+Mister Morph initializes the required files. By default it keeps state under `~/.morph/`, cache under `~/.cache/morph`, and uses `~/.morph/config.yaml` as the config file.
22222323During initialization, Mister Morph asks for the minimum required configuration, including the LLM setup, agent name, and persona.
2424···5555}
5656```
57575858-## 4. Debug switches
5858+## 4. Start an interactive chat
5959+6060+```bash
6161+mistermorph chat --workspace .
6262+```
6363+6464+`mistermorph chat` also attaches the current working directory by default. Use `--no-workspace` when you want a chat session without a project tree.
6565+6666+For the difference between `workspace_dir`, `file_cache_dir`, and `file_state_dir`, see [Filesystem Roots](/guide/filesystem-roots).
6767+6868+## 5. Debug switches
59696070```bash
6171mistermorph run --inspect-prompt --inspect-request --task "Hello"