Skip to content
zawa-kyoPublic

About

πŸ‘¨β€πŸ’» Personal collection of dotfiles for system configuration and customization.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

Β 

History

1,935 Commits

Folders and files

Repository files navigation

πŸš€ dotfiles

Dotfiles repository for managing editors, terminals, CLI tools, and the local development toolchain.

This README covers initial setup and common commands. For design principles and operational details, refer to docs/. For coding agent guidance, see AGENTS.md.

Managed Areas

  • Editor configuration for Neovim and VS Code
  • Terminal-related configuration for Zsh, Starship, Ghostty, WezTerm, and Zellij
  • macOS keyboard configuration for Karabiner-Elements
  • Local tool configuration for Homebrew, Bun, mise, procs, and related utilities
  • Standalone workflow CLI commands in bin/
  • AI tool configuration for Codex, Claude Code, and related tools
  • Sample test files for editor and LSP verification

Quick Start

Clone the repository and enter the working directory:

git clone [repository_url]
cd [cloned_repository_path]

Install the latest standalone mise binary using the official installer, which places it at ~/.local/bin/mise:

curl https://mise.run | sh

If you are migrating from the Homebrew version, restart your shell after installing the standalone binary. The active shell environment may still contain an activation hook pointing to /opt/homebrew/bin/mise.

exec zsh -l
mise --version

Trust the repository, then run the standard bootstrap setup:

~/.local/bin/mise trust
~/.local/bin/mise bootstrap --yes

This command executes the following steps:

  • applies dotfile declarations in mise.toml and platform-specific configurations
  • installs mise-managed tools
  • initializes a machine-specific fnox configuration and age key
  • applies apm-managed skills
  • prepares the Bun global environment
  • deploys the global Git pre-commit hook configuration for hk

The hk hook relies on Git's config-based hook mechanism and requires Git 2.54 or newer. It exits gracefully without performing any action in repositories that do not contain hk.pkl.

mise run install remains available as a backward-compatible alias for mise bootstrap. Neither command automatically installs Homebrew packages. On macOS, run mise run install-brew explicitly when you need to install missing Brewfile dependencies.

If mise was previously installed via Homebrew, uninstall that formula after setting up the standalone binary:

brew uninstall mise

To remove the standalone binary and data managed by mise, review the targets before running mise implode. The command preserves ~/.config/mise unless you explicitly pass --config:

mise implode --dry-run
mise implode

Common Commands

Command Purpose
mise bootstrap Run the standard local setup
mise bootstrap dotfiles status Inspect declared dotfile targets without modifying them
mise bootstrap dotfiles apply --dry-run Preview dotfile changes and conflicts
mise bootstrap dotfiles apply --yes Apply declared dotfile symlinks
mise bootstrap dotfiles unapply --dry-run Preview removal of managed dotfiles
mise bootstrap dotfiles unapply --yes Remove managed dotfiles that remain unchanged
mise self-update Update the standalone mise binary immediately
mise run format Format tracked files
mise run check Run all repository checks
mise run install-brew Install missing Brewfile dependencies on macOS
mise run test-deployment Test bootstrap behavior in isolated home directories
mise run --continue-on-error upgrade Update mise-managed tools, apm, Neovim, and Bun; also Homebrew on macOS
mise tasks List available mise tasks

The setup links commands from bin/ globally. That directory contains small CLI tools for daily workflows, such as Git operations and task searches.

The deployed global mise configuration enables automatic updates. mise periodically checks for new releases before running eligible interactive commands. Set MISE_AUTO_UPDATE=false temporarily if you wish to suppress this behavior.

Bun Global Packages

The repository tracks Bun's global package.json, bun.lock, and bunfig.toml under setup/bun/. mise run install-bun copies these files to ~/.bun/install/global and installs dependencies there, ensuring generated node_modules/ artifacts remain outside the repository. mise run upgrade-bun updates dependencies in the runtime directory and copies the updated manifest and lock file back to setup/bun/.

Local Secrets with fnox

Bootstrap initializes ~/.config/fnox/config.toml and a dedicated age key at ~/.config/fnox/age.txt on each machine. The configuration defines a local age provider and sets env = "exec", passing resolved secrets as environment variables only to commands launched through fnox. The configuration directory follows FNOX_CONFIG_DIR, then $XDG_CONFIG_HOME/fnox, and defaults to ~/.config/fnox. Existing keys and configuration files are preserved without being overwritten. If a configuration file exists without age.txt, setup halts as a safety measure so you can restore the original key or review the configuration.

Keep the key and configuration files outside Git and back them up to a secure location (losing the key makes encrypted values unrecoverable). On work machines, use an employer-approved storage location. Do not share keys or secrets between personal and work machines; register the required values on each machine after bootstrapping.

# Enter the secret via a hidden prompt to keep it out of shell history
fnox set GITHUB_TOKEN --global --provider local

# Run a command with resolved secrets injected into its environment
fnox exec -- gh auth status

# Remove a secret when no longer needed (e.g., a test secret)
fnox remove FNOX_DEMO --global

When migrating secrets from ~/.config/local, register one value at a time, update its callers to use fnox exec, and verify that the command succeeds before removing the original plaintext definition. To rerun only the fnox initialization step from this repository, run mise run init-fnox.

Git Worktrees

Worktrunk manages worktrees for repositories cloned via ghq. New worktrees are created alongside the primary repository, and removing a worktree preserves its branch.

Command Purpose
wt switch --branches Select a worktree or local branch, then switch to it
wt switch --remotes Include remote branches when selecting a worktree
wt list Show worktrees and their status
wt remove Remove the current worktree while preserving its branch

Repository Layout

Path Role
dotfiles/ Configuration symlinked into the home directory
bin/ Standalone CLI commands published to ~/.local/bin
libexec/ Private helpers used by published commands
setup/ Machine setup declarations, scripts, and migrations
tests/ Go integration tests using isolated home directories
docs/ Repository-wide design and operational policies

Documentation

This README provides a high-level overview. Refer to docs/README.md as the index for detailed design decisions and operational procedures.

About

πŸ‘¨β€πŸ’» Personal collection of dotfiles for system configuration and customization.

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages