Manage your dotfiles with ease. Sync to any git host, organize by profiles, and keep your configuration files safe.
๐
What is DotState? - Modern Dotfile Manager for Developers
DotState is a terminal-based dotfile manager that helps you manage your dotfiles effortlessly. Whether you're syncing your configuration across multiple machines or setting up a new development environment, DotState makes it simple, safe, and fast.
brew tap serkanyersen/dotstate brew install dotstate
cargo install dotstate
For more installation options, see the Installation page.
Why Use a Dotfile Manager?
Managing dotfiles can be a pain. You want your .zshrc, .vimrc, .gitconfig, .bashrc, and other config files synced across machines, but traditional solutions are either too complex, insecure, or require too much manual work.
DotState solves this by being:
๐ฆ Built with Rust - Fast, memory-safe, and reliable dotfile management
๐ Secure by design - No shell injection vulnerabilities, safe file operations
โก Lightning fast - Non-blocking operations, instant feedback
๐ก๏ธ Safe - Automatic backups before any file operations
๐ Git-powered - Store dotfiles in GitHub, GitLab, Bitbucket, or any git host
Traditional Dotfile Managers
โ Require Git knowledge
โ Manual symlink management
โ No built-in backup system
โ Complex setup process
DotState - Best Dotfile Manager
โ Zero Git knowledge required
โ Automatic symlink management
โ Built-in backups
โ One-command setup
Perfect For
Developers who work on multiple machines
Teams sharing configuration files
Anyone who wants to backup their dotfiles
Users switching between macOS and Linux
Developers who want a modern Rust-based solution
๐ก
Tip: When you select a file, it's automatically copied to your repository and a symlink is created in its place. This means your files are safely backed up and version controlled.
โ
Status
Synced Files:8
Profiles:2(Active: Personal)
Repository:dotstate-storage
โญ
DotState Features - Complete Dotfile Management Solution
DotState provides everything you need for dotfile management, configuration sync, and profile organization. Here's what makes it the best dotfile manager:
๐ฏ Core Features
๐ค
Profile Management
Create separate profiles for different contexts (work, personal, Mac, Linux, etc.). Perfect for managing multiple dotfile sets.
๐
Flexible Git Sync
Sync with any git host: GitHub, GitLab, Bitbucket, or self-hosted. Use DotState-managed repos or bring your own.
๐
Smart File Detection
Automatically finds common dotfiles in your home directory (.zshrc, .vimrc, .gitconfig, etc.).
๐ก๏ธ
Safe Operations
Automatic backups before any file modification. Your files are always safe.
๐
Symlink Management
Automatic creation and management of symlinks. No manual linking required.
๐
Common Files Support
Share dotfiles (like .gitconfig, .tmux.conf, .ssh/config) across all profiles automatically. Update once, sync everywhere.
๐ฆ Package Management
DotState includes built-in package management to track and install CLI tools per profile:
๐
CLI Tool Tracking
Define and track CLI tools and dependencies per profile. Know what's installed where.
๐ง
Multi-Manager Support
Works with Homebrew, Cargo, npm, pip, and more. One tool for all package managers.
โ๏ธ
Installation Flow
Check what's missing and install with one command. Never lose track of dependencies.
๐จ
Custom Packages
Support for custom installation scripts. Full flexibility for your workflow.
๐จ User Experience
๐ฅ๏ธ
Beautiful TUI
Modern terminal interface built with Ratatui. The best terminal UI for dotfile management.
๐ฑ๏ธ
Mouse Support
Click to navigate and interact. Not just keyboard-only like other terminal tools.
โก
Real-time Feedback
See what's happening as it happens. No more waiting for operations to complete.
โจ๏ธ
CLI & TUI
Full-featured CLI for automation, beautiful TUI for interactive use. Best of both worlds.
๐น
Customizable Keymaps
Configurable keyboard shortcuts with preset support (Standard, Vim, Emacs) and custom overrides. Use your preferred keyboard layout.
๐ฆ
Install DotState - Installation Guide
Install DotState, the best Rust dotfile manager, using one of these methods:
From Cargo (Recommended)
The easiest way to install DotState is via Cargo, the Rust package manager:
cargo install dotstate
From Source
Build DotState from source for the latest features:
git clone https://github.com/serkanyersen/dotstate.git cd dotstate cargo install --path .
Using Homebrew (macOS)
Install DotState via Homebrew on macOS:
brew tap serkanyersen/dotstate brew install dotstate
Or use the direct install: brew install serkanyersen/dotstate/dotstate
System Requirements
Rust: Latest stable version (for building from source)
Git: For repository operations
Git Host Account: GitHub, GitLab, Bitbucket, or any git host (optional)
Operating System: Linux, macOS, or Windows
(Recommended) Nerd Fonts: For the best visual experience, we recommend using a Nerd Font to see all icons correctly.
๐
Quick Start Guide - Get Started with DotState in Minutes
Get started with DotState, the fastest way to manage your dotfiles. Follow these simple steps:
1
Launch DotState
Start the DotState terminal UI:
dotstate
2
First-time Setup
Choose how to manage your dotfiles repository:
Option A: Create for me (GitHub)
DotState creates a repository on your GitHub account
DotState provides a powerful CLI for automation and scripting. Here's the complete command reference:
dotstate sync
Sync with remote: commit, pull, and push. This is the main sync command for keeping your dotfiles up to date. Use -m "message" to provide a custom commit message, otherwise an automatic message is generated from changed files.
dotstate list
List all synced files. Shows the full path of symlink location and storage repo location.
--verbose Show detailed information including file status
dotstate add <path>
Add a file to sync. Moves the file directly to the repo and creates a symlink automatically.
Example:dotstate add ~/.myconfig or dotstate add ~/.zshrc
dotstate activate
Activate the symlinks, restores app state after deactivation. Use this after cloning your dotfiles on a new machine.
Essential for setting up a new machine with your existing dotfiles.
dotstate deactivate
Deactivate symlinks. This might be useful if you are going to uninstall dotstate or you need the original files.
--completely Completely remove symlinks without restoring files
dotstate logs
Shows logs location and how to view them. Useful for debugging issues.
dotstate config
Configuration file location. Shows where DotState stores its configuration.
dotstate repository
Repository location. Shows where your dotfiles are stored locally.
dotstate upgrade
Check for updates and optionally upgrade DotState. Shows available update options including install script, cargo, and homebrew.
--check Check for updates without prompting to install
dotstate help
Show help for a specific command. Get detailed information about any DotState command.
Example:dotstate help sync or dotstate help add
๐ก
DotState Examples - Common Use Cases and Workflows
Learn how to use DotState with these practical examples and common workflows:
Common Workflows
Setting up a new machine
When you get a new computer, use DotState to quickly set up all your dotfiles:
Install DotState: cargo install dotstate
Launch TUI: dotstate
Choose your setup mode:
GitHub mode: Enter your GitHub token
Local mode: Clone your existing repo and provide the path
Select your profile
Activate symlinks: dotstate activate
Your entire development environment is now configured!
Adding a new dotfile
Add new configuration files to your dotfile collection:
# Using CLI dotstate add ~/.mynewconfig
# Or using TUI dotstate # Navigate to "Manage Files" โ Select file
Both methods automatically move the file to the repo and create a symlink.
Syncing changes across machines
Keep your dotfiles synchronized across all your machines:
DotState supports customizable keyboard shortcuts with preset keymaps (Standard, Vim, Emacs) and custom key binding overrides. The keymap system allows you to use your preferred keyboard layout and override any action with any key combination.
Available Presets
Standard: Arrow keys (โโ), Enter, Esc, standard navigation
Vim: Vim-style navigation (hjkl for movement, q to quit, etc.)
Emacs: Emacs-style navigation (Ctrl+N/P for up/down, Ctrl+G to quit, etc.)
Changing the Preset
Edit ~/.config/dotstate/config.toml and set the preset option:
When you override an action (e.g., move_up), all preset bindings for that action are shadowed/removed
If you override move_up with "w", the original preset key (e.g., "k" in vim preset) will no longer work for that action
Display functions (footer hints) automatically reflect your actual key bindings, including overrides
Press ? in the TUI to see all current key bindings in the help overlay
Theme Configuration
DotState supports both light and dark themes that automatically adapt to your terminal background.
Changing the Theme
Edit ~/.config/dotstate/config.toml and set the theme option:
theme = "dark" # For dark terminal backgrounds (default) theme = "light" # For light terminal backgrounds theme = "nocolor" # Disable all UI colors (same as NO_COLOR=1 / --no-colors)
๐ก
Tip: For CI/CD and automation with GitHub mode, use the DOTSTATE_GITHUB_TOKEN environment variable. For Local mode, ensure your git credentials are properly configured. Press ? in the TUI to see all current key bindings based on your configuration.
๐
DotState Security - Secure Dotfile Management
Security is a top priority for DotState. Here's how we keep your dotfiles safe:
Security Features
๐ก๏ธ No Shell Injection
All commands use direct execution, not shell interpretation. This prevents shell injection vulnerabilities that plague other dotfile managers.
โ Path Validation
Dangerous paths (like home directory root) are blocked. The app validates all paths before operations to prevent accidental data loss.
๐ Git Repository Detection
Prevents nested Git repositories. You can't have a Git repo inside a Git repo, protecting you from configuration conflicts.
๐พ Backup System
Automatic backups before any file operation. Your files are safe even if something goes wrong during sync or file operations.
๐ Token Security
GitHub Mode: Tokens can be provided via the DOTSTATE_GITHUB_TOKEN environment variable or stored in config files. Use tokens with minimal required permissions (only repo scope).
Local Mode: No tokens stored by DotState. Uses your system's git credentials (SSH keys, git credential manager).
Security Best Practices
Use GitHub tokens with minimal required permissions (only repo scope)
Rotate tokens regularly for enhanced security
Never commit tokens to version control
Review files before syncing (especially custom files)
Keep backups enabled (default: enabled)
Use private repositories for sensitive configurations
๐ค
Contributing to DotState - Open Source Dotfile Manager
We welcome contributions! DotState is an open-source project built with โค๏ธ and Rust. Help us make it the best dotfile manager available.