rachuba location
rachuba location [--config PATH] [--ledger PATH] [--json]
Prints where every other command reads and writes: the data directory and what chose it, the configuration file and the ledger with whether each is there, and the tables folder and what chose it. It reads no file and records nothing, so it answers before rachuba init has run.
Output
data directory: /Users/you/Library/Application Support/Rachuba (the platform default)
configuration: /Users/you/Library/Application Support/Rachuba/rachuba.toml (missing)
ledger: /Users/you/Library/Application Support/Rachuba/ledger.toml (missing)
tables: rachuba:embedded/tables (built into this rachuba from its source checkout)
The data directory is chosen by RACHUBA_HOME or by the platform
default; the tables folder by RACHUBA_TABLES, by the
tables folder beside the configuration file, or, when neither
is there, it is the tables built into this rachuba, named
rachuba:embedded/tables. When RACHUBA_TABLES names
no directory, the tables line carries the refusal every command that reads
tables would give, and location still exits 0.
With --json: data_directory and
tables, each {"path", "chosen_by"} with
chosen_by one of RACHUBA_HOME,
platform default, RACHUBA_TABLES,
beside the configuration or built in;
tables is {"refused": "<sentence>"} when
RACHUBA_TABLES names no directory; and config and
ledger, each
{"path", "exists"}.
Refusals
Exit 1 when the data directory cannot be named:
no data directory for rachuba: RACHUBA_HOME is not set and neither is HOME. Set RACHUBA_HOME to the directory that holds rachuba.toml and ledger.toml, or name both files with --config and --ledger.
RACHUBA_HOME is set but empty. Set it to the directory that holds rachuba.toml and ledger.toml, or unset it to use the platform default.
It does not refuse a missing file, and it does not refuse when the current
directory holds a rachuba.toml or ledger.toml the
other commands no longer read by default: it is the command that shows where
the files are.