0.7.2-beta.16 • Published 2 years ago

@christianhugoch/cli v0.7.2-beta.16

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@christianhugoch/cli

Saltcorn command line interface

oclif Version License

Usage

$ npm install -g @christianhugoch/cli
$ saltcorn COMMAND
running command...
$ saltcorn (-v|--version|version)
@christianhugoch/cli/0.7.2-beta.5 linux-x64 node-v14.19.2
$ saltcorn --help [COMMAND]
USAGE
  $ saltcorn COMMAND
...

Commands

saltcorn add-schema

Add Saltcorn schema to existing database

USAGE
  $ saltcorn add-schema

See code: src/commands/add-schema.js

saltcorn backup

Backup the PostgreSQL database to a file with pg_dump or zip

USAGE
  $ saltcorn backup

OPTIONS
  -o, --output=output  output filename
  -t, --tenant=tenant  tenant
  -z, --zip            zip format

See code: src/commands/backup.js

saltcorn build-app

build mobile app from tenant

USAGE
  $ saltcorn build-app

OPTIONS
  -l, --localUserTables=localUserTables  user defined tables that should be replicated into the app
  -p, --platforms=platforms              Platforms to build for space separated list
  -v, --entryPoint=entryPoint            Entry Point

See code: @christianhugoch/mobile-builder

saltcorn configuration-check

Check configuration

USAGE
  $ saltcorn configuration-check

OPTIONS
  -t, --tenant=tenant  tenant

See code: src/commands/configuration-check.js

saltcorn create-tenant TENANT

Create a tenant

USAGE
  $ saltcorn create-tenant TENANT

ARGUMENTS
  TENANT  Tenant subdomain to create

OPTIONS
  -d, --description=description  Description of tenant
  -e, --email=email              Email of owner of tenant

See code: src/commands/create-tenant.js

saltcorn create-user

Create a new user

USAGE
  $ saltcorn create-user

OPTIONS
  -a, --admin              Admin user
  -e, --email=email        email
  -p, --password=password  password
  -r, --role=role          role
  -t, --tenant=tenant      tenant

See code: src/commands/create-user.js

saltcorn delete-tenants

Delete inactive tenants

USAGE
  $ saltcorn delete-tenants

See code: src/commands/delete-tenants.js

saltcorn fixtures

Load fixtures for testing

USAGE
  $ saltcorn fixtures

OPTIONS
  -r, --reset          Also reset schema
  -t, --tenant=tenant  tenant

DESCRIPTION
  ...
  This manual step it is never required for users and rarely required for developers

See code: src/commands/fixtures.js

saltcorn get-cfg KEY

Get a configuration value

USAGE
  $ saltcorn get-cfg KEY

ARGUMENTS
  KEY  Configuration key

OPTIONS
  -p, --plugin=plugin  plugin
  -t, --tenant=tenant  tenant

See code: src/commands/get-cfg.js

saltcorn help [COMMAND]

display help for saltcorn

USAGE
  $ saltcorn help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

saltcorn info

Show paths

USAGE
  $ saltcorn info

OPTIONS
  -j, --json  json format

DESCRIPTION
  ...
  Show configuration and file store paths

ALIASES
  $ saltcorn paths

See code: src/commands/info.js

saltcorn install-pack

Install a pack

USAGE
  $ saltcorn install-pack

OPTIONS
  -f, --file=file      File with pack JSON
  -n, --name=name      Pack name in store
  -t, --tenant=tenant  tenant

See code: src/commands/install-pack.js

saltcorn install-plugin

Install a plugin

USAGE
  $ saltcorn install-plugin

OPTIONS
  -d, --directory=directory  Directory with local plugin
  -n, --name=name            Plugin name in store
  -t, --tenant=tenant        tenant

See code: src/commands/install-plugin.js

saltcorn list-tenants

List tenants in CSV format

USAGE
  $ saltcorn list-tenants

See code: src/commands/list-tenants.js

saltcorn localize-plugin PLUGIN PATH

Convert plugin to local plugin

USAGE
  $ saltcorn localize-plugin PLUGIN PATH

ARGUMENTS
  PLUGIN  Current plugin name
  PATH    Absolute path to local plugin

OPTIONS
  -t, --tenant=tenant  tenant

See code: src/commands/localize-plugin.js

saltcorn make-migration

Create a new blank Database structure migration file.

USAGE
  $ saltcorn make-migration

DESCRIPTION
  These migrations update database structure.
  You should not normally need to run this
  unless you are a developer.

See code: src/commands/make-migration.js

saltcorn migrate

Run Database structure migrations

USAGE
  $ saltcorn migrate

DESCRIPTION
  ...
  NOTE!
  - Please stop Saltcorn before run DB migrations.
  - Please make db backup before migration.
  - There are no way to rollback migration if you doesn't make backup.

  This is not normally required as migrations will be run when the server starts.
  However, this command may be useful if you are running multiple application
  servers and need to control when the migrations are run.

See code: src/commands/migrate.js

saltcorn modify-user

Modify (update) user

USAGE
  $ saltcorn modify-user USER_EMAIL

ARGUMENTS
  USER_EMAIL  User to modify

OPTIONS
  -a, --admin              make user be Admin
  -e, --email=email        new email
  -i, --imode              interactive mode
  -p, --password=password  new password
  -r, --role=role          new role (can conflict with -a option)
  -t, --tenant=tenant      tenant

DESCRIPTION
  Command changes the user specified by USER_EMAIL.

  You can change the user group, password and email.

  NOTE that -a and -r role (--role=role) can give conflict.

See code: src/commands/modify-user.js

saltcorn plugins

List installed plugins.

USAGE
  $ saltcorn plugins

OPTIONS
  --core  Show core plugins.

EXAMPLE
  $ saltcorn plugins

See code: @oclif/plugin-plugins

saltcorn plugins:inspect PLUGIN...

Displays installation properties of a plugin.

USAGE
  $ saltcorn plugins:inspect PLUGIN...

ARGUMENTS
  PLUGIN  [default: .] Plugin to inspect.

OPTIONS
  -h, --help     Show CLI help.
  -v, --verbose

EXAMPLE
  $ saltcorn plugins:inspect myplugin

See code: @oclif/plugin-plugins

saltcorn plugins:install PLUGIN...

Installs a plugin into the CLI.

USAGE
  $ saltcorn plugins:install PLUGIN...

ARGUMENTS
  PLUGIN  Plugin to install.

OPTIONS
  -f, --force    Run yarn install with force flag.
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Can be installed from npm or a git url.

  Installation of a user-installed plugin will override a core plugin.

  e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command 
  will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in 
  the CLI without the need to patch and update the whole CLI.

ALIASES
  $ saltcorn plugins:add

EXAMPLES
  $ saltcorn plugins:install myplugin 
  $ saltcorn plugins:install https://github.com/someuser/someplugin
  $ saltcorn plugins:install someuser/someplugin

See code: @oclif/plugin-plugins

saltcorn plugins:link PLUGIN

Links a plugin into the CLI for development.

USAGE
  $ saltcorn plugins:link PLUGIN

ARGUMENTS
  PATH  [default: .] path to plugin

OPTIONS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Installation of a linked plugin will override a user-installed or core plugin.

  e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
   command will override the user-installed or core plugin implementation. This is useful for development work.

EXAMPLE
  $ saltcorn plugins:link myplugin

See code: @oclif/plugin-plugins

saltcorn plugins:uninstall PLUGIN...

Removes a plugin from the CLI.

USAGE
  $ saltcorn plugins:uninstall PLUGIN...

ARGUMENTS
  PLUGIN  plugin to uninstall

OPTIONS
  -h, --help     Show CLI help.
  -v, --verbose

ALIASES
  $ saltcorn plugins:unlink
  $ saltcorn plugins:remove

See code: @oclif/plugin-plugins

saltcorn plugins:update

Update installed plugins.

USAGE
  $ saltcorn plugins:update

OPTIONS
  -h, --help     Show CLI help.
  -v, --verbose

See code: @oclif/plugin-plugins

saltcorn release VERSION

Release a new saltcorn version

USAGE
  $ saltcorn release VERSION

ARGUMENTS
  VERSION  New version number

See code: src/commands/release.js

saltcorn reset-schema

Reset the database

USAGE
  $ saltcorn reset-schema

OPTIONS
  -f, --force          force
  -t, --tenant=tenant  tenant

DESCRIPTION
  ...
  This will delete all existing information

See code: src/commands/reset-schema.js

saltcorn restore FILE

Restore a previously backed up database (zip or sqlc format)

USAGE
  $ saltcorn restore FILE

ARGUMENTS
  FILE  backup file to restore

OPTIONS
  -t, --tenant=tenant  tenant

See code: src/commands/restore.js

saltcorn rm-tenant TENANT

Remove a tenant

USAGE
  $ saltcorn rm-tenant TENANT

ARGUMENTS
  TENANT  Tenant to remove

See code: src/commands/rm-tenant.js

saltcorn run-benchmark [BASEURL]

Run benchmark

USAGE
  $ saltcorn run-benchmark [BASEURL]

ARGUMENTS
  BASEURL  Base URL

OPTIONS
  -b, --benchmark=benchmark  Which benchmark to run
  -d, --delay=delay          [default: 30] delay between runs (s)
  -t, --token=token          API Token for reporting results

See code: src/commands/run-benchmark.js

saltcorn run-tests [PACKAGE]

Run test suites

USAGE
  $ saltcorn run-tests [PACKAGE]

ARGUMENTS
  PACKAGE  which package to run tests for

OPTIONS
  -c, --coverage               Coverage
  -t, --testFilter=testFilter  Filter tests by suite or test name
  --watch                      Watch files for changes and rerun tests related to changed files.
  --watchAll                   Watch files for changes and rerun all tests.

See code: src/commands/run-tests.js

saltcorn scheduler

Run the Saltcorn scheduler

USAGE
  $ saltcorn scheduler

OPTIONS
  -v, --verbose  Verbose

See code: src/commands/scheduler.js

saltcorn serve

Start the Saltcorn server

USAGE
  $ saltcorn serve

OPTIONS
  -a, --addschema    Add schema if missing
  -d, --dev          Run in dev mode and re-start on file changes
  -n, --nomigrate    No migrations
  -p, --port=port    [default: 3000] port
  -r, --watchReaper  Watch reaper
  -s, --noscheduler  No scheduler
  -v, --verbose      Verbose

See code: src/commands/serve.js

saltcorn set-cfg KEY VALUE

Set a configuration value

USAGE
  $ saltcorn set-cfg KEY VALUE

ARGUMENTS
  KEY    Configuration key
  VALUE  Configuration value (JSON or string)

OPTIONS
  -p, --plugin=plugin  plugin
  -t, --tenant=tenant  tenant

See code: src/commands/set-cfg.js

saltcorn setup

Set up a new system

USAGE
  $ saltcorn setup

OPTIONS
  -c, --coverage  Coverage

DESCRIPTION
  ...
  This will attempt to install or connect a database, and set up a 
  configuration file

See code: src/commands/setup.js

saltcorn setup-benchmark

Setup an instance for benchmarking

USAGE
  $ saltcorn setup-benchmark

OPTIONS
  -t, --tenant=tenant  tenant

See code: src/commands/setup-benchmark.js

saltcorn test-plugin PATH

Test a plugin

USAGE
  $ saltcorn test-plugin PATH

ARGUMENTS
  PATH  path to plugin package

DESCRIPTION
  ...
  Extra documentation goes here

See code: src/commands/test-plugin.js

saltcorn transform-field EXPRESSION FIELD TABLE [TENANT]

transform an existing field by applying a calculated expression

USAGE
  $ saltcorn transform-field EXPRESSION FIELD TABLE [TENANT]

ARGUMENTS
  EXPRESSION  expression to calculate field
  FIELD       field name
  TABLE       table name
  TENANT      tenant name

See code: src/commands/transform-field.js