Skip to content

Commit 4c8ed6a

Browse files
committed
chore(chezmoi): bootstrap Obsidian vault external on Windows
Configure a git-repo external for the Obsidian vault path and ensure GitHub CLI is available before init/apply so gh credential-helper cloning works reliably. Made-with: Cursor
1 parent 7ca121e commit 4c8ed6a

5 files changed

Lines changed: 12 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ Finicky's built-in auto-reload does NOT work when the config is managed by chezm
182182

183183
- After every substantive conversation, review whether this file needs updating.
184184
- Add convention rules when the user establishes a new pattern or corrects agent behaviour.
185+
- If stderr shows `mise WARN missing: ...` during commands in this repo, run `mise install` before continuing.
185186
- Before ending a session, check that the git working directory is clean. If it is not clean, either commit/apply/push when appropriate, or ask the user via the question tool when intent is unclear.
186187
- Never remove rules without explicit user confirmation.
187188
- Keep this file concise — if it grows beyond ~200 lines of rules (excluding vault context), propose splitting into topic-specific files.

home/.chezmoiexternal.toml.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
["Documents/Obsidian/Vault"]
2+
type = "git-repo"
3+
url = "https://github.com/ChipWolf/obsidian-on.git"

home/.chezmoiscripts/run_onchange_after_bootstrap_windows.ps1.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"eza"
66
"fd"
77
"fzf"
8+
"gh"
89
"jq"
910
"mise"
1011
"nerd-fonts-FiraCode"

install.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ if (-not (Get-Command git -ErrorAction SilentlyContinue)) {
7272
}
7373
}
7474

75+
# Ensure gh is on PATH before chezmoi init (git credential helper depends on it)
76+
if (-not (Get-Command gh -ErrorAction SilentlyContinue)) {
77+
Write-Host "Installing GitHub CLI..." -ForegroundColor Cyan
78+
choco install gh -y --no-progress
79+
$env:PATH = [System.Environment]::GetEnvironmentVariable("PATH", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("PATH", "User")
80+
}
81+
7582
# Initialise and apply chezmoi dotfiles.
7683
# If the script is running from a local clone, use that as the source.
7784
# Otherwise (e.g. irm | iex), let chezmoi clone from GitHub into the default location.

mise.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[tools]
2-
gh = "2.89.0"
32
uv = "0.11.6"
43
"pipx:pre-commit" = "4.5.1"
54
chezmoi = "2.70.1"

0 commit comments

Comments
 (0)