Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

kryota-dev/dotfiles

Repository files navigation

dotfiles

Declarative macOS (Apple Silicon) development environment powered by chezmoi.

CI chezmoi shell: zsh macOS MIT

English | 日本語

Highlights

  • chezmoi — template-driven dotfiles with interactive secret prompts
  • sheldon + zsh-defer — minimal .zshrc core with lazy-loaded modular config
  • starship — Catppuccin Mocha themed two-line prompt
  • Ghostty — Moralerspace Neon font
  • 1Password CLI — SSH signing, commit verification, secret management
  • Claude Code — skills & agents managed as dotfiles
  • mise — unified tool/runtime version manager (Node, Python, Ruby, Go, CLI tools)
  • Homebrew — system packages, GUI apps, and libraries via Brewfile
  • GitHub Actions — shellcheck, shfmt, Bats tests, zsh startup benchmark

Getting Started

Requires macOS (Apple Silicon) or Ubuntu and 1Password (SSH Agent + CLI).

On a fresh machine (no prerequisites needed beyond curl and bash):

# Review the script before running: https://github.com/kryota-dev/dotfiles/blob/main/install/install.sh
bash <(curl -fsLS https://raw.githubusercontent.com/kryota-dev/dotfiles/main/install/install.sh)

If chezmoi is already installed:

chezmoi init --apply kryota-dev

Lifecycle scripts automatically handle prerequisites, Homebrew packages, and macOS defaults (fonts are deployed via a chezmoi external).

1Password Secret Setup

Sensitive files (AWS config) are stored as 1Password Secure Notes and rendered via chezmoi templates at apply time. Before running chezmoi apply, ensure:

  1. 1Password desktop app is installed with CLI integration enabled (Settings > Developer > Integrate with 1Password CLI)

  2. The following Secure Notes exist in the kryota.dev vault:

    Item Title Content
    Dotfiles - AWS Config ~/.aws/config content

See 1Password secrets onboarding for the full list of required vault items and how chezmoi apply gates on them.

Documentation

Full documentation lives in docs/ — English canonical with Japanese (*.ja.md) mirrors. Start at the docs index:

Architecture

Repository Structure

dotfiles/
├── .chezmoiroot # source root → home/
├── install/ # bootstrap script
├── home/
│ ├── .chezmoidata.toml # template data (email, signingkey, name, ghq_user, versions, skills)
│ ├── dot_zshrc.tmpl # minimal core, sheldon-powered
│ ├── dot_config/
│ │ ├── chezmoi/ # chezmoi behavior config (auto-deployed)
│ │ ├── ghostty/ # terminal config
│ │ ├── mise/ # tool version manager
│ │ ├── sheldon/ # plugin manager
│ │ ├── starship.toml # prompt theme
│ │ └── zsh/ # deferred shell modules
│ ├── AGENTS.md # shared AI agent instructions
│ ├── dot_claude/ # Claude Code settings & agents
│ ├── dot_codex/ # Codex settings
│ ├── dot_agents/skills/ # shared AI skills (symlinked)
│ ├── run_once_before_* # first-time setup
│ ├── run_onchange_after_* # re-run on content change
│ ├── run_once_after_* # one-time post-setup
│ └── ...
├── tests/ # Bats test suite
├── scripts/ # benchmark utilities
├── Makefile # development commands
└── LICENSE

Deep dives

For the zsh startup model, the full lifecycle apply timeline, the chezmoi engine, externals pinning, and dev tooling, see the architecture docs:

Claude Code

AI-native development environment — Claude Code and Codex settings, custom skills, and agents are managed declaratively as dotfiles via chezmoi. Skills are centralized in home/dot_agents/skills/ and symlinked to both ~/.claude/skills and ~/.codex/skills.

See docs/agents/ for the dual-harness ×ばつ dual-account model, account isolation, and the skill provenance taxonomy.

Development

Command Description
make help List available targets (default target)
make lint shellcheck + shfmt + zsh syntax
make fmt Format shell scripts with shfmt
make test Run lint + Bats tests
make benchmark Measure zsh startup time
make dump-brewfile Export current Homebrew packages
make sync-ghq-completion Refresh vendored _ghq completion

Applying and diffing are done with chezmoi directly: chezmoi apply -v, chezmoi diff.

CI pipelines:

  • CI (ci.yml): Lint + Test (make lint / make test-bats) + ghq-completion sync — all on ubuntu-latest
  • Setup Validation (setup-validation.yml): end-to-end chezmoi apply on macOS and Ubuntu/Linuxbrew
  • Benchmark (benchmark.yml): weekly cron + manual dispatch (macOS)

See CI & tests and local dev for the bats suite map, the validation matrix, and the full make contract.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /