legispro-cli
v1.0.41
Published
LegisPro CLI
Readme
legispro-cli
LegisPro CLI - test
- Usage
- Data Synchronization & Deployment Logic
- Mapped User Management
- Create users locally
- Create and deploy immediately to an environment
- Soft removal and deploy
- Hard removal (account deletion)
- Rotate passwords for ALL users in the mapping and deploy
- Rotate password for a specific user
- Commands
Usage
$ npm install -g legispro-cli
$ lp COMMAND
running command...
$ lp (--version)
legispro-cli/1.0.41 darwin-arm64 node-v24.0.1
$ lp --help [COMMAND]
USAGE
$ lp COMMAND
...Data Synchronization & Deployment Logic
The lp deploy command manages the deployment of release assets and the synchronization of data collections. To optimize performance and storage, the following logic is applied:
Data Accumulation
By default, when deploying a new version, the CLI identifies the range of releases between the currently installed version and the target version. It downloads the data- assets for each release in that range and merges them incrementally.
- Cleanup: To prevent disk space issues, the CLI automatically deletes temporary asset files (
.zip) and intermediate extraction folders once they have been merged into the final accumulation directory. - Incremental Updates: If a
users.ymlfile is part of the deployment, it is merged with the remote version to ensure existing user mappings are preserved.
Deployment Flags
--latest-only: Ignores the version history and treats the deployment as a fresh installation for the target tag. This is the fastest way to deploy a hotfix if you only need the data from the specific tag being deployed.--sync-data: Enables the download and merging of data assets.--no-sync-data: Skips downloading and merging data assets entirely.--skip-data-check: Skips even the initial check for data assets in GitHub releases, providing the fastest possible execution for code-only deployments.
Mapped User Management
The lp mapped-user command suite simplifies user provisioning and authentication mapping for systems behind an authentication proxy.
1. Provisioning New Users
Register users in eXist-db and automatically update the proxy mapping (users.yml).
# Create users locally
lp mapped-user create --ids [email protected],[email protected] --groups us-or --output ./users.yml
# Create and deploy immediately to an environment
lp mapped-user create --ids [email protected] --groups admin --deploy --env ola-dev2. Removing Users
Remove users from the proxy mapping. You can choose between a "soft" or "hard" removal.
- Hard Removal (Default): Removes the user from
users.ymlAND deletes the user account from eXist-db. - Soft Removal (
--soft): Only removes the mapping fromusers.yml. The user account and their data in eXist-db are preserved.
# Soft removal and deploy
lp mapped-user delete --ids [email protected] --soft --deploy --env ola-qa
# Hard removal (account deletion)
lp mapped-user delete --ids [email protected] --deploy3. Password Rotation
Update passwords for your mapped users. This command generates new secure passwords and updates both eXist-db and the proxy mapping.
# Rotate passwords for ALL users in the mapping and deploy
lp mapped-user rotate-passwords --deploy --env ola-linux-dev
# Rotate password for a specific user
lp mapped-user rotate-passwords --ids [email protected] --deployDeployment & Security
--deploy: This flag triggers an SSH connection to the target environment, uploads the updatedusers.yml, and restarts the proxy service to apply changes.- Hashing: The CLI automatically hashes passwords when sending them to eXist-db, ensuring compatibility with the backend security manager. The
users.ymlfile stores the credentials required for proxy-to-backend authentication.
Commands
lp backup createlp backup listlp collection addlp collection createlp collection deletelp collection downloadlp collection getlp collection listlp collection permslp collection updatelp collection uploadlp config getlp config setlp db initlp db memorylp db uptimelp db versionlp deploylp document copylp document listlp group createlp group deletelp group getlp group listlp group updatelp help [COMMAND]lp locks addlp locks clearlp mapped-user createlp mapped-user deletelp mapped-user rotate-passwordslp services healthlp user createlp user deletelp user getlp user listlp user loginlp user update
lp backup create
Create a database backup
USAGE
$ lp backup create
DESCRIPTION
Create a database backup
EXAMPLES
$ legispro backup:createlp backup list
List all database backups
USAGE
$ lp backup list
DESCRIPTION
List all database backups
EXAMPLES
$ legispro backup:listlp collection add
Add document to collection
USAGE
$ lp collection add [--name <value>] [--file <value>] [--mediaType <value>]
FLAGS
--file=<value> File
--mediaType=<value> Media type
--name=<value> Name
DESCRIPTION
Add document to collection
EXAMPLES
$ legispro collection:addlp collection create
Create a collection
USAGE
$ lp collection create [--name <value>] [--title <value>] [--baseURI <value>] [--defaultExt <value>] [--type <value>]
[--env ola-dev|ola-qa|ola-linux-dev|ola-linux-qa|ola-linux-prod]
FLAGS
--baseURI=<value> Base URI
--defaultExt=<value> Default extension
--env=<option> Environment variables file
<options: ola-dev|ola-qa|ola-linux-dev|ola-linux-qa|ola-linux-prod>
--name=<value> Name
--title=<value> Title
--type=<value> Collection type
DESCRIPTION
Create a collection
EXAMPLES
$ legispro collection:createlp collection delete
Delete a collection
USAGE
$ lp collection delete [--name <value>]
FLAGS
--name=<value> Name
DESCRIPTION
Delete a collection
EXAMPLES
$ legispro collection:deletelp collection download
Download files from collection
USAGE
$ lp collection download [--name <value>] [--dest <value>]
FLAGS
--dest=<value> Destination folder
--name=<value> Name
DESCRIPTION
Download files from collection
EXAMPLES
$ legispro collection:downloadlp collection get
Get collection info & contents
USAGE
$ lp collection get [--name <value>]
FLAGS
--name=<value> Name
DESCRIPTION
Get collection info & contents
EXAMPLES
$ legispro collection:getlp collection list
List collections
USAGE
$ lp collection list
DESCRIPTION
List collections
EXAMPLES
$ legispro collection:listlp collection perms
Update file permissions for a collection.
USAGE
$ lp collection perms [--name <value>] [--source <value>] [--type <value>]
FLAGS
--name=<value> Collection name
--source=<value> Source folder
--type=<value> Collection type
DESCRIPTION
Update file permissions for a collection.
EXAMPLES
$ legispro collection:permslp collection update
Update a collection
USAGE
$ lp collection update [--name <value>] [--title <value>] [--baseURI <value>] [--defaultExt <value>] [--type <value>]
[--owner <value>] [--group <value>]
FLAGS
--baseURI=<value> Base URI
--defaultExt=<value> Default extension
--group=<value> Collection group
--name=<value> Name
--owner=<value> Collection owner
--title=<value> Title
--type=<value> Collection type
DESCRIPTION
Update a collection
EXAMPLES
$ legispro collection:updatelp collection upload
Upload files to collection
USAGE
$ lp collection upload [--name <value>] [--source <value>] [--type <value>] [--env
ola-dev|ola-qa|ola-linux-dev|ola-linux-qa|ola-linux-prod]
FLAGS
--env=<option> Environment variables file
<options: ola-dev|ola-qa|ola-linux-dev|ola-linux-qa|ola-linux-prod>
--name=<value> Collection name
--source=<value> Source folder
--type=<value> Collection type
DESCRIPTION
Upload files to collection
EXAMPLES
$ legispro collection:uploadlp config get
Get your current configuration.
USAGE
$ lp config get
DESCRIPTION
Get your current configuration.lp config set
Sets your user configuration.
USAGE
$ lp config set [--hostname <value>] [--protocol <value>] [--port <value>] [--user <value>] [--password
<value>] [--webdav <value>] [--group <value>]
FLAGS
--group=<value> User group
--hostname=<value> Hostname
--password=<value> Admin password
--port=<value> Port
--protocol=<value> Protocol
--user=<value> Admin user
--webdav=<value> WebDAV path
DESCRIPTION
Sets your user configuration.lp db init
Initialize a new LegisPro database (idempotent)
USAGE
$ lp db init
DESCRIPTION
Initialize a new LegisPro database (idempotent)
EXAMPLES
$ legispro db init
# Safe to re-run — already-existing resources are left untouchedlp db memory
Database memory status
USAGE
$ lp db memory
DESCRIPTION
Database memory status
EXAMPLES
$ legispro db:memorylp db uptime
Get database uptime
USAGE
$ lp db uptime
DESCRIPTION
Get database uptime
EXAMPLES
$ legispro db:uptimelp db version
Get database version
USAGE
$ lp db version
DESCRIPTION
Get database version
EXAMPLES
$ legispro db:versionlp deploy
Executes a docker deployment
USAGE
$ lp deploy [-p <value>] [-e ola-dev|ola-qa|ola-linux-dev|ola-linux-qa|ola-linux-prod] [-t <value>] [-l
<value>] [--sync-data] [--no-sync-data] [-s] [--latest-only] [-v]
FLAGS
-e, --env=<option> Environment variables file
<options: ola-dev|ola-qa|ola-linux-dev|ola-linux-qa|ola-linux-prod>
-l, --local-dir=<value> Local directory to extract the release
-p, --installationPath=<value> [default: C:/legispro/deploy/] Server installation path
-s, --skip-data-check Skip data asset check and accumulation entirely
-t, --tag=<value> Release tag to deploy
-v, --verbose Print SSH commands before execution and stream full docker compose output
--latest-only Ignore current version on server and only deploy the target tag (skips intermediate
releases)
--no-sync-data Skip data synchronization
--[no-]sync-data Sync data from releases
DESCRIPTION
Executes a docker deployment
EXAMPLES
$ lp deploylp document copy
List documents
USAGE
$ lp document copy
DESCRIPTION
List documents
EXAMPLES
$ legispro document:listlp document list
List documents
USAGE
$ lp document list
DESCRIPTION
List documents
EXAMPLES
$ legispro document:listlp group create
Create group
USAGE
$ lp group create [--name <value>] [--managers <value>] [--email <value>] [--language <value>] [--description
<value>]
FLAGS
--description=<value> description
--email=<value> email
--language=<value> language
--managers=<value> Managers
--name=<value> Name
DESCRIPTION
Create group
EXAMPLES
$ legispro group:createlp group delete
Get group information
USAGE
$ lp group delete [--name <value>]
FLAGS
--name=<value> Name
DESCRIPTION
Get group information
EXAMPLES
$ legispro group:get --name demolp group get
Get group information
USAGE
$ lp group get [--name <value>]
FLAGS
--name=<value> Name
DESCRIPTION
Get group information
EXAMPLES
$ legispro group:get --name demolp group list
Get list of all groups
USAGE
$ lp group list
DESCRIPTION
Get list of all groups
EXAMPLES
$ legispro group:listlp group update
Create group
USAGE
$ lp group update [--name <value>] [--managers <value>] [--email <value>] [--language <value>] [--description
<value>]
FLAGS
--description=<value> description
--email=<value> email
--language=<value> language
--managers=<value> Managers
--name=<value> Name
DESCRIPTION
Create group
EXAMPLES
$ legispro groupr:createlp help [COMMAND]
Display help for lp.
USAGE
$ lp help [COMMAND...] [-n]
ARGUMENTS
COMMAND... Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for lp.See code: @oclif/plugin-help
lp locks add
Initialize /db/etc/locks and /db/etc/mods collections
USAGE
$ lp locks add
DESCRIPTION
Initialize /db/etc/locks and /db/etc/mods collections
EXAMPLES
$ legispro locks add
# Usually invoked automatically by 'legispro db init'lp locks clear
Clear expired locks
USAGE
$ lp locks clear
DESCRIPTION
Clear expired locks
EXAMPLES
$ legispro locks:clearlp mapped-user create
Register users in eXist-db and update proxy mapping
USAGE
$ lp mapped-user create --ids <value> --groups <value> [--output <value>] [--env
ola-dev|ola-qa|ola-linux-dev|ola-linux-qa|ola-linux-prod --deploy] [--remote-path <value> ] [--verbose]
FLAGS
--deploy Deploy updated mapping to remote server
--env=<option> Environment name for deployment
<options: ola-dev|ola-qa|ola-linux-dev|ola-linux-qa|ola-linux-prod>
--groups=<value> (required) Comma-separated list of groups to assign
--ids=<value> (required) Comma-separated list of email IDs to register
--output=<value> Local path to users.yml to update (optional if --deploy is used)
--remote-path=<value> Remote path for the users.yml file
--verbose Print SSH commands and output
DESCRIPTION
Register users in eXist-db and update proxy mapping
EXAMPLES
$ lp mapped-user create --ids [email protected] --groups us-or --output ./users.yml
$ lp mapped-user create --ids [email protected],[email protected] --groups us-or --deploy --env prodlp mapped-user delete
Remove users from proxy mapping and optionally from eXist-db
USAGE
$ lp mapped-user delete --ids <value> [--soft] [--output <value>] [--env
ola-dev|ola-qa|ola-linux-dev|ola-linux-qa|ola-linux-prod --deploy] [--remote-path <value> ] [--verbose]
FLAGS
--deploy Deploy updated mapping to remote server
--env=<option> Environment name for deployment
<options: ola-dev|ola-qa|ola-linux-dev|ola-linux-qa|ola-linux-prod>
--ids=<value> (required) Comma-separated list of email IDs to remove
--output=<value> Local path to users.yml to update (optional if --deploy is used)
--remote-path=<value> Remote path for the users.yml file
--soft Soft removal: only remove from users.yml, keep user and data in eXist-db
--verbose Print SSH commands and output
DESCRIPTION
Remove users from proxy mapping and optionally from eXist-db
EXAMPLES
$ lp mapped-user delete --ids [email protected] --output ./users.yml
$ lp mapped-user delete --ids [email protected] --soft --deploy --env prodlp mapped-user rotate-passwords
Rotate passwords for all or specific users in the proxy mapping
USAGE
$ lp mapped-user rotate-passwords [--ids <value>] [--output <value>] [--env
ola-dev|ola-qa|ola-linux-dev|ola-linux-qa|ola-linux-prod --deploy] [--remote-path <value> ] [--verbose]
FLAGS
--deploy Deploy updated mapping to remote server
--env=<option> Environment name for deployment
<options: ola-dev|ola-qa|ola-linux-dev|ola-linux-qa|ola-linux-prod>
--ids=<value> Comma-separated list of email IDs to rotate (default: all users in mapping)
--output=<value> Local path to users.yml to update (optional if --deploy is used)
--remote-path=<value> Remote path for the users.yml file
--verbose Print SSH commands and output
DESCRIPTION
Rotate passwords for all or specific users in the proxy mapping
EXAMPLES
$ lp mapped-user rotate-passwords --output ./users.yml
$ lp mapped-user rotate-passwords --ids [email protected] --deploy --env prodlp services health
Perform services health check
USAGE
$ lp services health
DESCRIPTION
Perform services health check
EXAMPLES
$ legispro services:healthlp user create
Create, delete and update users
USAGE
$ lp user create [--username <value>] [--password <value>] [--groups <value>] [--firstName <value>] [--lastName
<value>] [--fullName <value>] [--alias <value>] [--email <value>] [--description <value>] [--language <value>]
[--timezone <value>] [--country <value>] [--enabled] [--expired] [--umask <value>]
FLAGS
--alias=<value> Friendly name
--country=<value> Home country
--description=<value> Description
--email=<value> Email
--enabled Enable user account
--expired Expire password
--firstName=<value> First name
--fullName=<value> Full name
--groups=<value> Groups
--language=<value> Preferred language
--lastName=<value> Last name
--password=<value> Password
--timezone=<value> Preferred timezone
--umask=<value> [default: 18] Default umask
--username=<value> Username
DESCRIPTION
Create, delete and update users
EXAMPLES
$ legispro user:createlp user delete
Delete a user
USAGE
$ lp user delete [-u <value>]
FLAGS
-u, --username=<value> Username to delete
DESCRIPTION
Delete a user
EXAMPLES
$ legispro user:delete --username demolp user get
Get user information
USAGE
$ lp user get [--username <value>]
FLAGS
--username=<value> Username to fetch
DESCRIPTION
Get user information
EXAMPLES
$ legispro user:get --username demolp user list
Get list of all users
USAGE
$ lp user list
DESCRIPTION
Get list of all users
EXAMPLES
$ legispro user:listlp user login
Test a user login
USAGE
$ lp user login [--username <value>] [--password <value>]
FLAGS
--password=<value> password
--username=<value> Username to create
DESCRIPTION
Test a user login
EXAMPLES
$ legispro user:login --username=demo --password=secretlp user update
Update user properties
USAGE
$ lp user update [--username <value>] [--groups <value>] [--email <value>] [--language <value>] [--description
<value>] [--password <value>] [--primaryGroup <value>] [--alias <value>] [--timezone <value>] [--firstName <value>]
[--lastName <value>] [--country <value>] [--fullName <value>] [--enabled] [--expired] [--umask <value>]
FLAGS
--alias=<value> alias
--country=<value> country
--description=<value> description
--email=<value> email
--enabled User enabled?
--expired User expired?
--firstName=<value> first name
--fullName=<value> full name
--groups=<value> Group memberships
--language=<value> language
--lastName=<value> last name
--password=<value> password
--primaryGroup=<value> primary group
--timezone=<value> timezone
--umask=<value> [default: 18] User umask
--username=<value> Username to create
DESCRIPTION
Update user properties
EXAMPLES
$ legispro user:update --name demo --password secret