Skip to main content

SDK Command-line Interface

warp is the name of our project SDK.

Install the SDK

To install the SDK 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

ArgumentDescriptionDefault
[e-mail]e-mailinteractive
[org]organization you want to log into (only available if you specified an e-mail)interactive

Options

OptionDescriptionDefault
-p, --password <password>passwordinteractive
--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

ArgumentDescription
[server-config...]path to one or multiple configuration file

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive
-o, --output <format>:<path>format (umd or node-module) and path of outputfrom server configuration file
--arg <key>=<value>set a config argument, repeatable
--forcecreate the given project if it doesn't exist

See output documentation here.

Build

Generate the client.

npx warp build [options] [server-config...]

Arguments

ArgumentDescription
[server-config...]path to one or multiple configuration file

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive
-o, --output <format>:<path>format (umd or node-module) and path of outputfrom server configuration file
--arg <key>=<value>set a config argument, repeatable
--forcecreate 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

ArgumentDescription
[server-config...]path to one or multiple configuration file

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive
--arg <key>=<value>set a config argument, repeatable
--forcecreate the given project if it doesn't exist
-p, --port <number>use custom port number3192, or from server configuration file

stop

Stop an emulator.

npx warp emulator stop [server-config...]

Arguments

ArgumentDescription
[server-config...]path to one or multiple configuration file

Options

OptionDescriptionDefault
--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

ArgumentDescription
[server-config...]path to one or multiple configuration file

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive
--name <name>deployment namerandomly generated
--env <name>environment nameselected environment or interactive
--arg <key>=<value>set a config argument, repeatable

Project

create

Create a project.

npx warp project create [name]

Arguments

ArgumentDescriptionDefault
[name]project nameinteractive

delete

Delete a project.

npx warp project delete [options] [name]

Arguments

ArgumentDescriptionDefault
[name]project nameinteractive

Options

OptionDescriptionDefault
--forcedelete the given project without confirmation

deselect

Remove the selected project.

npx warp project deselect

select

Select a project.

npx warp project select [name]

Arguments

ArgumentDescriptionDefault
[name]project nameinteractive

info

Print info on project.

npx warp project info [options]

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive

list

List projects.

npx warp project list

Environment

create

Create an environment.

npx warp env create [options] [name]

Arguments

ArgumentDescriptionDefault
[name]environment nameinteractive

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive

delete

Delete an environment.

npx warp env delete [options] [name]

Arguments

ArgumentDescriptionDefault
[name]environment nameinteractive

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive
--forcedelete the given environment without confirmation

deselect

Remove the selected environment.

npx warp env deselect

select

Select an environment.

npx warp env select [options] [name]

Arguments

ArgumentDescriptionDefault
[name]environment nameinteractive

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive

info

Print info on environment.

npx warp env info [options]

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive
--env <name>environment nameselected environment or interactive

list

List environments.

npx warp env list [options]

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive

base-url

add

Add a base URL for the environment

npx warp env base-url add [id] [hostname] [options]
Arguments
ArgumentDescriptionDefault
[id]base URL IDinteractive
[hostname]fully qualified hostname for base URLinteractive

Unless you customize it in the warp configuration, when deploying, the base URL IDs server for a server and hosting for a hosting will be used by default. See hosting and server configuration.

Options
OptionDescriptionDefault
--project <name>project nameselected project or interactive
--env <name>environment nameselected environment or interactive

auth

Manage authentication in your environment. By default, no authentication is required in an environment. See authorization documentation here

basic

See basic authentication here

add

Add an authorized user.

npx warp env auth basic add [user] [password] [options]
Arguments
ArgumentDescriptionDefault
[user]user nameinteractive
[password]passwordinteractive
Options
OptionDescriptionDefault
--project <name>project nameselected project or interactive
--env <name>environment nameselected environment or interactive
delete

Remove an authorized user.

npx warp env auth basic delete [user] [options]
Arguments
ArgumentDescriptionDefault
[user]user nameinteractive
Options
OptionDescriptionDefault
--project <name>project nameselected project or interactive
--env <name>environment nameselected environment or interactive

Deployment

info

Print info on deployment.

npx warp deployment info [name] [options]

Arguments

ArgumentDescriptionDefault
[name]deployment name<interactive>

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive
--env <name>environment nameselected environment or interactive

list

List deployments.

npx warp deployment list [options]

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive
--env <name>environment nameselected environment or interactive

logs

Print the logs of your deployed modules.

npx warp deployment logs [name] [options]

Arguments

ArgumentDescriptionDefault
[name]deployment name<interactive>

Options

OptionDescriptionDefault
--project <name>project nameselected project or interactive
--env <name>environment nameselected environment or interactive
--followmonitor the logs and display each logs as they are added
--timestampsshow the reception timestamps of the logs by warp
--runnershow runner name
--since <time>show logs from the given date or time
--until <time>show logs before the given date or time
--tail <number>only display the last number of lines
--level <levels>list of levels to display, separated by a comma
--no-colordisable color usage
--rawoutput raw log messages (without timestamps or level) to stdout or stderr according to their level

The --since and --until options takes either an ISO 8601 date, a UNIX timestamp (number of milliseconds elapsed since January 1, 1970 00:00:00 UTC), or a duration string.

The ISO 8061 date format corresponds to the YYYY-MM-DDTHH:mm:ss.sssZ format where:

  • YYYY is the year.
  • MM is the month of the year.
  • DD is the day of the month.
  • T indicates the beginning of the time element, and thus appears literally in the string.
  • HH indicates the number of hours, from 00 to 24.
  • mm indicates the number of minutes.
  • ss indicates the number of seconds.
  • sss indicates the number of milliseconds.
  • Z indicates the UTC offset representation specified as "Z" (for UTC with no offset) or an offset of either "+" or "-" followed by a time expression HH:mm (indicating local time ahead of or behind UTC, respectively).

See here for more information on the date format.

A duration string is a sequence of decimal numbers, each with optional fraction and a unit suffix. Valid time units are:

UnitDiminutive
millisecondsms
secondss or sec
minutesm or min
hoursh or hr
daysd
weeksw or wk
monthsnone

Version

Print version.

npx warp version