Skip to content

icepuma/keron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keron

Keron is a Lua-manifest dotfile tool with one main CLI command: apply.

CLI

Install:

cargo install --path crates/keron
keron --help

Main command:

keron apply <source> [flags]
  • No --execute: dry run (plan only)
  • With --execute: perform changes

Common flags:

  • --execute
  • --format text|json
  • --verbose
  • --color auto|always|never

Examples:

keron apply examples/simple
keron apply examples/simple --execute
keron apply https://github.com/org/repo.git/manifests

<source> can be a local manifest folder or a public Git source.

Manifest

Keron loads *.lua files recursively.

depends_on("../base.lua")

link("files/zshrc", "/home/me/.zshrc", {
  mkdirs = true,
})

template("files/gitconfig.tmpl", "/home/me/.gitconfig", {
  mkdirs = true,
  force = true,
  vars = {
    user = env("USER"),
    home = global.HOME,
  },
})

install_packages("brew", { "git", "ripgrep" }, {
  state = "present",
})

cmd("echo", { "setup complete" })

Manifest functions:

  • depends_on(path): manifest ordering dependency (relative path)
  • link(src, dest, opts): symlink resource (dest must be absolute)
  • template(src, dest, opts): render template to absolute destination
  • install_packages(manager, names, opts): ensure package state
  • cmd(program, args): run command during apply
  • env(name), secret(uri), global.HOME: value sources
  • is_macos(), is_linux(), is_windows(): OS guards

Examples

cargo run -- apply examples/simple
cargo run -- apply examples/template
cargo run -- apply examples/packages

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Contributors