rachuba init
rachuba init [--config PATH] [--ledger PATH] [--json]
Creates the data directory when it is
missing, readable by its owner alone, and writes into it the configuration
file, with every field present, each with its meaning and an invented example
value, and an empty ledger, each readable and writable by its owner alone.
--config and --ledger write either file elsewhere
instead, creating its missing directory readable by its owner alone. The EIN
and SSN-last-four values are invalid placeholders. Replace
them with the assigned EIN and actual last four digits, edit the remaining
values, then run rachuba explain to check the
withholding. Commands that load the configuration refuse the placeholders.
init reads no tables.
rachuba location prints where the files are.
Output
Wrote <data directory>/rachuba.toml and <data directory>/ledger.toml.
Edit every value in the configuration, then run `rachuba explain` to check the withholding.
With --json: {"config": "<path>", "ledger": "<path>"}.
Refusals
Exit 1, nothing written, when either file is already there:
<path> already exists. Delete it first if you mean to start over.
Exit 1, nothing written, when a default file would be written to the data directory while the current directory holds a file of that name, from a version that read the current directory:
<path> does not exist, but the current directory holds <name>, which rachuba reads only when --config or --ledger names it. Move rachuba.toml and ledger.toml into <data directory>, or name them with --config and --ledger.
Exit 1 when a directory or a file cannot be created, with the reason the system gave after the sentence; a ledger that cannot be written takes the configuration it just wrote back out:
cannot create the directory <path>. Make its parent writable by you, or set RACHUBA_HOME to a directory you can write, or name both files with --config and --ledger.
cannot create <path>. Make its directory writable by you, or name another file with --config or --ledger.
A file written only in part is removed again; when that removal fails too,
the sentence goes on: The partial file could not be removed (<reason>);
delete it before running init again.
When the configuration cannot be taken
back out after the ledger failed, the refusal ends: the configuration
<path> written before it could not be taken back out, so delete it before
running init again
.
The data directory's own refusals are on configuration.