Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test-impl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ jobs:
- run: mise run test:e2e e2e/cli/test_dotfiles_rollback
- run: mise run test:e2e e2e/cli/test_dotfiles_rollback_types
- run: mise run test:e2e e2e/cli/test_bootstrap_user_services
- run: mise run test:e2e e2e/cli/test_dotfiles_watch
- run: mise run test:e2e e2e/cli/test_dotfiles_watch_throttle

lint:
runs-on: ${{ !inputs.trusted && 'ubuntu-latest' || 'namespace-profile-endev-linux-amd64-large;overrides.cache-tag=cache' }}
Expand Down
105 changes: 103 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ miette = { version = "7", features = ["fancy"] }
netrc-rs = "0.1"
nodejs-semver = "5"
nucleo-matcher = "0.3"
notify = { version = "8", default-features = false, features = [
"macos_fsevent",
] }
notify-debouncer-full = { version = "0.7", default-features = false }
num_cpus = "1"
once_cell = "1"
packslip = { version = "0.3", default-features = false }
Expand Down
9 changes: 9 additions & 0 deletions docs/.vitepress/cli_commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ export const commands: { [key: string]: Command } = {
edit: {
hide: false,
},
exclude: {
hide: false,
},
history: {
hide: false,
subcommands: {
Expand All @@ -103,6 +106,9 @@ export const commands: { [key: string]: Command } = {
},
},
},
include: {
hide: false,
},
paths: {
hide: false,
},
Expand All @@ -127,6 +133,9 @@ export const commands: { [key: string]: Command } = {
untrack: {
hide: false,
},
watch: {
hide: false,
},
},
},
files: {
Expand Down
5 changes: 4 additions & 1 deletion docs/cli/bootstrap/dotfiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ Manage dotfiles from `[dotfiles]`
- [`mise bootstrap dotfiles apply [FLAGS] [TARGET]…`](/cli/bootstrap/dotfiles/apply.md)
- [`mise bootstrap dotfiles diff [TARGET]…`](/cli/bootstrap/dotfiles/diff.md)
- [`mise bootstrap dotfiles edit [FLAGS] <TARGET>`](/cli/bootstrap/dotfiles/edit.md)
- [`mise bootstrap dotfiles exclude <GLOB>`](/cli/bootstrap/dotfiles/exclude.md)
- [`mise bootstrap dotfiles history [FLAGS] [SUBCOMMAND]`](/cli/bootstrap/dotfiles/history.md)
- [`mise bootstrap dotfiles paths [-J --json] [--preview <PATH>]`](/cli/bootstrap/dotfiles/paths.md)
- [`mise bootstrap dotfiles include <GLOB>`](/cli/bootstrap/dotfiles/include.md)
- [`mise bootstrap dotfiles paths [FLAGS]`](/cli/bootstrap/dotfiles/paths.md)
- [`mise bootstrap dotfiles rollback [FLAGS] [PATH]…`](/cli/bootstrap/dotfiles/rollback.md)
- [`mise bootstrap dotfiles save [FLAGS] [PATH]…`](/cli/bootstrap/dotfiles/save.md)
- [`mise bootstrap dotfiles status [-J --json] [--missing] [TARGET]…`](/cli/bootstrap/dotfiles/status.md)
- [`mise bootstrap dotfiles track [FLAGS] <PATH>…`](/cli/bootstrap/dotfiles/track.md)
- [`mise bootstrap dotfiles unapply [FLAGS] [TARGET]…`](/cli/bootstrap/dotfiles/unapply.md)
- [`mise bootstrap dotfiles undo [-n --dry-run] [-y --yes] [REF]`](/cli/bootstrap/dotfiles/undo.md)
- [`mise bootstrap dotfiles untrack <PATH>…`](/cli/bootstrap/dotfiles/untrack.md)
- [`mise bootstrap dotfiles watch [--once] [-J --json]`](/cli/bootstrap/dotfiles/watch.md)
19 changes: 19 additions & 0 deletions docs/cli/bootstrap/dotfiles/exclude.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- @generated by usage-cli from usage spec -->
# `mise bootstrap dotfiles exclude`

- **Usage:** `mise bootstrap dotfiles exclude <GLOB>`
- **Effect:** modifies state
- **Source code:** [`src/cli/dotfiles/exclude.rs`](https://github.com/jdx/mise/blob/main/src/cli/dotfiles/exclude.rs)

Never capture paths matching a glob

Adds the glob to `[history] exclude` in the global config. Use it for
logs, caches, databases, and constantly rewritten application state; a
file that genuinely holds configuration but changes constantly is
better tracked with `--no-autosave` and saved explicitly.

## Arguments
- **`<GLOB>`** — A glob such as `~/.config/hypr/plugins/**`

## Flags
- **`-h --help`** — Print help
16 changes: 16 additions & 0 deletions docs/cli/bootstrap/dotfiles/include.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- @generated by usage-cli from usage spec -->
# `mise bootstrap dotfiles include`

- **Usage:** `mise bootstrap dotfiles include <GLOB>`
- **Effect:** modifies state
- **Source code:** [`src/cli/dotfiles/exclude.rs`](https://github.com/jdx/mise/blob/main/src/cli/dotfiles/exclude.rs)

Capture paths matching a glob again

Removes the glob from `[history] exclude` in the global config.

## Arguments
- **`<GLOB>`** — The glob as written by `exclude`

## Flags
- **`-h --help`** — Print help
3 changes: 2 additions & 1 deletion docs/cli/bootstrap/dotfiles/paths.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- @generated by usage-cli from usage spec -->
# `mise bootstrap dotfiles paths`

- **Usage:** `mise bootstrap dotfiles paths [-J --json] [--preview <PATH>]`
- **Usage:** `mise bootstrap dotfiles paths [FLAGS]`
- **Effect:** read-only
- **Source code:** [`src/cli/dotfiles/paths.rs`](https://github.com/jdx/mise/blob/main/src/cli/dotfiles/paths.rs)

Expand All @@ -15,4 +15,5 @@ enrollment is never mistaken for protection.
## Flags
- **`-J --json`** — Output in JSON format
- **`--preview <PATH>`** — Show what tracking this path would capture
- **`--noisy`** — List the paths the watcher found changing constantly
- **`-h --help`** — Print help
42 changes: 42 additions & 0 deletions docs/cli/bootstrap/dotfiles/watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!-- @generated by usage-cli from usage spec -->
# `mise bootstrap dotfiles watch`

- **Usage:** `mise bootstrap dotfiles watch [--once] [-J --json]`
- **Effect:** modifies state
- **Source code:** [`src/cli/dotfiles/watch.rs`](https://github.com/jdx/mise/blob/main/src/cli/dotfiles/watch.rs)

Save tracked files as they change

Runs in the foreground: installs filesystem watches for every autosaved
tracked entry, saves a checkpoint once a changed file has been quiet for
`history.watch.debounce` (a file that keeps changing never delays the
others; `history.watch.max_interval` saves it regardless), and
reconciles the whole set at startup, every `history.watch.reconcile`,
and when the configuration changes. Manual-save entries are never
watched.

The `history-watch` built-in service runs this for you:

```
[bootstrap.services.mise-history]
builtin = "history-watch"
```

Exit codes: 0 when history is disabled or another watcher already runs;
1 when git is unusable, the store cannot open, or no watch can be
installed. A capture that fails is retried with backoff and never drops
the pending changes; one that would overlap another history operation
is deferred.

## Flags
- **`--once`** — Reconcile once and exit (for timers and cron)
- **`-J --json`** — One JSON object per line instead of log lines
- **`-h --help`** — Print help

Examples:

```
mise bootstrap dotfiles watch
mise bootstrap dotfiles watch --once # one reconcile, for a timer
mise bootstrap dotfiles watch --json
```
5 changes: 4 additions & 1 deletion docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,22 @@
- [`mise bootstrap dotfiles apply [FLAGS] [TARGET]…`](/cli/bootstrap/dotfiles/apply.md)
- [`mise bootstrap dotfiles diff [TARGET]…`](/cli/bootstrap/dotfiles/diff.md)
- [`mise bootstrap dotfiles edit [FLAGS] <TARGET>`](/cli/bootstrap/dotfiles/edit.md)
- [`mise bootstrap dotfiles exclude <GLOB>`](/cli/bootstrap/dotfiles/exclude.md)
- [`mise bootstrap dotfiles history [FLAGS] [SUBCOMMAND]`](/cli/bootstrap/dotfiles/history.md)
- [`mise bootstrap dotfiles history describe <REF> <TEXT>`](/cli/bootstrap/dotfiles/history/describe.md)
- [`mise bootstrap dotfiles history diff [FLAGS] [A] [B]`](/cli/bootstrap/dotfiles/history/diff.md)
- [`mise bootstrap dotfiles history ls [FLAGS]`](/cli/bootstrap/dotfiles/history/ls.md)
- [`mise bootstrap dotfiles history show [FLAGS] [REF]`](/cli/bootstrap/dotfiles/history/show.md)
- [`mise bootstrap dotfiles paths [-J --json] [--preview <PATH>]`](/cli/bootstrap/dotfiles/paths.md)
- [`mise bootstrap dotfiles include <GLOB>`](/cli/bootstrap/dotfiles/include.md)
- [`mise bootstrap dotfiles paths [FLAGS]`](/cli/bootstrap/dotfiles/paths.md)
- [`mise bootstrap dotfiles rollback [FLAGS] [PATH]…`](/cli/bootstrap/dotfiles/rollback.md)
- [`mise bootstrap dotfiles save [FLAGS] [PATH]…`](/cli/bootstrap/dotfiles/save.md)
- [`mise bootstrap dotfiles status [-J --json] [--missing] [TARGET]…`](/cli/bootstrap/dotfiles/status.md)
- [`mise bootstrap dotfiles track [FLAGS] <PATH>…`](/cli/bootstrap/dotfiles/track.md)
- [`mise bootstrap dotfiles unapply [FLAGS] [TARGET]…`](/cli/bootstrap/dotfiles/unapply.md)
- [`mise bootstrap dotfiles undo [-n --dry-run] [-y --yes] [REF]`](/cli/bootstrap/dotfiles/undo.md)
- [`mise bootstrap dotfiles untrack <PATH>…`](/cli/bootstrap/dotfiles/untrack.md)
- [`mise bootstrap dotfiles watch [--once] [-J --json]`](/cli/bootstrap/dotfiles/watch.md)
- [`mise bootstrap files <SUBCOMMAND>`](/cli/bootstrap/files.md)
- [`mise bootstrap files apply [FLAGS]`](/cli/bootstrap/files/apply.md)
- [`mise bootstrap files status [FLAGS]`](/cli/bootstrap/files/status.md)
Expand Down
Loading