@credenceanalytics/cashtreacli
v1.0.0
Published
CashTrea deployment configuration and field-support CLI
Downloads
38
Maintainers
Keywords
Readme
cashtreacli
Deployment configuration and field-support CLI for the CashTrea / IDEAL stack.
Run it on the server, after the product has been installed. It asks once for a set of details — Oracle, RabbitMQ, ports — and writes them into every service's own config file, in that service's own format and key names.
For implementation and support engineers, not end users.
Installation
Prerequisites
cashtreacli installation needs:
- Node.js >= 18.0.0 (Download Link) installed.
- Oracle Instant Client, 64-bit (Download Link) installed and on
PATH, or setORACLE_CLIENT_LIB_DIRto its directory.
Oracle Instant Client is required, not optional. Without it every database connection fails with
DPI-1047before it reaches the server.
Online Mode
cashtreacliis available in npm. To install it, type:$ npm i -g @credenceanalytics/cashtreacliTest installation by typing following command:
$ cashtreacli --help
Offline Mode
For servers with no access to the npm registry.
Extract cashtreacli.zip. Place the extracted
cashtreaclifolder somewhere safe on your disk.Run
npm link --forceinside thecashtreaclifolder. (This will start the installation process)Test installation by typing following command:
$ cashtreacli --help
The bundle carries its own dependencies, so nothing is downloaded. It works on Linux, Windows and macOS (x64) from the same zip. Oracle Instant Client is still required separately — it is not part of this bundle.
Commands
Commands accept optional parameters. If no options are provided, the command prompts interactively for the information it needs.
Start with config:init. Every other command reads the service paths it
records. After any change, run doctor to confirm what landed.
cashtreacli config:init
Detect the installed CashTrea services, confirm where each one lives, and store the paths. Run this first, and again whenever a service moves.
USAGE
$ Basic Command
cashtreacli config:init
$ With Options
cashtreacli config:init --root <INSTALL_ROOT> --relocate --replace --set <SERVICE>=<DIR>cashtreacli config:database
Set the Oracle connection details across every installed service. The connection is verified before anything is written. For any errors reinitialize using cashtreacli config:init command.
USAGE
$ Basic Command
cashtreacli config:database
$ With Options
cashtreacli config:database --user <DB_USER_NAME> --password <DB_PASSWORD> --host <DB_HOST> --port <DB_PORT> --sid <DB_SERVICE_ID> --skip-checkcashtreacli config:mq
Set the RabbitMQ connection details across every installed service.
USAGE
$ Basic Command
cashtreacli config:mq
$ With Options
cashtreacli config:mq --user <MQ_USER_NAME> --password <MQ_PASSWORD> --host <MQ_HOST> --port <MQ_PORT> --exchange <EXCHANGE> --queue <QUEUE>cashtreacli config:port
Show or change service ports, keeping the matching nginx upstreams in step.
USAGE
$ Show current ports
cashtreacli config:port --show
$ Change a port
cashtreacli config:port --set <SERVICE>=<PORT>cashtreacli doctor
Read-only health check. Reports configuration drift between services, broken wiring, and nginx upstreams with nothing behind them. Changes nothing.
USAGE
$ Basic Command
cashtreacli doctor--db additionally opens a connection with each service's configured
credentials.
cashtreacli info:system
Show host information — CPU, memory, disk and OS.
USAGE
$ Basic Command
cashtreacli info:system
$ With Options
cashtreacli info:system --json --verbosecashtreacli help [COMMAND]
Display help for cashtreacli.
USAGE
$ cashtreacli help [COMMAND]Before You Run It
This tool rewrites live configuration. Two things to know:
- There is no preview.
config:*commands write as soon as they have their answers. Runcashtreacli doctorfirst to see what is there, and again afterwards to see what landed. - Commands exit 0 even on failure, and print a single line. Read the output;
do not rely on the exit code in a script.
doctoris the exception — it exits non-zero when a check fails.
The CLI never restarts anything. Bounce pm2, WildFly or nginx -s reload
yourself once a change is written.
Troubleshooting Tips
| Symptom | What to do |
|---|---|
| DPI-1047: Cannot locate a 64-bit Oracle Client library | Install Oracle Instant Client and put it on PATH, or set ORACLE_CLIENT_LIB_DIR. |
| A service is missing, or its path is wrong | Reinitialize using cashtreacli config:init. |
| cannot reach <host>:<port> | The database address is not routable from this machine — a private (10.x) address cannot be reached from outside its network. |
License
MIT — see LICENSE.
