Giter Club home page Giter Club logo

dotrunner's Introduction

dotrunner

Use dotrunner and dotlinker to build a fantastically aesthetic macOS dotfiles set up.

✅ Organize by topics (folder modules), i.e. 'nodejs', 'osx', and 'python'.
✅ DAG (Directed Acyclic Graph) based runner for a powerful dependency system.
✅ No shell scripts, gunk, yuck, and hairballs required

Here's an example dotfiles repo:

~/.dotfiles
    asdf/
    brew/
      install.yml
      Brewfile
    python/
    osx/
    nodejs/
      .npmrc.symlink
      install.yml
    fonts/

And here's an example install.yml taken from the nodejs module:

script: npm i -g yarn
deps:
- asdf

Quick Start

Note: check out the example if you'd like to test this all out on a Docker container instance.

Install:

$ pip install dotrunner dotlinker

Dry run:

$ dotrunner ~/.dotfiles --dry-run

And finally, apply (this will obviously change your system!):

$ dotrunner ~/.dotfiles

Building a Dotfiles System with dotrunner

This layout describes a system that installs apps (with homebrew), development tools (with asdf), nodejs tools (with install.sh) and some system defaults (with set-defaults.sh):

asdf/         <----- a 'module'
  install.yml <----- a module install file. required.
  Asdffile
brew/
  install.yml
  Brewfile
nodejs/
  .npmrc.symlink   <--- this is handled by dotlinker, see
                        https://github.com/jondot/dotlinker
  install.yml
  install.sh
osx/
  install.yml
  set-defaults.sh

This system follows a few simple principles:

  • Every directory is a module if it has an install.yml file and it doesn't start with a dash (-).
  • Each module can describe deps (dependencies) and a script to run.
  • Each module actions must be idempotent: running the same script multiple times will have the same result. In other words dotrunner will happily run your scripts again on reruns/failures and you're responsible to do validation/checks in your scripts.

Here are a few examples of an install.yml file:

No dependencies:

script: sh ./install.sh

Has depdendencies but no script, it will use ./install script by default.

deps:
- brew
- osx

Has both dependencies and a script which points to an executable script:

script: ./install.sh
deps:
- brew
- osx

Contributing

Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).

Thanks:

To all Contributors - you make this happen, thanks!

Copyright

Copyright (c) 2018 Dotan Nahum @jondot. See LICENSE for further details.

dotrunner's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

look4regev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.