Yahoo
Advertisement
Advertisement
Advertisement
Advertisement

This one tool is all you need to effortlessly manage and back up your dot files

Dotstate dot file manager open on a laptop screen.
Dotstate dot file manager open on a laptop screen.

If you've spent any amount of time configuring and customizing your Linux environment, shell, or CLI tools, you've likely done so by editing configuration files. These config or dot files (they're called dot files because the file names usually begin with a dot) can get pretty complex over time. If these files are lost or overwritten, you'll have to recreate all your configurations and customizations from scratch. That's why it's a good idea to back up these files. If you run Linux on multiple devices, it's also a good idea to sync the dot file changes between computers instead of making the same changes everywhere by hand. I use this tool to do both those things.

How Dotstate works

Install the tool, connect it with GitHub, it does everything else

Dotstate is a free and open-source TUI (or text user interface) tool, which connects with your GitHub to automatically sync your dot files .

When you're setting up a new machine, you just have to install dotstate on it and run a simple dotstate activate command to rebuild your terminal environment in one go. Dotstate creates symlinks for the synced dot files, so the Linux system and your tools find the files where they're expected. As you make changes to the dot files on the new machine, the changes are synced with your GitHub repo and automatically applied to other linked devices.

Dotstate dashboard is a TUI.

Installing and setting up Dotstate

Dotstate is written in Rust and can be quickly installed via the Cargo package manager. If you don't have Rust and Cargo, you can set it all up with the official Bash script.

You can review the shell script before running. It's always a good idea to inspect scripts downloaded from the internet before running them.

Advertisement
Advertisement

Once you have cargo, you can use it to install dotstate like so.

Installing Rust and dotstate.

Setting up the Github repo

Giving Dotstate access to Github

Let's launch dotstate once it's installed. This is what a freshly installed dotstate dashboard looks like. The first thing to do is set up the GitHub repo. You don't need to know how to use Git for this work. All you need to do is create a GitHub authentication token and paste it into dotstate. Dotstate will automatically create the repo.

Freshly installed Dotstate.

Start by signing into your GitHub account (create a new account if you don't have one already) and then click your profile icon. Navigate to "Settings > Developer Settings." Scroll down all the way, if you don't see the developer settings. We'll generate a new access token.

Go to Personal Access Tokenstab and select Fine-grained Personal Access Token.Click Generate a new token.Give it a name. Select No expiration date.Under permissions, click Add permissionsand check the Contentsbutton. Give it "Read/Write" permissions. Save the token and copy it (you won't be able to see this token again after you close the tab, so make sure you've copied it somewhere safe.)

Generating a new token for dotstate.

Open dotstate by enteringdotstatein the terminal. Jump to Set up git repository.Paste in the access token you copied earlier and hit Enter. Dotstate will automatically find the dot files on your system and create a private repo for your dot files.

Advertisement
Advertisement

If you want to share your repo with the public, you can select the Publiccheckmark under Visibility, when creating the new repo. By default, the repo will be private. Also, if you already have a Github repo with your dot files, you can use that instead too.

You'll also be asked to select a profile. It'll create a "Personal" profile by default, but you can create more if you need to. The point of profiles is to manage different dot files across different machines. For example, the dot files on your work computer might be different from the dot files on your home computer. For the work computer, you can create a "work" profile and if you ever need to set up a new machine for work, you can use the "work" profile to rebuild your setup on it.

Syncing your dot files with dotstate

It works with a single click

Setting up the repo will unlock the rest of the options. At this point, we can now push the dot files to the new repo. Go to the Manage Filestab, where you'll see that Dotstate has already scanned your system and found most of your dot files.

You can choose which ones you want to push and sync using Dotstate. To do so, scroll through the list with arrow keys and use the space bar or Enter key to mark the dot files for syncing.

Adding a GitHub token and setting up the GitHub repo managed by Dotstate.

Now go back to the dashboard (press Esc) and select Sync with Remote. Review the changes and hit Enter to commit and sync. It should automatically push the updated files to the Dotstate repo.

Rebuilding your setup on a new machine

If you're setting up a new computer or performing a fresh installation of the OS, you can conveniently rebuild your setup in three simple steps.

Advertisement
Advertisement
  1. First, install Dotstate on the second computer.

  2. Paste in your GitHub access token and set up the GitHub repo.

  3. Finally, click Sync with Remoteand hit Enter to pull and apply all your configurations. Alternatively, you can run the command

Using dotstate sync to rebuild my config files on a new system.

The dotstate menu has another neat feature called Manage Packages,where you can add a list of packages and install them in one batch on new devices. Pretty handy.


Dotstate takes the hassle out of managing dot files

Nobody wants to lose their custom config files, and (probably) nobody wants to manually back them up or rebuild them on a new machine. Dotstate simplifies all those things in a set-and-forget way that just works.

Advertisement
Advertisement
Mobilize your Website
View Site in Mobile | Classic
Share by: