• Stars
    star
    237
  • Rank 169,885 (Top 4 %)
  • Language
    Python
  • Created almost 11 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Shell agnostic git based dotfiles package manager, written in Python.

Dotfiler — the ultimate solution for managing dotfiles!

changelog

This was inspired by Zach Holman's dotfiles and homesick, but was made according the KISS priciple.

There are very few commands in dotfiler, only: update, add and status:

  • update will pull from all version controlled envs (env is a subdirectory inside the ~/.dotfiles dir, where different configs and scripts could be placed). After that, update will make all that mumbo-jumbo, symlinking, and removing old broken symlinks. If you want to see what will it do without but afraid to loose some files, just fire dot update --dry --verbose.
  • add allows you to clone one or more repositories with configs. For example, this will clone my emacs's configs: dot add svetlyak40wt/dot-emacs. Of course you could use a full url, like this: https://github.com/svetlyak40wt/dot-emacs or <[email protected]:svetlyak40wt/dot-emacs.git>.
  • status will show you if there are any uncommited changes in the envs and warn you if some of them aren't version controlled.

Installation

  1. Clone this project somewhere like $HOME/.dotfiles and add $HOME/.dotfiles/bin into your PATH.
  2. Clone some config files into the $HOME/.dotfiles.
  3. Run dot update to make all necessary symlinks.
  4. Have a profit!

Overview

From user's point of view — very simply. You just create a separate subdirectory called "environments", put configs there and then run dot update. Dotfiler will make all necessary symlinks automagickally. What makes dotfiler better, than other solutions? It's ability to merge files from different environments into one target dir. Here's an example:

Suppose, you have a ~/.zshrc which sources all configs from ~/.zsh/. And you want to separate default configs from the configs only needed on work machines. In most config managers you will end up with two separate repositories, each sharing part of zsh config. But dotfiler allows you to do a much more clever thing — separate zsh (actually any other configs too, if they understand include) into the different environments.

In this example:

  • The first environment, let's call it base, will contain the file base/.zsh/generic.
  • The second environment, called atwork, will have atwork/.zsh/secret-settings.

Both of them, of course, could include other files, not only zsh configs. Most importantly, these environment now can be stored separately and installed on each machine separately. Now, you can share you default configs on the GitHub, but keep work configs in a separate, private repository.

You can also add new environments using dot add <url> <url>.... (Probably the process of adding environments on a fresh machine will be even more improved, when I introduce a 'meta-environments', which will allow you to make one env depend on other envs and pull them automatically when adding)

Get involved

Don't hesitate to try dotfiler. Just install it and make your configs more structured. Extract useful ones and share them on GitHub, as I did. Then send me a link with a short description (or make a pull request), and I'll add you repositories to the end of this page.

Dotfiler's core functionality is fully tested, but that doesn't mean there aren't bugs. If you find one, file the issue on Github, or even better, try to write a test and/or fix for that use case and send it as a pull request. To run all tests, install nose and run nosetests bin/lib/dot.

How it works

First dotfiler, walks through all files and all environments collecting dirs and files mentioned in more than one environment as a tree. If a file with same filename exits in more than one environment this is an error and dot will tell you they are conflicting.

Then, using this tree, it generates source—target pairs, where source is a file inside the environment dir and target is where it should be in your home dir.

Finally, dot generates actions for each pair. Actions could be rm, mkdir, link, already-linked and error. Action are generated based on the current file system's state and previously generated actions. Here is a simple example:

This is a structure of the ~/.dotfiles with two separate enviroments zsh and emacs:

.
├── emacs
│   └── .emacs.d
│       ├── .gitignore
│       ├── COPYING
│       ├── README.markdown
│       ├── art
│       │   ├── debian-changelog-mode.el
│       │   ├── lisp.el
│       │   ├── multiple.el
│       │   ├── my-org.el
│       │   ├── my-python.el
│       │   └── pymacs.el
│       ├── art.el
│       ├── changelog.md
│       ├── customizations.el
│       ├── init.el
│       ├── modules
│       │   ├── starter-kit-bindings.el
│       │   ├── starter-kit-eshell.el
│       │   ├── starter-kit-js.el
│       │   ├── starter-kit-lisp.el
│       │   ├── starter-kit-perl.el
│       │   └── starter-kit-ruby.el
│       ├── snippets
│       │   └── python-mode
│       │       └── pdb.yasnippet
│       ├── starter-kit-defuns.el
│       ├── starter-kit-misc.el
│       ├── starter-kit-pkg.el
│       ├── starter-kit.el
│       ├── tar.sh
│       ├── ubuntu -> art
│       ├── ubuntu.el -> art.el
│       ├── vagrant -> art
│       └── vagrant.el -> art.el
└── zsh
    ├── .bash_profile
    ├── .zsh
    │   ├── 00-options
    │   ├── 01-prompt-functions
    │   ├── 02-prompt-colors
    │   ├── 03-prompt
    │   ├── aliases
    │   ├── ash
    │   ├── dotfiler
    │   └── ssh-agent
    └── .zshrc

And here is result of dot update:

[art@art-osx:~/.dotfiles]% dot update
LINK    Symlink from /home/art/.bash_profile to /home/art/.dotfiles/zsh/.bash_profile was created
LINK    Symlink from /home/art/.emacs.d to /home/art/.dotfiles/emacs/.emacs.d was created
LINK    Symlink from /home/art/.zsh to /home/art/.dotfiles/zsh/.zsh was created
LINK    Symlink from /home/art/.zshrc to /home/art/.dotfiles/zsh/.zshrc was created

As you can see, dotfiler creates four symlinks, two to files, and two to directories. But this was simple situation with no overlapping subdirectories.

Here is another example, showing how config merging works:

.
├── git
│   ├── .gitconfig
│   └── .zsh
│       ├── git-aliases
│       └── git-prompt
└── zsh
    ├── .bash_profile
    ├── .zsh
    │   ├── 00-options
    │   ├── 01-prompt-functions
    │   ├── 02-prompt-colors
    │   ├── 03-prompt
    │   ├── aliases
    │   ├── ash
    │   ├── dotfiler
    │   └── ssh-agent
    └── .zshrc

In this case, we have two environments and both of them have configs for zsh. For this situation, dotfiler will try to create a directory ~/.zsh and will make symlinks there:

[art@art-osx:~/.dotfiles]% dot update
LINK    Symlink from /home/art/.bash_profile to /home/art/.dotfiles/zsh/.bash_profile was created
LINK    Symlink from /home/art/.gitconfig to /home/art/.dotfiles/git/.gitconfig was created
MKDIR   Directory /home/art/.zsh was created.
LINK    Symlink from /home/art/.zsh/00-options to /home/art/.dotfiles/zsh/.zsh/00-options was created
LINK    Symlink from /home/art/.zsh/01-prompt-functions to /home/art/.dotfiles/zsh/.zsh/01-prompt-functions was created
LINK    Symlink from /home/art/.zsh/02-prompt-colors to /home/art/.dotfiles/zsh/.zsh/02-prompt-colors was created
LINK    Symlink from /home/art/.zsh/03-prompt to /home/art/.dotfiles/zsh/.zsh/03-prompt was created
LINK    Symlink from /home/art/.zsh/aliases to /home/art/.dotfiles/zsh/.zsh/aliases was created
LINK    Symlink from /home/art/.zsh/ash to /home/art/.dotfiles/zsh/.zsh/ash was created
LINK    Symlink from /home/art/.zsh/dotfiler to /home/art/.dotfiles/zsh/.zsh/dotfiler was created
LINK    Symlink from /home/art/.zsh/git-aliases to /home/art/.dotfiles/git/.zsh/git-aliases was created
LINK    Symlink from /home/art/.zsh/git-prompt to /home/art/.dotfiles/git/.zsh/git-prompt was created
LINK    Symlink from /home/art/.zsh/ssh-agent to /home/art/.dotfiles/zsh/.zsh/ssh-agent was created
LINK    Symlink from /home/art/.zshrc to /home/art/.dotfiles/zsh/.zshrc was created

How to ignore some files

Edit a config file ~/.dotfiles/.dotignore and add any regex patterns you need.

Environments

Another solutions

  • skeswa/dotfiler – another utility with the same name but completely different approach.

More Repositories

1

django-tagging-ng

Django tagging with multilingual, synonyms and hierarchy!
Python
139
star
2

django-fields

Fields pack for django framework.
Python
126
star
3

mobile-balance

A command line utility and python library to retrive mobile balance of different mobile operators
Python
48
star
4

django-markdown2

Django template tag which uses python-markdown2 library.
Python
43
star
5

yafotkiuploader

Command line script, to upload photos to the http://fotki.yandex.ru service.
Python
42
star
6

python-processor

A command line replacement for zapier and ifttt.
Hy
38
star
7

django-globals

Thread specific global variables with middleware to hold a reference to the current user.
Python
37
star
8

scrapy-useragents

A middleware to use random user agent in Scrapy crawler.
Python
33
star
9

django-antichaos

This is a django application for visual editing your messy tag clouds. Working with django-tagging or django-tagging-ng.
JavaScript
32
star
10

thebot

General purpose chat bot, written in orthodox Python. Die Hubot, die! :)
Python
31
star
11

django-pingback

Pingback client/server implementation for Django framework (improved version).
Python
27
star
12

django-counter

Page view / redirects counter for Django framework.
Python
25
star
13

pymongo-bongo

A higher level abstraction layer and some syntax sugar for pymongo.
Python
23
star
14

django-ban

Simple middleware, to ban users by IP or to ban IP networks.
Python
22
star
15

gtdzen

Simple but flexible Getting Things Done application.
Python
21
star
16

python-cl-conditions

Implementation of the Common Lisp's conditions system in Python.
Python
18
star
17

django-faces

Django application for nonintrusive avatar support. It uses site's URL and user's email for autodiscovery.
Python
18
star
18

forkfeed

Utility to track all changes in all forks of your projects on GitHub.
Python
15
star
19

server-reloader

An easy to use server reloader
Python
15
star
20

django-apps

Django application which provides an information about other installed applications.
Python
14
star
21

django-vcs-watch

This is the app to turn your SVN, GIT or other VCS repositories in a Twitter-like social service.
Python
13
star
22

django-link-auth

Django's authentication backend to login by temporary URLs.
Python
12
star
23

django-dzenlog

Django Dzenlog is a set of models and templates, which can be used to create blogs with different kinds media.
Python
12
star
24

sbcl-lib

Example of using Common Lisp code from C (using SBCL).
C
11
star
25

twisted-lock

Fault-tolerant distributed lock with REST interface.
Python
11
star
26

svetlyak40wt.recipe.symlinks

A simple recipe for buildout, to collect symbolic links in one place.
Python
9
star
27

pagerator

A helper to build iterables when you need to fetch results already divided into the pages.
Python
9
star
28

graphite-node

A script for a painless Graphite setup.
Shell
8
star
29

python-repr

A shortcut to generate __repr__ methods for python clases.
Python
7
star
30

django-metafeed

A helper to merge few Rss or Atom feeds into the one. Works for Django.
Python
7
star
31

couchdb-performance-tests

CouchDB performance tests.
Python
7
star
32

django-basic-apps

My own django-basic-apps with blackjack and setuptools packaging!
7
star
33

osbench

Quick and dirty attempt to create a Homebrew-like package manager for Linux.
Python
6
star
34

django-autolinks

App for storing links and automatic link extraction from markdown texts.
Python
6
star
35

django-subs

This is the app to hold email subscriptions. Usually it is subscriptions for comments.
Python
6
star
36

django-dbtemplates

A Django template loader which loads templates from the database
Python
6
star
37

cl-static-resources

A small demo showing how it is easy to compile a static resource into a Common Lisp binary
Common Lisp
6
star
38

django-app-template

A template for basic django application with buildout and setuptools support.
Python
5
star
39

yafotki.lrplugin

Export plugin for Adobe Lightroom and Yandex Fotki (http://fotki.yandex.ru).
5
star
40

slowloris-test

A test of Woo and Hunchentoot Common Lisp webservers agains slowloris attack
Common Lisp
5
star
41

django-dzenlog-text

Text posts application for the Django Dzenlog, basic blogging application.
Python
4
star
42

pip

An unofficial mirror of https://svn.openplans.org/svn/pip/
Python
4
star
43

django-openid

My clone of Simon Willison's django-openid
Python
4
star
44

cookiecutter-cl-project

A boilerplate Common Lisp project's template.
Shell
4
star
45

phidippus

a common lisp web spider / web crawler
Common Lisp
4
star
46

full-feed-maker

Simple full feed maker for those sited, which has 'stripped' RSS/Atom feeds.
Python
4
star
47

cl-spath

A Common Lisp library for running search queries against s-expressions.
Common Lisp
4
star
48

ping-pong

Example of a Ping Pong game. Uses LispWorks and it's CAPI framework.
Common Lisp
4
star
49

namalizer

Normalizes method names according to PEP8.
Python
4
star
50

twiggy-goodies

These addons help to use Twiggy with third-party libraries, which use standart library's logging.
Python
4
star
51

gitorama.com

What Gitorama is? It is egocentric view on github!
Python
3
star
52

trivial-signal-example

This is a demo of TRIVIAL-SIGNAL Common Lisp library usage
Common Lisp
3
star
53

gpxcat

Script to concatenate GPX tracks from GPS navigator.
Python
3
star
54

dev.svetlyak

Content for http://dev.svetlyak.ru, developer's blog, powered by Pelican.
JavaScript
3
star
55

bempy

Attempt to adapt BEM methodology for using in python web frameworks such like Django.
Python
3
star
56

django-guts

Allows to browse source code of all "INSTALLED_APPS" in Django project.
Python
3
star
57

turbofilm

Downloader for Turbofilm.tv
JavaScript
3
star
58

yaru-bot

This is a Jabber bot for social service http://wow.ya.ru
Python
3
star
59

github-plus

Service with bells and whistles for the GitHub.
Python
3
star
60

django-dzenlog-link

This is a simple application to post links to the dzenlog.
Python
3
star
61

dot-tmux

A dotfiler config files for tmux.
Python
3
star
62

event-emitter-playground

An example of using event-emitter to make a simple chat application in Common Lisp.
Common Lisp
3
star
63

five-days-ago

Five Days Ago (for Python). Proof of the concept.
Python
2
star
64

thebot-draftin

A glue between your Pelican/Jekill powered blog and Draftin.com writing service.
Python
2
star
65

dot-zsh

A dotiler repository for zsh configuration.
Shell
2
star
66

qlot-without-roswell

A short instruction how to use Qlot from lisp REPL without Roswell
2
star
67

dot-helpers

A different command line helpers repository to be cloned with dotfiler.
2
star
68

open-sauced-goals

2
star
69

moscow-python-confpp-2021

Код и ноутбуки для моей презентации на Moscow Python Conf++ 2021
Jupyter Notebook
2
star
70

imap2rss

A program to read IMAP folder and to save it as local RSS feed.
Common Lisp
2
star
71

.vim

My vim config.
Vim Script
2
star
72

dot-osx

A dotfiler repository with my configs for OSX.
2
star
73

fabricant

A set of helpers to work with Fabric deployment.
Python
2
star
74

reshator

Помошник для принятия сложных решений.
Python
2
star
75

my-zsh-config

My own zsh configuration
2
star
76

sozigen

SVG based presentation tool to show monitoring graphs as a slideshow.
Python
2
star
77

arc-crawler

A crawler to search projects which use Arc language.
Arc
2
star
78

xslt-proxy

A proxy app which applies XSLT transformation on fly.
Python
2
star
79

colorize

Console stream colorizer: log-producer | colorize ERROR WARNING DEBUG
Python
2
star
80

dot-python-dev

Dotfiler configs to setup python development environment.
Python
2
star
81

thebot-instagram

A plugin for TheBot, to post new popular photos from the Instagram.
Python
2
star
82

array-performance

A simple benchmark to test list and arrays performance on Common Lisp
Common Lisp
2
star
83

minitage.recipe.scripts

Clone of the http://git.minitage.org/git/minitage/eggs/minitage.recipe.scripts
Python
2
star
84

things-periodical-tasks

An apple script to add a new item to the Things (a task manager from Cultured Code).
1
star
85

shark

Configs to use yandex-tank
Shell
1
star
86

stacktrack

Fresh Stack Overflow's answers tracker
Python
1
star
87

replwm

A hackable window manager implemented with Common LISP.
Common Lisp
1
star
88

help.github.com

GitHub help guides
JavaScript
1
star
89

yaru.user

Grease Monkey scripts for http://my.ya.ru blogging service.
JavaScript
1
star
90

bottle-template

Python
1
star
91

svetlyak40wt.github.com

1
star
92

thebot-webhooks

A configurable webhooks for TheBot.
Python
1
star
93

dot-arc-lisp

Arc Lisp IDE settings for Emacs.
Emacs Lisp
1
star
94

dot-git

A dotfiler environment with configs for git.
Python
1
star
95

dot-lisp

Dotfiler's config for Lisp development.
Emacs Lisp
1
star
96

towxr

Script for converting from different formats to wxr
Python
1
star
97

dot-emacs

A dotfiler repository with configs for Emacs.
Emacs Lisp
1
star
98

convert-srt

This script converts SRT subtitles from CP1251 to UTF-8
Python
1
star
99

test-spinneret

A small Common Lisp ASDF system to check if spinneret/cl-markdown loads propertly
Common Lisp
1
star
100

els2020

This example was used to demonstrate how to load a project to Ultralisp.org
Common Lisp
1
star