CLI development tool for the Roundtable Learning Management System
npm install rtolms-clirtolms-cli
==========
CLI development tool for the Roundtable Learning Management System




---
* Requirements
* Usage
* Commands
* Configuration with .env Files
- git available in your path
- A personal access token for authenticating to the GitHub API
- private key authentication configured for git+ssh:// protocol access to GitHub
- Use ssh-keygen to create a key pair
- Add your public key to your GitHub account
sh-session
$ npm install -g rtolms-cli
$ rtolms COMMAND
running command...
$ rtolms (-v|--version|version)
rtolms-cli/3.1.1 linux-x64 node-v10.15.0
$ rtolms --help [COMMAND]
USAGE
$ rtolms COMMAND
...
`
Commands
* [rtolms autocomplete [SHELL]](#rtolms-autocomplete-shell)
* rtolms clone
* rtolms config
* rtolms config:init
* rtolms config:set KEY VALUE
* [rtolms get-path [CUSTOMERNAME]](#rtolms-get-path-customername)
* rtolms git
* [rtolms help [COMMAND]](#rtolms-help-command)
* [rtolms link [CUSTOMERNAME]](#rtolms-link-customername)
* rtolms reconfigure
* [rtolms sql:incrementals [CUSTOMERNAME]](#rtolms-sqlincrementals-customername)
* rtolms status
* rtolms unlink
* rtolms whichrtolms autocomplete [SHELL]display autocomplete installation instructions
`
USAGE
$ rtolms autocomplete [SHELL]ARGUMENTS
SHELL shell type
OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
EXAMPLES
$ rtolms autocomplete
$ rtolms autocomplete bash
$ rtolms autocomplete zsh
$ rtolms autocomplete --refresh-cache
`_See code: @oclif/plugin-autocomplete_
rtolms cloneUpdates local working copies
`
USAGE
$ rtolms cloneOPTIONS
-a, --auth-type=private-key|token [default: token] Which authentication type to use
-c, --concurrency=concurrency (required) [default: 4] Number of operations to run at once
-d, --dry-run Don't actually perform clone
-h, --help show CLI help
-v, --verbose Verbose
--force Do not stop on errors
--page-size=page-size [default: 30] How many lines to show per page in list prompts
EXAMPLE
$ rtolms clone
`_See code: src/commands/clone.ts_
rtolms configCreate or modify configuration files
`
USAGE
$ rtolms configOPTIONS
-h, --help show CLI help
-v, --verbose Verbose
--page-size=page-size [default: 30] How many lines to show per page in list prompts
ALIASES
$ rtolms config:list
$ rtolms config:index
`_See code: src/commands/config/index.ts_
rtolms config:initPrompt for data to create the required configuration file
`
USAGE
$ rtolms config:initOPTIONS
-h, --help show CLI help
-v, --verbose Verbose
--page-size=page-size [default: 30] How many lines to show per page in list prompts
ALIASES
$ rtolms init
`_See code: src/commands/config/init.ts_
rtolms config:set KEY VALUESet a configuration key's value
`
USAGE
$ rtolms config:set KEY VALUEARGUMENTS
KEY Config key to set
VALUE The value to set
OPTIONS
-h, --help show CLI help
-v, --verbose Verbose
--page-size=page-size [default: 30] How many lines to show per page in list prompts
ALIASES
$ rtolms set
$ rtolms config:set
`_See code: src/commands/config/set.ts_
rtolms get-path [CUSTOMERNAME]Prints repo directory path for a given customer
`
USAGE
$ rtolms get-path [CUSTOMERNAME]ARGUMENTS
CUSTOMERNAME Partial customer name (fuzzy matched to custom repo names)
OPTIONS
-h, --help show CLI help
-v, --verbose Verbose
--page-size=page-size [default: 30] How many lines to show per page in list prompts
ALIASES
$ rtolms path
EXAMPLES
$ rtolms get-path
$ rtolms get-path fed
`_See code: src/commands/get-path.ts_
rtolms gitRun any git operation on all customer repos
`
USAGE
$ rtolms gitOPTIONS
-c, --concurrency=concurrency (required) [default: 1] Number of operations to run at once
-h, --help show CLI help
-v, --verbose Verbose
--force Do not stop on errors
--page-size=page-size [default: 30] How many lines to show per page in list prompts
EXAMPLE
$ rtolms git fetch
`_See code: src/commands/git.ts_
rtolms help [COMMAND]display help for rtolms
`
USAGE
$ rtolms help [COMMAND]ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
`_See code: @oclif/plugin-help_
rtolms link [CUSTOMERNAME]Link a custom dir to lms-core
`
USAGE
$ rtolms link [CUSTOMERNAME]ARGUMENTS
CUSTOMERNAME Partial customer name (fuzzy matched to custom repo names)
OPTIONS
-h, --help show CLI help
-j, --use-junction Use a junction symlink type on windows (defaults to "dir" type)
-t, --target=target Target path to link to
-v, --verbose Verbose
--page-size=page-size [default: 30] How many lines to show per page in list prompts
EXAMPLES
$ rtolms link
# prompts for user input to select a customer
$ rtolms link ama
# fuzzy matches customer
$ rtolms link --target=~/Projects/some/dir
# Overrides link target manually
`_See code: src/commands/link.ts_
rtolms reconfigureChanges database connection strings
`
USAGE
$ rtolms reconfigureOPTIONS
-R, --replace-raw=replace-raw Same as -r but skips string replacements (the provided value is used verbatim).
-d, --database=database The name of the database to change to. Defaults to
config.database.
-h, --help show CLI help
-r, --replace=replace Replace entire connection string with this value instead of the current value.
-s, --server=server The database server name to change to. Defaults to config.server.
-v, --verbose Verbose
--no-strip-bom Do not remove the byte order mark from processed files
--page-size=page-size [default: 30] How many lines to show per page in list promptsALIASES
$ rtolms reconf
$ rtolms reconfig
$ rtolms setdb
$ rtolms set-db
$ rtolms changedb
EXAMPLES
$ lms reconfig
# Replaces server and database values in connection strings with those from your current configuration
This is useful for new databases with no auth info
$ lms reconf -r "Server=willbereplaced;DataBase=willbereplaced;UID=dev;PWD=elopment;"
# Replaces entire connection string with this val (with server and database values replaced)
$ lms reconf -R "Server=willNOTbereplaced;DataBase=willNOTbereplaced;UID=dev;PWD=elopment;"
# Replaces entire connection string with this val verbatim
`_See code: src/commands/reconfigure.ts_
rtolms sql:incrementals [CUSTOMERNAME]Run SQL incremental scripts
`
USAGE
$ rtolms sql:incrementals [CUSTOMERNAME]ARGUMENTS
CUSTOMERNAME Partial customer name (fuzzy matched to custom repo names)
OPTIONS
-L, --no-use-linked
Ignore currently linked custom dir
-a, --archived
Show archived incrementals also
-c, --core
Run core incrementals instead of custom
-d, --database=database
The name of the database to change to. Defaults to
config.database. -h, --help
show CLI help
-p, --password=password
(required) [default: elopment] The password to connect to the db with.
-s, --server=server
The database server name to change to. Defaults to
config.server. -u, --username=username
[default: dev] The username to connect to the db with.
-v, --verbose
Verbose
--from=from
(required) [default: last 6 months] Preselect scripts dated after FROM. See
parser for more info on matching.
--from="last 6 months"
--from="2 months ago"
--from="June"
--from="2018-03-01"
--from="last month"
--from="jan 1"
--instance=instance
The sql server instance on the server (Must have port 1434 open). Defaults to server.split(\)[1]
--page-size=page-size
[default: 30] How many lines to show per page in list prompts
DESCRIPTION
This command will look for .sql scripts in subdirectories of the selected repo
named "Sql". If any are found, it will prompt you to select which scripts to
run before executing them.
The --from flag can be used to preselect scripts which are dated after
the given time. See examples for more.
ALIASES
$ rtolms sql
$ rtolms sql:index
EXAMPLES
$ rtolms sql:incrementals
# finds scripts in your currently linked custom dir
$ rtolms sql:incrementals -L
# prompts for a custom repo to look for scripts in
$ rtolms sql:incrementals --core --from="jul 4"
# finds scripts in your lms-core dir and preselects all dated after July 4 of this year
$ rtolms sql:incrementals ama
# finds scripts in fuzzy matched lms-custom-aama dir
$ rtolms sql:incrementals -s="my-vm.local"
# connects to server on "my-vm.local" (port 1433)
$ rtolms sql:incrementals -s="my-vm.local\\SQLEXPRESS"
# connects to server instance "SQLEXPRESS" on "my-vm.local"
$ rtolms sql:incrementals -ca
# runs archived incrementals from core
`_See code: src/commands/sql/incrementals.ts_
rtolms statusShows status of all repos
`
USAGE
$ rtolms statusOPTIONS
-c, --concurrency=concurrency (required) [default: 4] Number of operations to run at once
-f, --fetch Fetch from remote before checking status
-h, --help show CLI help
-v, --verbose Verbose
--force Do not stop on errors
--page-size=page-size [default: 30] How many lines to show per page in list prompts
ALIASES
$ rtolms st
$ rtolms stat
`_See code: src/commands/status.ts_
rtolms unlinkUnlink a custom dir to lms-core
`
USAGE
$ rtolms unlinkOPTIONS
-h, --help show CLI help
-v, --verbose Verbose
--page-size=page-size [default: 30] How many lines to show per page in list prompts
`_See code: src/commands/unlink.ts_
rtolms whichPrints which customer is currently linked
`
USAGE
$ rtolms whichOPTIONS
-h, --help show CLI help
-v, --verbose Verbose
--page-size=page-size [default: 30] How many lines to show per page in list prompts
`_See code: src/commands/which.ts_
---
Configuration with
.env FilesAs of v2.17.0, the cli will read database and server from
.env or .env.defaults files in the root of the currently linked custom dir.For example, if we have this fs structure:
`sh
├── lms
│ ├── lms-core
│ ├── lms-custom-enviva #<-- linked
│ │ └── .env.defaults
│ ├── lms-custom-plygem
│ └── lms-custom-tcx
│ ├── .env
│ └── .env.defaults
`When running any command, the CLI will read the
database value from lms/lms-custom-enviva/.env.defaults`.See https://github.com/mrsteele/dotenv-defaults#readme for more.