Automation

Turn a proven operator sequence into a repeatable command.

FedCLI supports interactive work first, then one-shot commands and scripts when the operator understands the query, target, permissions, and expected output.

Run one command and exit

fedcli -c "HELP"
docker run --rm docker.io/ronwarshawsky/fedcli:latest -c "HELP"

Use one-shot mode for bounded commands with explicit input, output, and exit behavior. Do not turn an exploratory statement into a scheduled job until its result size and failure mode are known.

Execute a checked-in SQL script

fedcli @ops-check.sql
docker run --rm \
  -v "$PWD/ops-check.sql:/work/ops-check.sql:ro" \
  docker.io/ronwarshawsky/fedcli:latest \
  @/work/ops-check.sql

Keep scripts in version control and mount them read-only in containers. Supply connection material through the environment or your approved runtime mechanism, never by committing it into the script.

Export deliberate result sets

EXPORT CSV 'employees.csv' AS SELECT ID, NAME FROM APP.EMPLOYEES;
EXPORT JSON 'customers.json' AS SELECT ID, NAME FROM APP.CUSTOMERS;

Bound exports with the smallest useful projection and filter. Review destination storage, retention, and access controls before automating an extract.

Automation checklist

  1. Prove the command interactively against the intended target.
  2. Give the job only the privileges it needs.
  3. Set an operational timeout and capture actionable stderr/output.
  4. Store script and deployment configuration separately from credentials.
  5. Record owner, schedule, input scope, and recovery action.