WarpJS Command-line Interface
Install the CLI
To install the CLI, open your terminal in a Node.js project and install with npm:
npm install warp
or to install it globally:
npm install -g warp
Alternatively you can launch a command without installing warp, by using npx:
npx warp [command]
Interactivity
The CLI is interactive by default. If a mandatory option is missing, then you will be asked to input its value. You will also be asked confirmation before some operations.
The --force
option disable the interactivity. With this option, project or environment will be automatically created with the given name if the don't exist.
In a non interactive shell, a command might fail without the --force
option if all projects and environments specified doesn't exists.
Server configuration
Options can also be omitted if you use a server configuration file.
The CLI overrides values from a server configuration file.
See documentation here.
All relative paths from the CLI are relative to the directory the command was launched in.
Help
To get a list of commands, run:
npx warp help
npx warp -h
To get details about a command's options, run:
npx warp help [command]
npx warp <command> -h
Login
login
Log into your ScaleDynamics account.
npx warp login [e-mail] [org]
Create an account on your ScaleDynamics Console.
Arguments
Argument | Description | Default |
---|---|---|
[e-mail] | interactive | |
[org] | organization you want to log into (only available if you specified an e-mail) | interactive |
Options
Option | Description | Default |
---|---|---|
-p, --password <password> | password | interactive |
--api-key <api-key> | api-key |
Warning Useful if you want to use a CI/CD but be careful, the password can be read in plain text in different systems.
logout
Log out of your ScaleDynamics account.
npx warp logout
whoami
Print your credential info.
npx warp whoami
Dev
Build project, launch emulator and watch for changes in your project.
npx warp dev [options] [server-config...]
Arguments
Argument | Description |
---|---|
[server-config...] | path to one or multiple configuration file |
Options
Option | Description | Default |
---|---|---|
--project <name> | project name | selected project or interactive |
-o, --output <format>:<path> | format (umd or node-module ) and path of output | from server configuration file |
--arg <key>=<value> | set a config argument, repeatable | |
--force | create the given project if it doesn't exist |
See output documentation here.
Build
Generate the client.
npx warp build [options] [server-config...]
Arguments
Argument | Description |
---|---|
[server-config...] | path to one or multiple configuration file |
Options
Option | Description | Default |
---|---|---|
--project <name> | project name | selected project or interactive |
-o, --output <format>:<path> | format (umd or node-module ) and path of output | from server configuration file |
--arg <key>=<value> | set a config argument, repeatable | |
--force | create the given project if it doesn't exist |
See output documentation here.
Emulator
run
Launch an emulator.
npx warp emulator run [options] [server-config...]
Arguments
Argument | Description |
---|---|
[server-config...] | path to one or multiple configuration file |
Options
Option | Description | Default |
---|---|---|
--project <name> | project name | selected project or interactive |
--arg <key>=<value> | set a config argument, repeatable | |
--force | create the given project if it doesn't exist | |
-p, --port <number> | use custom port number | 3192 , or from server configuration file |
stop
Stop an emulator.
npx warp emulator stop [server-config...]
Arguments
Argument | Description |
---|---|
[server-config...] | path to one or multiple configuration file |
Options
Option | Description | Default |
---|---|---|
--arg <key>=<value> | set a config argument, repeatable |
Deploy
Deploy the serverless functions and assets of your project.
npx warp deploy [options] [server-config...]
Arguments
Argument | Description |
---|---|
[server-config...] | path to one or multiple configuration file |
Options
Option | Description | Default |
---|---|---|
--project <name> | project name | selected project or interactive |
--name <name> | deployment name | randomly generated |
--env <name> | environment name | selected environment or interactive |
--arg <key>=<value> | set a config argument, repeatable | |
--force | create the given project and environment if they don't exist |
Project
create
Create a project.
npx warp project create [name]
Arguments
Argument | Description | Default |
---|---|---|
[name] | project name | interactive |
delete
Delete a project.
npx warp project delete [name]
Arguments
Argument | Description | Default |
---|---|---|
[name] | project name | interactive |
deselect
Remove the selected project.
npx warp project deselect
select
Select a project.
npx warp project select [name]
Arguments
Argument | Description | Default |
---|---|---|
[name] | project name | interactive |
info
Print info on project.
npx warp project info [options]
Options
Option | Description | Default |
---|---|---|
--project <name> | project name | selected project or interactive |
list
List projects.
npx warp project list
Environment
create
Create an environment.
npx warp env create [options] [name]
Arguments
Argument | Description | Default |
---|---|---|
[name] | environment name | interactive |
Options
Option | Description | Default |
---|---|---|
--project <name> | project name | selected project or interactive |
delete
Delete an environment.
npx warp env delete [options] [name]
Arguments
Argument | Description | Default |
---|---|---|
[name] | environment name | interactive |
Options
Option | Description | Default |
---|---|---|
--project <name> | project name | selected project or interactive |
--hostname <fully-qualified-hostname> | fully qualified hostname for hosting URL | interactive |
deselect
Remove the selected environment.
npx warp env deselect
select
Select an environment.
npx warp env select [options] [name]
Arguments
Argument | Description | Default |
---|---|---|
[name] | environment name | interactive |
Options
Option | Description | Default |
---|---|---|
--project <name> | project name | selected project or interactive |
info
Print info on environment.
npx warp env info [options]
Options
Option | Description | Default |
---|---|---|
--project <name> | project name | selected project or interactive |
--env <name> | environment name | selected environment or interactive |
list
List environments.
npx warp env list [options]
Options
Option | Description | Default |
---|---|---|
--project <name> | project name | selected project or interactive |
Deployment
info
Print info on deployment.
npx warp deployment info [name] [options]
Arguments
Argument | Description | Default |
---|---|---|
[name] | deployment name | <interactive> |
Options
Option | Description | Default |
---|---|---|
--project <name> | project name | selected project or interactive |
--env <name> | environment name | selected environment or interactive |
list
List deployments.
npx warp deployment list [options]
Options
Option | Description | Default |
---|---|---|
--project <name> | project name | selected project or interactive |
--env <name> | environment name | selected environment or interactive |
Version
Print version.
npx warp version