Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mitinarseny/dots
Delivery tool for dotfiles written in Go.
https://github.com/mitinarseny/dots
command-line configuration dotfiles
Last synced: 3 months ago
JSON representation
Delivery tool for dotfiles written in Go.
- Host: GitHub
- URL: https://github.com/mitinarseny/dots
- Owner: mitinarseny
- License: mit
- Created: 2019-06-03T23:08:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T13:53:33.000Z (over 1 year ago)
- Last Synced: 2024-10-04T21:15:39.484Z (4 months ago)
- Topics: command-line, configuration, dotfiles
- Language: Go
- Homepage:
- Size: 39.6 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
dots
Delivery tool for your
.dotfiles
[![dots demo](assets/demo.gif)](https://github.com/mitinarseny/dotfiles/blob/master/.dots.yaml)
---
## Table of Contents:
* [Installation](#install)
* [Usage](#usage)
* [Config file](#config-file)## Install
To install with [`brew`](https://brew.sh) run this in your terminal:
```bash
brew install mitinarseny/tap/dots
```## Usage
To set variables, create symlinks and execute commands listed in [config](#config-file) file run this:
```bash
dots up
```#### Custom config file
By default [config](#config-file) file is `.dots.yaml` in current working directory.
If you want to specify other location, pass it to `-c` flag:
```bash
dots up -c custom/config.yaml
```
#### Specify hostname
You are free to choose what host to up:
```bash
dots up hostname
```
The default hostname is `default`.## Config file
Config is a YAML file (defaults to `.dots.yaml` in current working directory).
An example config can be found in my [dotfiles](https://github.com/mitinarseny/dotfiles/blob/master/.dots.yaml).
On top-level config consists of hosts:
```yaml
host1:
variables:
# ...
links:
# ...
commands:
# ...
host2:
extends:
- host1
# ...
```
If not specifying the hostname when running `dots up`, the default will be `default`.### `variables`
This section consists of list of stages, while each stage consists of environment variables.
```yaml
variables:
- name1: value1
name2: value2
- name3: $name1/$name2
- name4:
command: echo value4
description: this is equal to exporting name4=$(echo value4)
- name5:
command: echo "description can be omitted"
# ...
```### `links`
This section is a mapping of target paths to destination paths. Targets must be absolute.
```yaml
links:
~/abs/target: rel/dest
~/another/abs/tagret:
path: another/rel/dest
force: true # enforce to recreate link if already exists
# link directory
~/dir1: dir1
# create in ~/dir2/ the same structure as in .dir/ and link all .sh files
~/dir2/: .dir/**.sh
~/dir3/:
path: .dir/with/dirs/**
dirs: true # enforce to link directories and do not traverse files in them
# ...
```
For more detailes on wildcards take a look an [standard wildcards](http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).### `commands`
This section is a list of commands to execute. Each command may have a `description`.
```yaml
commands:
- echo command1- description: simple description
command: echo command2
- description: this is a parent command
command: echo "parent"
commands:
- description: this is a subcommand
command: echo "child1"
commands:
- description: this is a subsubcommand
command: echo "child2"
# ...
```