npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

Iโ€™ve always been into building performant and accessible sites, but lately Iโ€™ve been taking it extremely seriously. So much so that Iโ€™ve been building a tool to help me optimize and monitor the sites that I build to make sure that Iโ€™m making an attempt to offer the best experience to those who visit them. If youโ€™re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, ๐Ÿ‘‹, Iโ€™m Ryan Hefnerย  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If youโ€™re interested in other things Iโ€™m working on, follow me on Twitter or check out the open source projects Iโ€™ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soonโ€“ish.

Open Software & Tools

This site wouldnโ€™t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you ๐Ÿ™

ยฉ 2025 โ€“ย Pkg Stats / Ryan Hefner

ghedot

v0.0.6

Published

๐ŸŽจ Cross-platform dotfiles management tool with beautiful TUI and encryption

Readme

ghedot

๐ŸŽจ Cross-platform dotfiles management tool with beautiful TUI and encryption

Version License Bun

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.5

Yarn:

yarn global add ghedot

pnpm:

pnpm add -g ghedot

Bun (Recommended for Best Performance):

bun install -g ghedot

Homebrew (macOS/Linux):

brew tap dwirx/ghedot
brew install ghedot

Arch Linux (AUR):

yay -S ghedot-bin
# or
paru -S ghedot-bin

Scoop (Windows):

scoop bucket add dwirx https://github.com/dwirx/scoop-ghedot
scoop install ghedot

Windows (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.json

2๏ธโƒฃ Tambahkan Dotfiles

Ada dua cara untuk menambahkan dotfiles:

Cara A: Interactive Mode (Mudah untuk pemula)

ghedot add

Akan 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/vimrc

3๏ธโƒฃ 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 --force

Output 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 status

Output:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 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 menu

Mode 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-version

Features:

  • โœ“ 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 menu

Features:

  • 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-dotfiles

Interactive 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 add

Features:

  • ๐Ÿ“ 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 --verbose

Features:

  • โšก Batch symlink creation
  • โœ“ Konfirmasi sebelum execute
  • ๐Ÿ“Š Progress indicator
  • ๐Ÿ“ˆ Success/failure summary

๐Ÿ“Š status - Show Status

Tampilkan status dotfiles dengan beautiful table:

bun run index.ts status

Output 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 32

Features:

  • โž• 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:

  1. 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
  2. List password profiles - View all saved profiles

    • See profile names, hints, created dates, last used dates
    • Get environment variable names for each profile
  3. Remove password profile - Delete a profile you no longer need

  4. Generate strong password - Create a random secure password

    • Choose length (8-128 characters)
    • Includes mixed case, numbers, and symbols
    • Visual strength indicator
  5. Check password strength - Test your password

    • Visual strength meter (Weak/Fair/Good/Strong)
    • Detailed feedback on how to improve
    • Detection of common patterns
  6. Show environment variables - View password setup instructions

    • General password: GHEDOT_ENCRYPTION_PASSWORD
    • Profile-specific: GHEDOT_PASSWORD_<PROFILE_NAME>
    • Usage examples for each profile

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 aes256

Features:

  • ๐Ÿ”’ 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-encrypted

Features:

  • ๐Ÿ”“ 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: ๐Ÿ‘‹ Exit

Example 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 status

Example 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 link

Example 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 mklink for symlinks

Linux

  • โœ“ Standard ln -sf symlinks
  • โœ“ 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 menu

Lebih mudah dengan visual guidance!

2. Always Dry Run First

bun run index.ts link --dry-run

Preview sebelum execute.

3. Backup Before Major Changes

bun run index.ts backup --timestamp

Aman untuk rollback.

4. Check Status Regularly

bun run index.ts status

Monitor 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 add

Contoh 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)
    1. Settings โ†’ Update & Security โ†’ For Developers
    2. 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.ts

Build (Optional)

bun build index.ts --compile --outfile ghedot

Test 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:

๐Ÿ“„ License

MIT

๐Ÿ™ Credits

Built with:


Made with โค๏ธ using Bun.js