
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
@serverless/cli
Advanced tools
The Serverless CLI is a lightweight tool for developing, testing and deploying your serverless apps.
Install the Serverless CLI with the following command:
npm install -g @serverless/cli
Run the CLI with the following command to initialize the Serverless Session:
serverless
Initialize a new app with the init command
init
Just follow the wizard to get started!
See the list of supported commands by running:
help
Even though you can start using the CLI without setting up your config, the usage will be limited to some commands. To get the full functionality you need to setup your config, specially your provider credentials.
Create a .serverlessrc file in the root of your app that looks like this:
{
"deployConfig": {
"regions": [ "us-east-1" ],
"aws": {
"accessKeyId": "abc",
"secretAccessKey": "abc",
"role": "arn:aws:iam::123:role/abc", => a role that your functions will assume
"sessionToken": null
},
"gateway": {
"url": "http://localhost:4000",
"configurationUrl": "http://localhost:4001"
}
}
}
This .serverlessrc is gitignored by default. You can also move this deployConfig object into the
global configuration in ~/.serverlessrc. This would be used by any app that does not have a local
config. You can use the config commands below to make things easier.
Clone the repo:
git clone https://github.com/serverless/cli.git
Install dependencies:
npm install
build/watch the CLI code base with the following command:
npm run watch
Serverless has dev, staging, and production environments
You can change the URLs for login by setting process.env.STAGE to another stage value. Default stage is dev.
export STAGE=staging
In another terminal window, navigate to one of the example apps:
cd examples/appA
and run/test the CLI:
serverless
Make sure you add a .serverlessrc file to the example app you're working on with your required
config. See the setup section for more info.
npm install && npm run watchnpm linknpm link @serverless/sdk then npm run watchnode dist/bin.jsYou can either run commands directly prefixed with serverless (for example serverless deploy),
or from within a session that you've already run with just the serverless command.
Here's the list of all the supported commands:
sls init
initializes a project & serverless component
template - (t) template to bootstrap your app.
Available templates: aws-nodejs
path - (p) path to place your app in
description - (d) description of your app.
version - (v) version of the app.
sls create
creates an app
template - (t) template to bootstrap your app.
Available templates: aws-nodejs
path - (p) path to place your app in
description - (d) description of your app.
version - (v) version of the app.
sls login
logs into your Serverless Platform account
sls logout
logs out of your Serverless Platform account
sls config
configures the cli
sls config set
adds a config key/value
sls config get
gets a config value by key
sls config delete
deletes a config
sls pack
packages output directory.
outputDir - (o) packages output directory.
sls push
pushes your application
sls deploy
deploys your application
sls invoke
invokes a function
data - (d) invocation data.
sls emit
emits an event
data - (d) event data.
sls emit
emits an event
data - (d) event data.
sls rollback
rolls back your application to a previous version
sls remove
removes your application
FAQs
Serverless Components CLI
The npm package @serverless/cli receives a total of 49,196 weekly downloads. As such, @serverless/cli popularity was classified as popular.
We found that @serverless/cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.