DADI Toolbelt
Command-line tools for DADI products
Install globally
npm install @dadi/toolbelt -g
Check version details
dadi-toolbelt -V
Get usage info
dadi-toolbelt --help
Available commands
DADI API
api:history:export
Deletes (and optionally exports) history records in API collections.
Ensure you provide required options:
-
collection
: the collection to export or delete from -
timestamp
: process records older than this timestamp -
env
: environment to run in. Should be one of: development, test, qa, production -
output path
: path to export data to. Defaults to the current directory
dadi-toolbelt api:history:export -c films -t 1464748915404 -e development -o data_20160531
Tip: use
api:history:delete
instead to skip the export.
DADI Web
web:routes:update
Updates routes within page specification files to assist in the migration to DADI Web 1.7.0.
dadi-toolbelt web:routes:update path/to/pages
Usage: dadi-toolbelt <cmd> [options]
Use <cmd> to specify the application to interact with, the module within the application and any additional options
Options:
-h, --help output usage information
-V, --version output the version number
-c, --collection <collection> the collection to export or delete from (when using the api:history command)
-t, --timestamp <timestamp> process records older than the specified timestamp (when using the api:history command)
-e, --env <env> environment to run in (when using the api:history command). Should be one of: development, test, qa, production
-o, --out <outputPath> path to export data to (when using the api:history command). Defaults to current directory
Available commands:
$ dadi-toolbelt api:history:export
$ dadi-toolbelt api:history:delete
$ dadi-toolbelt web:routes:update
Examples:
DADI API
--------
Export and delete history records older than a specified time:
$ dadi-toolbelt api:history:export -c films -t 1464748915404 -e development -o data_20160531
Delete (without export) history records older than a specified time:
$ dadi-toolbelt api:history:delete -c films -t 1464748915404 -e development -o data_20160531
DADI Web
--------
Update page specification files for migrating to DAD Web 1.7.0:
$ dadi-toolbelt web:routes:update path/to/pages