| Crates.io | dotstate |
| lib.rs | dotstate |
| version | 0.2.18 |
| created_at | 2025-12-23 01:30:06.464313+00 |
| updated_at | 2026-01-26 00:02:11.291603+00 |
| description | A modern, secure, and user-friendly dotfile manager built with Rust |
| homepage | https://dotstate.serkan.dev |
| repository | https://github.com/serkanyersen/dotstate |
| max_upload_size | |
| id | 2000585 |
| size | 2,216,164 |
A modern, secure, and user-friendly dotfile manager built with Rust
DotState is a terminal-based tool 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.
https://github.com/user-attachments/assets/9be0df5e-87ce-4b61-ae0f-1c8ffe94cb36
Managing dotfiles can be a pain. You want your .zshrc, .vimrc, 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:
.gitconfig or .tmux.conf) across all profiles automatically.curl -fsSL https://dotstate.serkan.dev/install.sh | bash"
cargo install dotstate
brew tap serkanyersen/dotstate
brew install dotstate
Or use the direct install:
brew install serkanyersen/dotstate/dotstate
Launch DotState:
dotstate
First-time Setup:
DOTSTATE_GITHUB_TOKEN environment variableAdd Your Files:
Sync with Remote:
That's it! Your dotfiles are now synced and ready to use on any machine.
DotState also provides a powerful CLI for automation:
# List all synced files
dotstate list
# Add a file to sync
dotstate add ~/.myconfig
# Sync with remote (commit, pull, push)
dotstate sync
# Sync with custom commit message
dotstate sync -m "My custom commit message"
# Activate symlinks (useful after cloning on a new machine)
dotstate activate
# Deactivate symlinks (restore original files)
dotstate deactivate
# Check for updates and upgrade
dotstate upgrade
# Show help
dotstate help
~/.config/dotstate/storage)common section and linked regardless of the active profileDotState supports two repository setup modes:
Let DotState create and manage a GitHub repository for you. Requires a GitHub Personal Access Token.
GitHub Token Options:
DotState supports both Classic tokens and Fine-grained tokens (recommended).
Fine-grained tokens offer better security through granular permissions. Create one at github.com/settings/personal-access-tokens.
Required permissions:
| Permission | Access Level | Purpose |
|---|---|---|
| Administration | Read & write | Create your dotstate-storage repository |
| Contents | Read & write | Sync your dotfiles to/from the repository |
Note: Metadata (read-only) is automatically included by GitHub for all fine-grained tokens.
Repository access:
dotstate-storage repositoryCreate a classic token at github.com/settings/tokens.
Required scope: repo (Full control of private repositories)
Token Configuration:
Environment Variable (Recommended for automation):
export DOTSTATE_GITHUB_TOKEN=ghp_your_token_here
# or for fine-grained tokens:
export DOTSTATE_GITHUB_TOKEN=github_pat_your_token_here
The environment variable takes precedence over the config file token.
Config File: The token can be stored in the config file (set during first-time setup).
Use any existing git repository from any host (GitHub, GitLab, Bitbucket, self-hosted, etc.).
Setup:
git clone <url> ~/.config/dotstate/storagegit push origin mainBenefits of Local Mode:
DotState automatically checks for updates and shows a notification in the main menu when a new version is available. You can also check manually:
# Check for updates interactively
dotstate upgrade
# Just check without prompting
dotstate upgrade --check
Configuration:
Update checks can be configured in ~/.config/dotstate/config.toml:
[updates]
check_enabled = true # Set to false to disable update checks
check_interval_hours = 24 # How often to check (default: 24 hours)
DotState supports both light and dark themes that automatically adapt to your terminal background. The theme affects all UI elements including colors, borders, text, and syntax highlighting in file previews.
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)
Theme Features:
--no-colors CLI flag or NO_COLOR=1 to disable all colors:
dotstate --no-colors
Or:
NO_COLOR=1 dotstate
What Changes with Theme:
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:
Changing the Preset:
Edit ~/.config/dotstate/config.toml and set the preset option in the [keymap] section:
[keymap]
preset = "vim" # Options: "standard", "vim", "emacs"
Custom Key Binding Overrides:
You can override any key binding with custom keys. Overrides take precedence over preset bindings and shadow preset bindings for the same action.
Example configuration:
[keymap]
preset = "vim"
# Override 'x' to quit instead of 'q'
[[keymap.overrides]]
key = "x"
action = "quit"
# Override 'w' to move up instead of 'k'
[[keymap.overrides]]
key = "w"
action = "move_up"
# Use Ctrl+H for help
[[keymap.overrides]]
key = "ctrl+h"
action = "help"
Available Actions (all in snake_case):
move_up, move_down, move_left, move_right, page_up, page_down, go_to_top, go_to_end, home, endconfirm, cancel, toggle_select, select_all, deselect_allquit, helpdelete, edit, create, search, refresh, sync, check_status, installbackspace, delete_charnext_tab, prev_tabscroll_up, scroll_downyes, nosave, toggle_backupKey Format Examples:
"j", "k", "q", "x""up", "down", "enter", "esc", "tab", "space""f1", "f2", etc."ctrl+n", "ctrl+shift+j", "ctrl+h"How Overrides Work:
move_up), all preset bindings for that action are shadowed/removedmove_up with "w", the original preset key (e.g., "k" in vim preset) will no longer work for that actionExample:
See examples/keymap_override_example.toml for a complete example configuration file.
DOTSTATE_GITHUB_TOKEN environment variable (recommended) or stored in config files with secure permissionsDotState is actively developed and ready for use. The core features are stable, and we're continuously improving based on user feedback.
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
MIT License - see LICENSE file for details.
Built with:
Badges:
Made with β€οΈ and Rust