Skip to content
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.
/ umai Public archive

succeeded by hori-hori

Notifications You must be signed in to change notification settings

tsbohc/umai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

umai

A .files management tool and a templating engine with a twist: there's no configuration file.

umai takes a template, renders it to a separate folder, and symlinks the result to the target location specified within the template itself.

umai is meant to be scripted and extended.

features

  • written in fennel, a lisp that compiles to lua
  • binary is a standalone lua script
  • nearly 0-config

usage

umai - .files management and templating

usage:
  umai [--varsets <path>] [-key val ...] - <template> ...

examples

# bashrc
umai!() {
  umai --varsets "~/.garden/etc/umai.d/" "$@" - \
       "$(find ~/.garden/etc -type f -name "*.umai")"
}
# ~/.garden/test.d/testrc.umai
{% softlink "~/.config/testrc.yml" %}
cyan: "#{% {{colo}.cyan} %}"
# ~/.garden/etc/umai.d/limestone
cyan: 87c0b0

After running umai! -colo limestone:

# ~/.config/testrc.yml
cyan: "#87c0b0"

scripting

Use umai interactively with fzf:

umai-fzf() {
  umai --varsets "~/.garden/etc/umai.d" "$@" - \
      "$(find ~/.garden/etc -type f -name '*.umai' | fzf)"
}

thanks

About

succeeded by hori-hori

Resources

Stars

Watchers

Forks