k4ops2-cli v1.0.3
K4Ops 2 CLI
A CLI (command line interface) for bulk operations not availble yet in the K4Ops 2 dashboard.
Building
The cli uses a node packaging tool called pkg
. Install it globally:
npm i -g pkg
To package the cli, run:
npm i
npm run build
Usage
Manual Mode
To run a manual operation:
./k4ops2-cli
And follow the prompts
File Mode
To run a bulk operation from an Excel or CSV file, run:
./k4ops2-cli --file file.csv
./k4ops2-cli --file file.xlsx
Environments
To set an environment other than production:
./k4ops2-cli --env staging
./k4ops2-cli --env dev
Debug
Errors are outputted to the console when in debug mode:
./k4ops2-cli --debug
Creating Communities
To create a single community, run in manual mode and follow the prompts.
To bulk create, run in file mode. File must include a first row of headers, and include these columns:
- Operator
- Community
- Zipcode
- Logo
The logo column should contain the name of a png file in the same directory.
When a community is successfully created, the Community Id column will be written. Rows with values in these columns will be skipped.
Creating Systems
To create a single system, run in manual mode and follow the prompts.
To bulk create, run in file mode. File must include a first row of headers, and include these columns:
- Community Id
- System
- Template Id
When a system is successfully created, the System Id will be written. Rows with values in these columns will be skipped.
Creating Users
To create a single resident, run in manual mode and follow the prompts.
To bulk create, run in file mode. File must include a first row of headers, and include these columns:
- Community Id
- First Name
- Last Name
- Gender (must be 'Male' or 'Female')
- Room Number
- Care Setting (must be 'Standard', 'Independent', 'Assisted', 'Memory Care', or 'Skilled Nursing')
Other optional fields are:
- Room Phone (xxx-xxx-xxxx)
- Cell Phone (xxx-xxx-xxxx)
- Residence Type (must be 'Studio', 'One-bedroom', 'Two-bedroom', 'Companion Suite', 'Single', 'Double', 'Shared', or 'Condo')
- Birth Date (mm/dd/yyyy)
- Move In Date (mm/dd/yyyy)
- Room Orientation (must be 'Left' or 'Right')
- Building
- System Id
When a user is successfully created, the User Id will be written. Rows with values in these columns will be skipped.
Creating Hotlines
To create a single hotline, run in manual mode and follow the prompts.
To bulk create, run in file mode. File must include a first row of headers, and include these columns:
- Operator
- Community
- Zipcode
- Areacode
When a hotline is successfully created, the Hotline and Code columns will be written. Rows with values in these columns will be skipped.
Creating Displays
To create a single digital signage display, run in manual mode and follow the prompts.
To bulk create, run in file mode. File must include a first row of headers, and include these columns:
- Community Id
- Name
When a display is successfully created, the Display Id and Url columns will be written. Rows with values in these columns will be skipped.
4 years ago