You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Marcus 81f719ac2a implement Phase 1 + 2: idempotent link, apply command, and install script
- Rewrite cmd/link.go with safe idempotent logic: skips correct symlinks,
  backs up real files to .dotctl.bak, respects --overwrite and --no-backup
- Add cmd/apply.go: new bootstrap command that clones or pulls a dotfiles
  repo then runs the idempotent link logic with a summary
- Add --overwrite and --no-backup persistent flags to root command
- Remove unstable cmd/sync.go
- Fix cmd/init.go gitignore to not exclude dotctl/config.yml (required
  for apply to work on fresh machines)
- Add install.sh: detects OS/arch, downloads binary from GitHub releases,
  optionally runs dotctl apply <url>
- Update README with Quick Start section covering both bootstrap methods
- Rewrite test/link_test.go with 10 real-filesystem idempotency tests
- Add test/apply_test.go with 5 tests covering dry-run, linking, and
  idempotency
- Fix pre-existing TestInitCommand failure (missing MemMapFs setup)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4 weeks ago
.github/workflows Work (#13) 2 years ago
cmd implement Phase 1 + 2: idempotent link, apply command, and install script 4 weeks ago
test implement Phase 1 + 2: idempotent link, apply command, and install script 4 weeks ago
tools apply go formatting (#41) 2 years ago
.gitignore add goreleaser config, update README (#21) 2 years ago
.goreleaser.yaml add goreleaser config, update README (#21) 2 years ago
.pre-commit-config.yaml adding gitleaks pre commit hook (#22) 2 years ago
LICENSE add license and readme 2 years ago
Makefile clean up repo 1 year ago
README.md implement Phase 1 + 2: idempotent link, apply command, and install script 4 weeks ago
dotctl-roadmap.md implement Phase 1 + 2: idempotent link, apply command, and install script 4 weeks ago
go.mod Bump golang.org/x/crypto from 0.21.0 to 0.31.0 (#42) 1 year ago
go.sum Bump golang.org/x/crypto from 0.21.0 to 0.31.0 (#42) 1 year ago
install.sh implement Phase 1 + 2: idempotent link, apply command, and install script 4 weeks ago
main.go apply go formatting (#41) 2 years ago

README.md

Dotctl

dotfile management

About

Dotctl is a tool to help you easily manage your dotfiles and sync them across separate machines using git. It creates a dotfiles subdirectory in the user's $HOME and provides simple commands to add and symlink config files/directories to the central dotfiles directory.

Quick Start (Bootstrap a fresh machine)

Option 1 — Shell script (no Go required):

curl -fsSL https://raw.githubusercontent.com/Marcusk19/dotctl/main/install.sh | bash -s -- https://github.com/your-user/dotfiles.git

Option 2 — go install:

go install github.com/Marcusk19/dotctl@latest
dotctl apply https://github.com/your-user/dotfiles.git

Both methods clone your dotfiles repo to ~/dotfiles and link all tracked configs automatically.

Installation

go install

go install github.com/Marcusk19/dotctl@latest

Build From Source

Prerequisites

Clone the repo and run the script to build the binary and copy it to your path:

git clone https://github.com/Marcusk19/dotctl.git
cd dotctl
make install

Usage

# init sets up the config file and directory to hold all dotfiles
dotctl init

# add a config directory for dotctl to track
dotctl add ~/.config/nvim

# create symlinks (idempotent, safe to re-run)
dotctl link

# bootstrap dotfiles on a fresh machine
dotctl apply https://github.com/your-user/dotfiles.git

Commands

Command Description
dotctl init Set up a new dotfiles repo and config
dotctl add <path> Track a config file or directory
dotctl link Create symlinks for all tracked configs
dotctl apply <repo-url> Clone a dotfiles repo and link everything (bootstrap)

Flags

Flag Description
--dry-run Show what would be done without making changes
--overwrite Overwrite existing files when linking
--no-backup Skip creating backups of existing files