shine-cli 2.1.1

Give personal automation a reviewable lifecycle
Documentation
version = 2
description = "Initialize macOS with selectable Homebrew, Rust, terminal tools, editor, network, and JavaScript runtime setup steps."
default_profile = "recommended"

[[items]]
id = "homebrew"
label = "Homebrew"
description = "Install or verify the Homebrew package manager."
permissions = { schema_version = 1, filesystem = [{ access = ["execute"], base = "preset", path = "install/homebrew.sh" }], network = [{ scope = "any" }], commands = ["/bin/bash", "curl"] }

detect = { kind = "command", command = "brew", version_args = ["--version"] }
install = { kind = "script", path = "install/homebrew.sh" }

[[items.shell]]
shells = ["zsh"]
phase = "pre"
fragment = "profile/homebrew.sh"

[[items]]
id = "rust"
label = "Rust"
description = "Install Rustup and the Rust toolchain."
permissions = { schema_version = 1, filesystem = [{ access = ["execute"], base = "preset", path = "install/rust.sh" }], network = [{ scope = "any" }], commands = ["curl", "sh"] }

detect = { kind = "command", command = "rustup", version_args = ["--version"] }
install = { kind = "script", path = "install/rust.sh" }

[[items]]
id = "yazi"
label = "Yazi"
description = "Install the Yazi terminal file manager."
permissions = { schema_version = 1 }

detect = { kind = "command", command = "yazi", version_args = ["--version"] }
install = { kind = "package", provider = "homebrew", package = "yazi" }

[[items.shell]]
shells = ["zsh"]
phase = "post"
when_command = "yazi"
fragment = "profile/yazi.sh"

[[items]]
id = "starship"
label = "Starship"
description = "Install the Starship shell prompt."
permissions = { schema_version = 1 }

detect = { kind = "command", command = "starship", version_args = ["--version"] }
install = { kind = "package", provider = "homebrew", package = "starship" }

[[items.shell]]
shells = ["bash", "zsh"]
phase = "post"
when_command = "starship"
eval = ["starship", "init", "{shell}"]

[[items]]
id = "neovim"
label = "Neovim"
description = "Install Neovim with Homebrew."
permissions = { schema_version = 1 }

detect = { kind = "command", command = "nvim", version_args = ["--version"] }
install = { kind = "package", provider = "homebrew", package = "neovim" }

[[items]]
id = "astronvim"
label = "AstroNvim"
description = "Install the AstroNvim template into ~/.config/nvim when no config exists."
permissions = { schema_version = 1, filesystem = [{ access = ["execute"], base = "preset", path = "install/astronvim.sh" }], network = [{ scope = "host", host = "github.com" }], commands = ["git"] }

detect = { kind = "path", path = "$HOME/.config/nvim" }
install = { kind = "script", path = "install/astronvim.sh" }

[[items]]
id = "zerotier"
label = "ZeroTier"
description = "Install the ZeroTier One macOS client."
permissions = { schema_version = 1 }

[items.detect]
kind = "any"
probes = [
  { kind = "command", command = "zerotier-cli" },
  { kind = "path", path = "/Applications/ZeroTier One.app" },
]

[items.install]
kind = "package"
provider = "homebrew-cask"
package = "zerotier-one"
success_status = "needs-action"
success_hint = "open ZeroTier and join a network"

[[items]]
id = "split-dns"
label = "Private split DNS"
description = "Route one private DNS suffix to DNS servers reachable through ZeroTier."
permissions = { schema_version = 1, administrator = true, environment = [{ name = "PRIVATE_DNS_DOMAIN", sensitivity = "plain" }, { name = "PRIVATE_DNS_SERVERS", sensitivity = "plain" }], system = [{ capability = "split-dns", resource = "private-domain" }] }
mode = "managed"
driver = "split-dns"
requires_admin = true
required_env = ["PRIVATE_DNS_DOMAIN", "PRIVATE_DNS_SERVERS"]

[items.config]
domain_env = "PRIVATE_DNS_DOMAIN"
servers_env = "PRIVATE_DNS_SERVERS"

[[items]]
id = "zsh-autosuggestions"
label = "zsh-autosuggestions"
description = "Install zsh command autosuggestions."
permissions = { schema_version = 1 }

[items.detect]
kind = "any"
probes = [
  { kind = "path", path = "/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" },
  { kind = "path", path = "/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" },
]

[items.install]
kind = "package"
provider = "homebrew"
package = "zsh-autosuggestions"

[[items.shell]]
shells = ["zsh"]
phase = "post"
priority = 90
fragment = "profile/zsh-autosuggestions.sh"

[[items]]
id = "zsh-syntax-highlighting"
label = "zsh-syntax-highlighting"
description = "Install zsh command syntax highlighting."
permissions = { schema_version = 1 }

[items.detect]
kind = "any"
probes = [
  { kind = "path", path = "/opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" },
  { kind = "path", path = "/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" },
]

[items.install]
kind = "package"
provider = "homebrew"
package = "zsh-syntax-highlighting"

[[items.shell]]
shells = ["zsh"]
phase = "post"
priority = 100
fragment = "profile/zsh-syntax-highlighting.sh"

[[items]]
id = "zsh-vi-mode"
label = "zsh-vi-mode"
description = "Install vi-style zsh editing mode."
permissions = { schema_version = 1 }

[items.detect]
kind = "any"
probes = [
  { kind = "path", path = "/opt/homebrew/opt/zsh-vi-mode/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh" },
  { kind = "path", path = "/usr/local/opt/zsh-vi-mode/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh" },
]

[items.install]
kind = "package"
provider = "homebrew"
package = "zsh-vi-mode"

[[items.shell]]
shells = ["zsh"]
phase = "post"
fragment = "profile/zsh-vi-mode.sh"

[[items]]
id = "zoxide"
label = "zoxide"
description = "Install smarter directory jumping."
permissions = { schema_version = 1 }

detect = { kind = "command", command = "zoxide", version_args = ["--version"] }
install = { kind = "package", provider = "homebrew", package = "zoxide" }

[[items.shell]]
shells = ["bash", "zsh"]
phase = "post"
when_command = "zoxide"
eval = ["zoxide", "init", "{shell}"]

[[items]]
id = "atuin"
label = "Atuin"
description = "Install the Atuin shell history sync client."
permissions = { schema_version = 1 }

detect = { kind = "command", command = "atuin", version_args = ["--version"] }
install = { kind = "package", provider = "homebrew", package = "atuin" }

[[items.shell]]
shells = ["bash", "zsh"]
phase = "post"
when_command = "atuin"
eval = ["atuin", "init", "{shell}"]

[[items]]
id = "fzf"
label = "fzf"
description = "Install the fzf command-line fuzzy finder."
permissions = { schema_version = 1 }

detect = { kind = "command", command = "fzf", version_args = ["--version"] }
install = { kind = "package", provider = "homebrew", package = "fzf" }

[[items.shell]]
shells = ["bash", "zsh"]
phase = "post"
when_command = "fzf"
eval = ["fzf", "--{shell}"]

[[items]]
id = "bat"
label = "bat"
description = "Install the bat command-line file viewer."
permissions = { schema_version = 1 }

detect = { kind = "command", command = "bat", version_args = ["--version"] }
install = { kind = "package", provider = "homebrew", package = "bat" }

[[items.shell]]
shells = ["bash", "zsh"]
phase = "post"
when_command = "bat"
aliases = { cat = "bat" }

[[items]]
id = "eza"
label = "eza"
description = "Install the eza modern ls replacement."
permissions = { schema_version = 1 }

detect = { kind = "command", command = "eza", version_args = ["--version"] }
install = { kind = "package", provider = "homebrew", package = "eza" }

[[items.shell]]
shells = ["bash", "zsh"]
phase = "post"
when_command = "eza"
aliases = { ls = "eza --icons", ll = "eza -la --icons", lt = "eza --tree" }

[[items]]
id = "nvm"
label = "nvm"
description = "Install Node Version Manager with Homebrew."
permissions = { schema_version = 1 }

[items.detect]
kind = "any"
probes = [
  { kind = "path", path = "/opt/homebrew/opt/nvm/nvm.sh" },
  { kind = "path", path = "/usr/local/opt/nvm/nvm.sh" },
  { kind = "path", path = "$HOME/.nvm/nvm.sh" },
]

[items.install]
kind = "package"
provider = "homebrew"
package = "nvm"

[[items.shell]]
shells = ["zsh"]
phase = "pre"
fragment = "profile/nvm.pre.sh"

[[items.shell]]
shells = ["zsh"]
phase = "post"
fragment = "profile/nvm.post.sh"

[[items]]
id = "bun"
label = "Bun"
description = "Install the Bun JavaScript runtime."
permissions = { schema_version = 1 }

detect = { kind = "command", command = "bun", version_args = ["--version"] }
install = { kind = "package", provider = "homebrew", package = "bun" }

[[items.shell]]
shells = ["zsh"]
phase = "pre"
fragment = "profile/bun.sh"

[[items]]
id = "pnpm"
label = "pnpm"
description = "Install the pnpm package manager."
permissions = { schema_version = 1 }

detect = { kind = "command", command = "pnpm", version_args = ["--version"] }
install = { kind = "package", provider = "homebrew", package = "pnpm" }

[[items.shell]]
shells = ["zsh"]
phase = "pre"
fragment = "profile/pnpm.sh"

[[items]]
id = "mise"
label = "mise"
description = "Install the mise development environment manager."
permissions = { schema_version = 1 }

detect = { kind = "command", command = "mise", version_args = ["--version"] }
install = { kind = "package", provider = "homebrew", package = "mise" }

[[items.shell]]
shells = ["bash", "zsh"]
phase = "post"
when_command = "mise"
eval = ["mise", "activate", "{shell}"]

[[items]]
id = "fastfetch"
label = "Fastfetch"
description = "Install Fastfetch for manual system summaries."
permissions = { schema_version = 1 }

detect = { kind = "command", command = "fastfetch", version_args = ["--version"] }
install = { kind = "package", provider = "homebrew", package = "fastfetch" }

[profiles.required]
items = ["homebrew", "yazi", "starship"]

[profiles.recommended]
items = ["homebrew", "rust", "yazi", "starship", "neovim", "astronvim", "zerotier", "zsh-autosuggestions", "zsh-syntax-highlighting", "zsh-vi-mode", "zoxide", "atuin", "fzf", "bat", "eza"]

[profiles.all]
items = ["homebrew", "rust", "yazi", "starship", "neovim", "astronvim", "zerotier", "zsh-autosuggestions", "zsh-syntax-highlighting", "zsh-vi-mode", "zoxide", "atuin", "fzf", "bat", "eza", "nvm", "bun", "pnpm", "mise", "fastfetch"]