# mt install

Install the Typst package, defaults, schema and completions

It installs what mt needs on this machine: the Typst package, your user-wide defaults, the config's JSON Schema, and shell completions. It installs all four unless you pass `--no-lib`, `--no-defaults`, `--no-schema` or `--no-completions`. Completions call mt itself, so they stay current when you upgrade.

`--no-lib`, `--no-defaults`, `--no-schema` and `--no-completions` each skip one part. `mt install` refreshes the generated JSON Schemas, so a newer binary’s schema reaches the installed copy without a flag. `--force` overwrites an existing defaults file or hook. It also replaces a package directory that is a symlink, which `mt install` otherwise leaves alone, so it never writes into the checkout the link points at. `mt` writes one completion hook per shell under `~/.config/mindtape/completions/`. Source the one for your shell from its startup file. The hook asks `mt` for completions on each tab press, so it offers this project’s [stems](https://mlavrinenko.github.io/mindtape/concepts/index.md#identity), statuses, [views](https://mlavrinenko.github.io/mindtape/named-sets/index.md#views), templates and link kinds, and the presets for `mt init --preset`. `mt install` copies the prelude into [Typst’s package directory](https://mlavrinenko.github.io/mindtape/config/index.md#local-typst-packages), so run it again after you upgrade `mt`. That rewrites the prelude to match the binary. The completion hooks ask `mt` on each tab press, so they stay current without it.

Runs on one project and refuses a [set](https://mlavrinenko.github.io/mindtape/read-many-projects/index.md).

- `--no-lib`: Skip installing the `@local/mindtape` Typst package
- `--no-defaults`: Skip writing your user-wide `defaults.toml`
- `--no-schema`: Skip the JSON Schemas for config, `at.toml` and machine outputs
- `--no-completions`: Skip installing the shell completion hooks
- `--force`: Overwrite files that already exist
  Those are your `defaults.toml` and the completion hooks. This binary generates the JSON Schemas and refreshes them on every install. It writes the package on every install too, unless its directory is a symlink: `--force` replaces the link with this binary's copy.

Every command also takes the [global flags](https://mlavrinenko.github.io/mindtape/cli/index.md#global-flags).
