ghedot
v0.0.6
Published
๐จ Cross-platform dotfiles management tool with beautiful TUI and encryption
Maintainers
Readme
ghedot
๐จ Cross-platform dotfiles management tool with beautiful TUI and encryption
ghedot adalah tool management dotfiles yang modern dan interaktif, dibangun dengan Bun.js. Kelola configuration files Anda dengan mudah menggunakan tampilan TUI yang indah, auto-suggestions, encryption untuk file sensitif, dan full cross-platform support untuk Windows & Linux.
๐ What's New in v0.0.5
- ๐ Custom Folder Support - Gunakan ANY folder name (hades, olympus, zeus, dll.)
- ๐ Auto Path Resolution - Relative paths otomatis dikonversi ke absolute
- ๐ช Improved Windows Support - Enhanced mkdir dengan proper escaping
- โ Path Validation - Validasi dan normalisasi path otomatis
- ๐ Enhanced Documentation - Quick Start Guide, QUICKSTART.md, dan CUSTOM_FOLDERS.md
See CHANGELOG.md for full release notes.
๐ Previous Updates (v0.0.4)
- ๐ Security Scanner - Auto-detect secrets and sensitive data in your dotfiles
- ๐ Encryption Policy - Define mandatory encryption rules for sensitive files
- ๐ Argon2id Encryption - Industry-leading key derivation with memory-hard protection
- โฑ๏ธ Passphrase Cache - Secure in-memory caching with auto-expiration (15min TTL)
- ๐ฏ 20+ Secret Patterns - Detect AWS keys, GitHub tokens, private keys, and more
- ๐จ Policy Enforcement - Block or warn on unencrypted sensitive files
- ๐ Risk Classification - HIGH, MEDIUM, LOW severity levels
โจ Fitur Utama
- ๐จ Beautiful TUI - Interface interaktif yang modern dengan @clack/prompts
- ๐ Auto-Suggestions - Pilih dotfiles dari daftar yang umum digunakan
- ๐ Cross-Platform - Compatible di Windows, Linux, dan macOS
- ๐ Symlink Management - Buat dan kelola symbolic links otomatis
- ๐พ Backup System - Backup dotfiles sebelum perubahan
- ๐ Encryption - Enkripsi dotfiles sensitif dengan ChaCha20-Poly1305 atau AES-256-GCM
- ๐ Beautiful Tables - Status display dengan tabel yang rapi
- โก Fast - Built dengan Bun untuk performa maksimal
- ๐ฏ Platform-Specific - Konfigurasi per-OS
- ๐ฆ Modular - Struktur kode yang clean dan maintainable
- ๐ Auto Update Check - Otomatis cek versi terbaru dan notifikasi update
๐ธ Screenshots
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ghedot - Dotfiles Manager โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ What would you like to do?
โ โ ๐ Initialize
โ โ โ Add dotfile
โ โ ๐ Link dotfiles
โ โ ๐ Show status
โ โ ๐พ Backup dotfiles
โ โ โป๏ธ Restore dotfiles
โ โ ๐ Exit
โ๐ฆ Installation
๐ One-line Install (Recommended)
curl -fsSL https://raw.githubusercontent.com/dwirx/ghedot/main/install-curl.sh | bash๐ฆ Package Managers
NPM (Quick & Easy):
# Install latest version (v0.0.5)
npm install -g ghedot
# Verify installation
ghedot --version
# Should show: 0.0.5Yarn:
yarn global add ghedotpnpm:
pnpm add -g ghedotBun (Recommended for Best Performance):
bun install -g ghedotHomebrew (macOS/Linux):
brew tap dwirx/ghedot
brew install ghedotArch Linux (AUR):
yay -S ghedot-bin
# or
paru -S ghedot-binScoop (Windows):
scoop bucket add dwirx https://github.com/dwirx/scoop-ghedot
scoop install ghedotWindows (PowerShell):
npm install -g ghedot
# Or with Bun
bun install -g ghedot
# Run Windows compatibility test
powershell -File test-windows.ps1๐ฅ Manual Download
Download pre-built binaries from GitHub Releases:
- Linux x64:
ghedot - Linux ARM64:
ghedot-linux-arm64 - Windows x64:
ghedot.exe - macOS Intel:
ghedot-macos - macOS Apple Silicon:
ghedot-macos-arm64
# Make executable and move to PATH
chmod +x ghedot
sudo mv ghedot /usr/local/bin/๐ See INSTALL.md for all installation methods and troubleshooting.
๐ช See WINDOWS_SUPPORT.md for Windows-specific instructions.
๐ See CUSTOM_FOLDERS.md for using custom folders like "hades", "olympus", etc.
๐ Shell Compatibility
Works with bash, zsh, fish, and other POSIX-compatible shells. Automatically detects and uses the best runtime (Bun โ Node.js โ fallback).
๐ Quick Start Guide
๐ฎ๐ฉ Ingin panduan lengkap dalam Bahasa Indonesia? Lihat CARA-PENGGUNAAN.md untuk tutorial lengkap, contoh, dan troubleshooting.
Langkah-langkah Dasar
1๏ธโฃ Inisialisasi Konfigurasi
Jalankan perintah init untuk membuat file konfigurasi ~/.ghedot/ghedot.json:
# Inisialisasi dengan lokasi default (~/.dotfiles)
ghedot init
# Atau dengan path custom
ghedot init --path ~/my-dotfiles
# Atau dengan folder bernama "hades"
ghedot init --path ~/hades
# Atau dengan relative path (akan dikonversi ke absolute)
ghedot init --path ./my-config๐ก Tip: ghedot mendukung ANY folder name! Bisa hades, olympus, zeus, atau apapun. Lihat CUSTOM_FOLDERS.md untuk panduan lengkap.
Output yang diharapkan:
โ
Configuration initialized successfully!
๐ Dotfiles Directory: /home/user/.dotfiles
๐พ Backup Directory: /home/user/.ghedot/backups
๐ฅ๏ธ Platform: linux
๐ Config File: /home/user/.ghedot/ghedot.json2๏ธโฃ Tambahkan Dotfiles
Ada dua cara untuk menambahkan dotfiles:
Cara A: Interactive Mode (Mudah untuk pemula)
ghedot addAkan muncul prompt interaktif yang memandu Anda memilih file, platform, dan pengaturan backup.
Cara B: Manual Edit Config
Edit file ~/.ghedot/ghedot.json secara manual:
{
"dotfilesDir": "/home/user/.dotfiles",
"backupDir": "/home/user/.ghedot/backups",
"files": [
{
"source": "zshrc",
"target": ".zshrc",
"platforms": ["linux", "darwin"],
"backup": true
},
{
"source": "vimrc",
"target": ".vimrc",
"backup": true
}
],
"platform": "linux",
"encrypted": []
}Kemudian copy file ke dotfiles directory:
cp ~/.zshrc ~/.dotfiles/zshrc
cp ~/.vimrc ~/.dotfiles/vimrc3๏ธโฃ Buat Symlinks
Buat symbolic links dari dotfiles directory ke home directory:
# Preview apa yang akan di-link (dry run)
ghedot link --dry-run
# Buat symlinks
ghedot link
# Force overwrite jika file sudah ada
ghedot link --forceOutput yang diharapkan:
โ Created symlink: /home/user/.zshrc -> /home/user/.dotfiles/zshrc
โ Created symlink: /home/user/.vimrc -> /home/user/.dotfiles/vimrc
โ All 2 dotfiles linked successfully!4๏ธโฃ Verifikasi Status
Cek status dotfiles Anda:
ghedot statusOutput:
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ File โ Source โ Target โ Status โ Platform โ
โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค
โ ๐ zshrc โ zshrc โ .zshrc โ โ Linked โ LNX, MAC โ
โ ๐ vimrc โ vimrc โ .vimrc โ โ Linked โ ALL โ
โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ๐ฏ Workflow Lengkap - Contoh Nyata
Skenario: Anda ingin mengelola .zshrc, .vimrc, dan .gitconfig
# 1. Install ghedot (jika belum)
npm install -g ghedot
# 2. Inisialisasi
ghedot init
# Pilih lokasi: ~/.dotfiles (default)
# Konfirmasi create directory: Yes
# 3. Cek file yang ada
ls -la ~ | grep "^\."
# 4. Copy file ke dotfiles directory
mkdir -p ~/.dotfiles
cp ~/.zshrc ~/.dotfiles/zshrc
cp ~/.vimrc ~/.dotfiles/vimrc
cp ~/.gitconfig ~/.dotfiles/gitconfig
# 5. Edit config untuk mendaftarkan files
cat > ~/.ghedot/ghedot.json << 'EOF'
{
"dotfilesDir": "/home/user/.dotfiles",
"backupDir": "/home/user/.ghedot/backups",
"files": [
{
"source": "zshrc",
"target": ".zshrc",
"platforms": ["linux", "darwin"],
"backup": true
},
{
"source": "vimrc",
"target": ".vimrc",
"backup": true
},
{
"source": "gitconfig",
"target": ".gitconfig",
"backup": true
}
],
"platform": "linux",
"encrypted": []
}
EOF
# 6. Backup file asli
ghedot backup
# 7. Remove file asli (akan diganti dengan symlink)
rm ~/.zshrc ~/.vimrc ~/.gitconfig
# 8. Buat symlinks
ghedot link
# 9. Verifikasi
ls -la ~/.zshrc ~/.vimrc ~/.gitconfig
# Output:
# lrwxrwxrwx 1 user user 21 Nov 7 10:00 /home/user/.zshrc -> /home/user/.dotfiles/zshrc
# lrwxrwxrwx 1 user user 21 Nov 7 10:00 /home/user/.vimrc -> /home/user/.dotfiles/vimrc
# lrwxrwxrwx 1 user user 25 Nov 7 10:00 /home/user/.gitconfig -> /home/user/.dotfiles/gitconfig
# 10. Cek status
ghedot statusโจ Keuntungan Menggunakan ghedot
Setelah setup, semua perubahan pada dotfiles Anda akan otomatis tersinkron:
# Edit file di home directory
vim ~/.zshrc
# File di dotfiles directory juga berubah (karena symlink)
cat ~/.dotfiles/zshrc # akan sama dengan ~/.zshrc
# Commit ke Git
cd ~/.dotfiles
git add .
git commit -m "Update zshrc configuration"
git push
# Di komputer lain
cd ~/.dotfiles
git pull
ghedot link # create symlinks di komputer baru๐ Encryption Quick Start (NEW in v0.0.2!)
Encrypt your sensitive dotfiles safely! Perfect for API keys, credentials, SSH configs, and more.
# Encrypt .env file
ghedot encrypt .env
# โ Choose algorithm: ChaCha20-Poly1305 (recommended)
# โ Enter password: ********
# โ File encrypted: .env.encrypted
# Now safe to commit!
git add .env.encrypted
git commit -m "Add encrypted environment"
# Decrypt when needed
ghedot decrypt .env
# โ Enter password: ********
# โ File decrypted: .env๐ฏ Common Use Cases
# Encrypt environment variables
ghedot encrypt .env
ghedot encrypt .env.production
# Encrypt API credentials
ghedot encrypt credentials.json
ghedot encrypt secrets.json
# Encrypt SSH configuration
ghedot encrypt .ssh/config
# Encrypt AWS credentials
ghedot encrypt .aws/credentials
# List all encrypted files
ghedot encrypt --list๐ Full Encryption Guide: ENCRYPTION.md
๐ป Quick Start
Mode 1: Interactive Menu (Recommended)
Jalankan tanpa argumen untuk masuk ke interactive menu:
bun run index.ts
# atau
bun run index.ts menuMode 2: Command Line
Gunakan commands langsung:
# 1. Initialize
bun run index.ts init
# 2. Add dotfile (dengan auto-suggestion!)
bun run index.ts add
# 3. Link dotfiles
bun run index.ts link
# 4. Check status
bun run index.ts status๐ Commands
๐ update - Check for Updates
Check if there's a newer version of ghedot available:
# Simple check
ghedot update
# Verbose output with full version info
ghedot update --verbose
# Alias command
ghedot check-versionFeatures:
- โ Checks npm registry for latest version
- โ Compares with current version
- โ Shows update instructions if available
- โ Cached for 24 hours (won't spam requests)
- โ Auto-checks on startup (compact notification)
Auto Update Notification:
ghedot automatically checks for updates once per day when you run any command. If an update is available, you'll see a compact notification:
๐ฆ Update available: 0.0.1 โ 0.0.2
Run: bun install -g ghedot๐จ menu - Interactive Menu
Mode interaktif dengan TUI yang indah:
bun run index.ts menuFeatures:
- Navigasi dengan keyboard (โ/โ)
- Visual feedback real-time
- Easy untuk pemula
๐ init - Initialize
Inisialisasi konfigurasi ghedot:
bun run index.ts init
# Dengan custom path
bun run index.ts init --path ~/my-dotfilesInteractive prompts:
- โ Pilih lokasi dotfiles directory
- โ Auto-create directory jika belum ada
- โ Konfirmasi overwrite jika sudah ada config
โ add - Add Dotfile
Tambah dotfile dengan auto-suggestions:
bun run index.ts addFeatures:
- ๐ Auto-suggestions untuk dotfiles umum:
.bashrc,.zshrc,.vimrc.gitconfig,.tmux.conf.config/nvim/init.vim- PowerShell profiles (Windows)
- i3/sway configs (Linux)
- Dan banyak lagi!
- ๐ Automatic file existence check
- ๐ฏ Platform-specific configuration
- ๐พ Backup settings
- ๐ Copy file langsung ke dotfiles directory
๐ link - Create Symlinks
Buat symbolic links untuk semua dotfiles:
# Normal link
bun run index.ts link
# Force overwrite existing files
bun run index.ts link --force
# Dry run (preview only)
bun run index.ts link --dry-run
# Verbose output
bun run index.ts link --verboseFeatures:
- โก Batch symlink creation
- โ Konfirmasi sebelum execute
- ๐ Progress indicator
- ๐ Success/failure summary
๐ status - Show Status
Tampilkan status dotfiles dengan beautiful table:
bun run index.ts statusOutput includes:
- ๐ Configuration summary
- ๐ Beautiful status table
- โ File existence indicators
- ๐จ Color-coded status
- ๐ท๏ธ Platform badges
๐พ backup - Backup Dotfiles
Backup semua dotfiles:
# Simple backup
bun run index.ts backup
# Dengan timestamp
bun run index.ts backup --timestamp
# Dry run
bun run index.ts backup --dry-runโป๏ธ restore - Restore Dotfiles
Restore dari dotfiles directory:
# Restore all
bun run index.ts restore
# Dry run
bun run index.ts restore --dry-run๐ password - Password Management
Manage encryption password profiles with interactive TUI:
# Interactive menu
ghedot password
# List all password profiles
ghedot password --list
# Generate a strong password
ghedot password --generate
# Generate with custom length
ghedot password --generate --length 32Features:
- โ Create password profiles - Save password metadata for different environments
- ๐ List profiles - View all saved password profiles with hints and timestamps
- ๐๏ธ Remove profiles - Delete password profiles when no longer needed
- ๐ฒ Generate passwords - Create strong, cryptographically secure passwords (8-128 characters)
- ๐ Check strength - Test password strength with visual indicators and feedback
- ๐ Environment variables - Get setup instructions for password environment variables
Interactive Menu Options:
Add password profile - Create a new password profile
- Enter profile name (e.g., production, staging, personal)
- Set password (not stored, only metadata)
- Add optional hint for easy recall
- Get environment variable setup instructions
List password profiles - View all saved profiles
- See profile names, hints, created dates, last used dates
- Get environment variable names for each profile
Remove password profile - Delete a profile you no longer need
Generate strong password - Create a random secure password
- Choose length (8-128 characters)
- Includes mixed case, numbers, and symbols
- Visual strength indicator
Check password strength - Test your password
- Visual strength meter (Weak/Fair/Good/Strong)
- Detailed feedback on how to improve
- Detection of common patterns
Show environment variables - View password setup instructions
- General password:
GHEDOT_ENCRYPTION_PASSWORD - Profile-specific:
GHEDOT_PASSWORD_<PROFILE_NAME> - Usage examples for each profile
- General password:
Password Profiles:
Password profiles help you organize different passwords:
- ๐ญ Production - Production environment secrets
- ๐งช Staging - Staging/testing environment
- ๐ค Personal - Personal projects
- ๐ฅ Team - Shared team secrets
Example Workflow:
# 1. Create a password profile
ghedot password
# Select: Add password profile
# Name: production
# Enter password: [your strong password]
# Hint: Production API keys
# 2. Set environment variable
export GHEDOT_PASSWORD_PRODUCTION="your-password"
# 3. Use with encryption (will auto-detect profile)
ghedot encrypt .env
# Select: Use saved password profile? Yes
# Select: production
# โ File encrypted!Security Note:
- Passwords are NOT stored by ghedot
- Only metadata (name, hint, timestamps) is saved
- Actual passwords must be set via environment variables
- This keeps your passwords secure while organizing encryption workflows
๐ encrypt - Encrypt Sensitive Dotfiles
Encrypt sensitive files dengan password protection:
# Interactive encrypt
ghedot encrypt
# Encrypt specific file
ghedot encrypt .ssh/config
# List encrypted files
ghedot encrypt --list
# Specify encryption algorithm
ghedot encrypt .env --algorithm chacha20
ghedot encrypt .env --algorithm aes256Features:
- ๐ Password-protected - Secure with strong password (minimum 8 characters)
- ๐ก๏ธ Two encryption algorithms:
- ChaCha20-Poly1305 - Modern, fast, secure (recommended)
- AES-256-GCM - Industry standard, hardware accelerated
- ๐ PBKDF2 key derivation - 100,000 iterations with unique salt
- ๐ Metadata tracking - Tracks encrypted files in config
- ๐ List encrypted files - View all encrypted files with details
- ๐ฏ Safe for git - Encrypted files are safe to commit to public repos
- โก Interactive prompts - Password confirmation and algorithm selection
Use cases:
- ๐ API keys and tokens
- ๐ SSH keys and configs
- ๐ง Email credentials
- ๐ณ Sensitive environment variables
- ๐ Any dotfile with secrets
๐ decrypt - Decrypt Encrypted Dotfiles
Decrypt encrypted files when needed:
# Interactive decrypt
ghedot decrypt
# Decrypt specific file
ghedot decrypt .ssh/config
# Specify output path
ghedot decrypt .env --output .env.local
# Keep encrypted file after decryption
ghedot decrypt .env --keep-encryptedFeatures:
- ๐ Password verification - Secure password-based decryption
- ๐ Encryption info - Shows algorithm and encryption metadata
- ๐ Flexible output - Decrypt to custom location
- ๐๏ธ Optional cleanup - Remove encrypted file after decryption
- โ Validation - Verifies encrypted file format and integrity
- โ ๏ธ Error handling - Clear error messages for invalid passwords
๐ฏ Usage Examples
Example 1: First Time Setup (Interactive)
# Run interactive menu
bun run index.ts
# Select: ๐ Initialize
# Enter dotfiles path: /home/user/.dotfiles
# Confirm create directory: Yes
# Select: โ Add dotfile
# Choose from suggestions: .bashrc
# Source name: bashrc
# Platform: All platforms
# Backup: Yes
# Copy now: Yes
# Select: ๐ Link dotfiles
# Confirm: Yes
# โ Success!
# Select: ๐ Show status
# View beautiful table
# Select: ๐ ExitExample 2: Command Line Workflow
# Initialize
bun run index.ts init
# Add multiple dotfiles
bun run index.ts add # Choose .bashrc
bun run index.ts add # Choose .vimrc
bun run index.ts add # Choose .gitconfig
# Preview what will be linked
bun run index.ts link --dry-run
# Link for real
bun run index.ts link
# Check status
bun run index.ts statusExample 3: Platform-Specific Setup
# Add Linux-only file
bun run index.ts add
# Select: .xinitrc
# Platform: Linux only
# Add Windows-only file
bun run index.ts add
# Select: PowerShell profile
# Platform: Windows only
# Add cross-platform file
bun run index.ts add
# Select: .gitconfig
# Platform: All platforms
# Link akan otomatis filter berdasarkan platform saat ini
bun run index.ts linkExample 4: Encrypting Sensitive Files
# Encrypt SSH config with interactive prompts
ghedot encrypt .ssh/config
# Choose algorithm: ChaCha20-Poly1305
# Enter password: ********
# Confirm password: ********
# โ File encrypted successfully!
# โ Created: .ssh/config.encrypted
# List all encrypted files
ghedot encrypt --list
# Decrypt when needed
ghedot decrypt .ssh/config
# Enter password: ********
# โ File decrypted successfully!
# Encrypt environment file with AES-256
ghedot encrypt .env --algorithm aes256
# Now safe to commit .env.encrypted to git!๐๏ธ Project Structure
ghedot/
โโโ index.ts # Main CLI entry
โโโ src/
โ โโโ cli/ # Command handlers
โ โ โโโ init.ts # Initialize dengan TUI
โ โ โโโ add.ts # Add dengan auto-suggestions
โ โ โโโ link.ts # Link dengan progress
โ โ โโโ backup.ts # Backup dengan konfirmasi
โ โ โโโ restore.ts # Restore dengan warning
โ โ โโโ status.ts # Status dengan tables
โ โ โโโ encrypt.ts # Encrypt sensitive files
โ โ โโโ decrypt.ts # Decrypt encrypted files
โ โ โโโ menu.ts # Interactive menu
โ โโโ core/
โ โ โโโ dotfiles.ts # Core operations
โ โโโ config/
โ โ โโโ index.ts # Config management
โ โโโ utils/
โ โ โโโ platform.ts # Cross-platform utils
โ โ โโโ fs.ts # File operations
โ โ โโโ crypto.ts # Encryption utilities
โ โ โโโ tui.ts # TUI components (@clack)
โ โ โโโ table.ts # Table formatting
โ โ โโโ file-selector.ts # Auto-suggestions
โ โ โโโ logger.ts # Logging
โ โ โโโ prompt.ts # Prompts
โ โโโ types/
โ โโโ index.ts # TypeScript types
โโโ package.json
โโโ README.md๐จ TUI Features
Interactive Prompts
- Text Input: Dengan placeholder dan validation
- Confirm: Yes/No dengan default values
- Select: Single choice dengan hints
- Multi-select: Multiple choices
- Auto-complete: Dengan fuzzy search
Visual Elements
- Spinners: Loading indicators
- Tables: Beautiful formatted tables
- Notes: Info boxes
- Colors: Syntax highlighting
- Icons: Emoji untuk better UX
Auto-Suggestions
ghedot menyediakan auto-suggestions untuk dotfiles umum:
Cross-Platform:
.bashrc,.zshrc,.profile.vimrc,.config/nvim/init.vim.gitconfig.tmux.conf.ssh/config- VSCode settings
Windows:
- PowerShell profiles
.wslconfig.minttyrc
Linux:
.xinitrc,.Xresources- i3/sway configs
- Polybar configs
โ๏ธ Configuration
File konfigurasi: ~/.ghedot/ghedot.json
{
"dotfilesDir": "/home/user/.dotfiles",
"backupDir": "/home/user/.ghedot/backups",
"platform": "linux",
"files": [
{
"source": "bashrc",
"target": ".bashrc",
"platforms": ["linux", "darwin"],
"backup": true
},
{
"source": "vimrc",
"target": ".vimrc",
"backup": true
}
],
"encrypted": [
{
"source": ".ssh/config",
"algorithm": "chacha20-poly1305",
"encryptedAt": "2024-01-15T10:30:00.000Z",
"encryptedFile": ".ssh/config.encrypted"
}
]
}๐ง Cross-Platform Details
Windows
- โ Symbolic links (requires Admin or Developer Mode)
- โ PowerShell profile support
- โ WSL configuration
- โ Auto path conversion (
\separators) - โ
cmd /c mklinkfor symlinks
Linux
- โ Standard
ln -sfsymlinks - โ XDG Base Directory support
- โ Linux-specific configs (i3, sway, etc.)
- โ Shell configurations
macOS
- โ Unix-like symlinks
- โ macOS-specific paths
- โ Compatible dengan Homebrew
๐ฏ Tips & Tricks
1. Use Interactive Menu for Beginners
bun run index.ts menuLebih mudah dengan visual guidance!
2. Always Dry Run First
bun run index.ts link --dry-runPreview sebelum execute.
3. Backup Before Major Changes
bun run index.ts backup --timestampAman untuk rollback.
4. Check Status Regularly
bun run index.ts statusMonitor broken links atau missing files.
5. Use Platform-Specific Configs
Pisahkan configs per-OS untuk flexibility.
๐ Command Reference
Quick reference for all ghedot commands:
| Command | Description | Example |
|---------|-------------|---------|
| ghedot menu | Interactive TUI menu | ghedot menu |
| ghedot init | Initialize configuration | ghedot init |
| ghedot add | Add dotfile to manage | ghedot add |
| ghedot link | Create symlinks | ghedot link --force |
| ghedot unlink | Remove symlinks | ghedot unlink |
| ghedot status | Show dotfiles status | ghedot status |
| ghedot doctor | Diagnose issues | ghedot doctor |
| ghedot backup | Backup dotfiles | ghedot backup --timestamp |
| ghedot restore | Restore dotfiles | ghedot restore |
| ghedot sync | Sync with git | ghedot sync --push |
| ghedot encrypt | Encrypt file | ghedot encrypt .env |
| ghedot decrypt | Decrypt file | ghedot decrypt .env |
| ghedot update | Check for updates | ghedot update |
Encryption Commands
| Command | Options | Description |
|---------|---------|-------------|
| ghedot encrypt [file] | --list | List all encrypted files |
| | --algorithm <type> | Choose algorithm (chacha20, aes256) |
| ghedot decrypt [file] | -o, --output <path> | Custom output path |
| | --keep-encrypted | Keep encrypted file after decrypt |
๐ Troubleshooting
โ Error: "No dotfiles configured"
Problem: Ketika menjalankan ghedot link muncul error:
โฒ No dotfiles configured. Run "ghedot add" to add files.Solution:
# 1. Pastikan sudah init
ghedot init
# 2. Verifikasi config file ada
cat ~/.ghedot/ghedot.json
# 3. Jika config kosong, tambahkan files secara manual
# Edit ~/.ghedot/ghedot.json dan tambahkan entry files
# Atau gunakan command add
ghedot addContoh config yang benar:
{
"dotfilesDir": "/home/user/.dotfiles",
"backupDir": "/home/user/.ghedot/backups",
"files": [
{
"source": "zshrc",
"target": ".zshrc",
"platforms": ["linux"],
"backup": true
}
],
"platform": "linux",
"encrypted": []
}โ Error: "Configuration not found"
Problem: Muncul error "Configuration not found. Run 'ghedot init' first."
Solution:
# Jalankan init untuk membuat config
ghedot init
# Verifikasi config dibuat
ls -la ~/.ghedot/ghedot.jsonโ Symlink Fails on Windows
Problem: Tidak bisa membuat symlink di Windows
Solution:
- Run as Administrator, atau
- Enable Developer Mode (Windows 10/11)
- Settings โ Update & Security โ For Developers
- Enable "Developer Mode"
โ File Already Exists
Problem: Error saat link karena file sudah ada
Solution:
# Option 1: Backup dulu
ghedot backup
# Option 2: Force overwrite
ghedot link --force
# Option 3: Hapus file manual
rm ~/.zshrc
ghedot linkโ Symlink Broken / Not Working
Problem: Symlink dibuat tapi tidak berfungsi
Solution:
# 1. Cek apakah source file ada
ls -la ~/.dotfiles/
# 2. Cek symlink
ls -la ~/.zshrc
# 3. Jika broken, unlink dan link ulang
ghedot unlink
ghedot link
# 4. Verifikasi dengan status
ghedot statusโ Colors Not Showing
Problem: Tidak ada warna di output
Solution: ghedot menggunakan ANSI colors. Pastikan terminal support colors atau coba terminal lain (iTerm2, Windows Terminal, etc.)
โ Permission Denied
Problem: Error permission saat buat symlink atau copy file
Solution:
# Cek permission dotfiles directory
ls -la ~/.dotfiles
# Fix permission jika perlu
chmod 755 ~/.dotfiles
chmod 644 ~/.dotfiles/*
# Atau jalankan dengan sudo (tidak disarankan)
sudo ghedot link๐ก Debug Mode
Untuk debugging lebih detail, gunakan:
# Verbose mode
ghedot link --verbose
# Dry run untuk preview
ghedot link --dry-run
# Check doctor untuk diagnosa
ghedot doctor๐ฆ Dependencies
- @clack/prompts - Beautiful CLI prompts
- picocolors - Terminal colors
- ora - Spinners
- cli-table3 - Tables
- fuzzy - Fuzzy search
- commander - CLI framework
- chalk - Colors (fallback)
๐ Development
Run in Dev Mode
bun --hot index.tsBuild (Optional)
bun build index.ts --compile --outfile ghedotTest Commands
# Test with dry-run
bun run index.ts link --dry-run
bun run index.ts backup --dry-run๐ Documentation
Comprehensive documentation available in multiple formats:
- ๐ Quick Start Guide - Get started in 5 minutes
- ๐ฎ๐ฉ Cara Penggunaan (Bahasa Indonesia) - Panduan lengkap dalam bahasa Indonesia
- ๐ Encryption Guide - Detailed encryption documentation
- ๐ช Windows Support - Windows-specific instructions
- ๐ Custom Folders - Using custom folder names
- ๐ Changelog - Version history and updates
- ๐ Install Guide - Installation instructions
๐ License
MIT
๐ Credits
Built with:
- Bun - Fast all-in-one JavaScript runtime
- @clack/prompts - Beautiful CLI prompts
- cli-table3 - Tables
Made with โค๏ธ using Bun.js
