<commit_before>.TH hc 1 "2015-11-08" "version 0.1.0" "Hieracles command manual"

.SH NAME
hc \- Command tool for Hieracles
.SH SYNOPSIS
.B hc 
.I fqdn
.I action
.B [
.I options
.B ]

.SH DESCRIPTION
.PP
Hieracles is a command-line tool for analysis and deep examination
of [Hiera][hiera] paramaters in a [Puppet][puppet] setup. It's used
internally at Gandi and its first incarnation is strongly
tied to Gandi puppet architecture. But Hieracles tends to become, in
time, a generic Hiera overlay visualisation tool.
.PP
hc command takes at minimum 2 arguments:
.RS 4
.IP fqdn 10
the fqdn under which the node is known in the ENC dir
.IP action 
the action needs to be one of the following
.RS
.IP info 10
provides the farm, datacenter, country associated to the given fqdn.
.IP files
list all files containing params affecting this fqdn 
(in more than commons).
.IP paths
list all file paths for files with params.
.IP modules
list modules included in the farm where the node is.
.IP params
list params for the node matching the fqdn.
An extra filter string can be added to limit the list
use ruby regexp without the enclosing slashes
.RS
eg. hc <fqdn> params postfix.*version
.RE
.RS
eg. hc <fqdn> params '^postfix'
.RE
.RS
eg. hc <fqdn> params 'version$'
.RE
.IP all
same as params but including the common.yaml params (huge)
Also accepts a search string
.RE
.RE

.SH OPTIONS
.IT Fl f Ar fornat
.IT Fl -format Ar fornat
outputs in the selected format. Available formats are
.Bl -hang -offset indent
.It Sy plain
Plain text format with no color.
.It Sy console
Ansi text optionaly with colors (if specified in the conf).

.SH FILES
.I ~/.config/hieracles/config.yaml
.RS
Where sits the main hieracles configuration

.SH EXAMPLES

.SH SEE ALSO
hiera(1), puppet(8)

.SH BUGS
Pleae report any bug to https://github.com/Gandi/hieracles/issues

.SH AUTHORS
Hieracles is written by mose at gandi.net
https://gandi.net
https://github.com/Gandi/hieracles<commit_msg>complete man page<commit_after>.TH hc 1 "2015-11-08" "version 0.1.0" "Hieracles command manual"

.SH NAME
hc \- Command tool for Hieracles
.SH SYNOPSIS
.B hc 
.I fqdn
.I action
.B [
.I options
.B ]

.SH DESCRIPTION
.PP
Hieracles is a command-line tool for analysis and deep examination
of [Hiera][hiera] paramaters in a [Puppet][puppet] setup. It's used
internally at Gandi and its first incarnation is strongly
tied to Gandi puppet architecture. But Hieracles tends to become, in
time, a generic Hiera overlay visualisation tool.
.PP
hc command takes at minimum 2 arguments:
.RS 4
.IP fqdn 10
the fqdn under which the node is known in the ENC dir
.IP action 
the action needs to be one of the following
.RS
.IP info 10
provides the farm, datacenter, country associated to the given fqdn.
.IP files
list all files containing params affecting this fqdn 
(in more than commons).
.IP paths
list all file paths for files with params.
.IP modules
list modules included in the farm where the node is.
.IP params
list params for the node matching the fqdn.
An extra filter string can be added to limit the list
use ruby regexp without the enclosing slashes
.RS
eg. hc <fqdn> params postfix.*version
.RE
.RS
eg. hc <fqdn> params '^postfix'
.RE
.RS
eg. hc <fqdn> params 'version$'
.RE
.IP all
same as params but including the common.yaml params (huge)
Also accepts a search string
.RE
.RE

.SH OPTIONS
.TP
.PD 0
.B \-f \fRformat
.TP
.PD
.B \-\-format \fRformat
outputs in the selected format. Available formats are
csv, console, plain, yaml and rawyaml
.IP
Note that the difference betrween yaml and rawyaml 
is that rawyaml don't include comments with the 
provenance of each params.
.RE

.TP
.PD 0
.B \-p \fRextraparam=what;anotherparam=this
.TP
.PD
.B \-\-params \fRextraparam=what;anotherparam=this
makes possible to add additional params. 
Those params will be merged with the ones provided in the hierafile.

.TP
.PD 0
.B \-c \fRfile
.TP
.PD
.B \-\-config \fRfile
specify an alternative config file instead of 
~/.config/hieracles/config.yaml

.TP
.PD 0
.B \-h \fRfile
.TP
.PD
.B \-\-hierafile \fRfile
specify an alternative hierafile instead of the one 
stated in the configfile.

.TP
.PD 0
.B \-b \fRpath
.TP
.PD
.B \-\-basepath \fRpath
the basepath is prepended to the paths found in the configfile and the hierafile. Default is ./ but you can change thise using the -b option.

.TP
.PD 0
.B \-e \fRpath
.TP
.PD
.B \-\-encdir \fRpath
encdir is where we can find the ENC definitions. It's stated in the configfile but can be overriden by the -e option.


.SH FILES
.I ~/.config/hieracles/config.yaml
.RS
Where sits the main hieracles configuration

.SH EXAMPLES
A typical config file would look like:
.PP
.RS
---
.RE
.RS
colors: true
.RE
.RS
classpath: farm_modules/%s/manifests/init.pp
.RE
.RS
hierafile: dev/hiera-local.yaml
.RE
.RS
encpath: enc
.RE

.SH SEE ALSO
hiera(1), puppet(8)

.SH BUGS
Please report any bug to https://github.com/Gandi/hieracles/issues

.SH AUTHORS
Copyright (c) 2015 gandi.net https://gandi.net
.LP
Hieracles is written by <EMAIL>
.LP
https://github.com/Gandi/hieracles
{'fraction_non_alphanumeric': 0.08310249307479224, 'fraction_numerical': 0.009893153937475268, 'mean_word_length': 3.4537444933920707, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3443403', 'n_tokens_mistral': 1822, 'n_tokens_neox': 1723, 'n_words': 800}