aboutsummaryrefslogblamecommitdiffstats
path: root/ck.1
blob: b42aef45e52771b3257a904960224eb0d3fd93d4 (plain) (tree)
















































































































































                                                                                                               
.TH ck 1 "2018-10-27" Linux "ck - the config keeper"
.SH NAME
ck \- manage configuration across the system
.SH SYNOPSIS
.B ck
.RB [ \-v | \-\-verbose ]
.RB [ \-c | \-\-config
.IR DIR ]
.IR action \ [.\|.\|.]
.br
.B ck
.RB [ version | \-\-version ]
.br
.B ck init
.I VERSION_CONTROL_DIR SECRET_DIR
.br
.B ck add
.I PROGRAM_NAME CONFIG_PATH
.RB [ \-p ]
.RB [ \-s ]
.br
.B ck delete
.IR PROGRAM_NAME | \fR{\fB\-c \ \fICONFIG_PATH\fR}
.br
.B ck list
.BR tree \ [ \-a ]
.br
.B ck list
.RB { -p \ \fIPROGRAM_NAME\fR}\fR| programs | paths \ [ \-t
.RB { plain | python | lisp } \fR]
.RB [ \-a ]
.br
.B ck list ckconf
.br
.B ck edit
.IR PROGRAM_NAME \ [ CONFIG_BASENAME ]
.br
.B ck search
.I SEARCH_TERM
.br
.B ck restore
.IR PROGRAM_NAME | \fBall
.br
.B ck help
.I action
.SH DESCRIPTION
.B ck
manages configuration files in a Linux system. To that end it provides an
.B action
based command line interface.
.P
.B ck
needs a database and an rc file to run. It also needs two
directories (stored in the rc file), the
.I VERSION_CONRTOL_DIR
and the
.IR SECRET_DIR .
This is where the configurations will end up after they are added to
.BR ck .
The
.B init
action takes care of them. For more details see the
.BR ACTIONS \ and \ FILES
sections below.
.P
In
.B ck
terms a
.I program
is an entity that has one or more
.I configs
attached to it. Each
.I program
can have exactly one
.BI primary \ config \fR.
Upon adding a
.I config
to
.BR ck ,
it is moved to the appropriate directory, and the symbolically linked
back to it's original place (\fIln -s\fR).
.P
In a later time you can sync the
.I VERSION_CONRTOL_DIR
and
.IR SECRET_DIR .
You can also
.B restore
the links given these two directories and the correspondig rc file and database.
.SH OPTIONS
Change
.B ck
behaviour using the following options. They must be present before any
.B action.
.TP
.B \-\-verbose\fR, \fB\-v
[WIP]
.br
Currently prints the log. Must be the first argument in order to work.
.TP
.B \-\-config \fIDIR\fR, \fB\-c \fIDIR
Use
.BR ckdb \ and \ ckrc
residing in
.I DIR
instead of the default
.IR ~/.ck/ .
.TP
.B \-\-version\fR, \fBversion
Print version and licence information, and quit.
.SH ACTIONS
Pass the action after any
.BR OPTIONS .

.SH EXIT STATUS
.B ck
shall return 0 if the action was completed without an error, -1 otherwise
.SH FILES
By default
.B ck
will store it's files in
.IR ~/.ck/ .
Using the
.BR \-c | --config
one can change this.
.SS "ck generated files"
.TP
.I ~/.ck/ckrc
Store the configuration values (\fIVERSION_CONTROL_DIR\fR and \fISECRET_DIR\fR).
.TP
.I ~/.ck/ckdb
SQLite3 database.
.SS "User files"
.TP
.I VERSION_CONTROL_DIR
This is where the configuration files will end up by default. It's value is set with the
.B init
action, but can be changed by editing
.IR ckrc .
.TP
.I SECRET_DIR
This is where the configuration files will end up when adding them with the -s flag. It's value is set with the
.B init
action, but can be changed by editing
.IR ckrc .