WRIGHT(1) Manual Page

NAME

wright - lightweight config management utility

SYNOPSIS

wright [OPTIONS] FILE [ARGUMENT…​]

wright [OPTIONS] -eCOMMAND [ARGUMENT…​]

DESCRIPTION

wright is a lightweight configuration management utility. It can be
used to perform common sysadmin tasks such as installing packages,
creating files, setting up groups and users and so on by running short
Ruby scripts.

Although wright is typically used to run script files, it can also
execute short code snippets passed on the command line. Another way to
run wright scripts is to make your script executable and use wright as
the interpreter by setting an appropriate "#!" line.

OPTIONS

-eCOMMAND

Run COMMAND as a wright script. When multiple commands are
passed, they are joined and run in sequence.

-rLIBRARY

Require LIBRARY before running the wright script. When multiple
libraries are passed, they are loaded in sequence.

-n, --dry-run

Enable dry-run mode. In dry-run mode, wright resources do not
modify the system, but you still have to make sure your own code
does not cause any unwanted changes.

-v, --verbose

Print debugging information.

-q, --quiet

Suppress non-error output.

--version

Print wright version.

EXAMPLES

Install tmux via the system package manager:

wright -e 'package "tmux"'

Create a system user named "foobard":

wright -e 'user "foobard", system: true'

Create a system group named "foobard":

wright -e 'group "foobard", system: true'

Create a file named /etc/issue containing the current wright
version:

wright -e 'file "/etc/issue", content: Wright::VERSION'

Create a directory named /tmp/foo/bar/baz:

wright -e 'directory "/tmp/foo/bar/baz"'

Create a symlink from .bash_profile to .profile in the current
user’s home directory:

wright -e 'symlink "~/.bash_profile", to: "~/.profile"'

To install tmux and update its config file from a wright script,
create the following file: