Skip to content

bradleymackey/configs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Configs

Configuration files for my preferred setup.

Prerequisites

This installation system requires Bun to be installed:

# Install Bun (macOS, Linux, WSL)
curl -fsSL https://bun.sh/install | bash

# Verify installation
bun --version

Install

Clone the repo, symlink folders/files in the relevant places. This will ensure they stay in sync with this repo.

Quick Start

# Clone the repository
git clone <repo-url> ~/configs
cd ~/configs

# Check status of symlinks (verification mode)
bun run verify

# Preview what will be installed (dry-run mode)
bun run dry-run

# Install everything
bun run install

# Install only dotfiles (skip package installations)
bun run install:dotfiles

# Install with verbose output
bun run install:verbose

Available Commands

All commands are available as bun run scripts:

# Verification & Installation
bun run verify           # Check status of all symlinks (no changes made)
bun run install          # Install everything (dotfiles + packages)
bun run install:dotfiles # Install only dotfiles (skip brew, rust, node, etc.)
bun run install:verbose  # Install with detailed output
bun run dry-run          # Preview all changes without making any
bun run usage            # Show detailed help and all options

# Testing
bun test                 # Run all tests
bun test:watch          # Run tests in watch mode

CLI Options

You can also call the installer directly with flags:

  • --verify: Check status of all symlinks without making changes (non-destructive)
  • --dry-run or -d: Preview changes without making any modifications
  • --skip-packages or -s: Only create symlinks, skip package installations
  • --verbose or -v: Show detailed output for all operations
  • --help or -h: Display usage information
# Direct usage (if you prefer)
bun install/install.ts --verify
bun install/install.ts --dry-run --verbose

Features

  • Cross-platform: Built with Bun for better portability and performance
  • Type-safe: Written in TypeScript with full type checking
  • Verification Mode: Check status of all symlinks without making changes
  • Idempotent: Safe to run multiple times without breaking existing setup
  • Backup Protection: Automatically backs up existing files before replacing them
  • Smart Symlinks: Detects and skips already-correct symlinks
  • Error Handling: Gracefully handles missing files and failed operations
  • Colored Output: Clear visual feedback for success, warnings, and errors
  • Dry-run Mode: Preview all changes before applying them

Testing

Run the comprehensive test suite using Bun's built-in test runner:

# Run all tests
bun test

# Run tests in watch mode (auto-rerun on changes)
bun test --watch

# Or use npm scripts
bun run test
bun run test:watch

The test suite includes 47 comprehensive tests validating:

  • Verification mode functionality
  • Dry-run mode functionality
  • Symlink creation and management
  • Idempotency (safe to run multiple times)
  • Backup of existing files
  • File preservation (no data loss)
  • Script syntax validation
  • Directory creation
  • Error handling and edge cases
  • Git integration
  • Platform detection (macOS-specific features)
  • CLI argument combinations

I'm a fan of configs working, and working fast. There may be better alternatives to some of these tools below, but they work well for me in my workflow.

Setup

Notes

  • MacOS + tmux was slow on Intel but is fast on Apple Silicon. No clue why.

About

🔨 Boring configuration files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published