Installation
Install the CLI, add the decorators package, and point laranja at a cloud account using the credentials already on your machine. Nothing is uploaded to laranja beyond the deployment template it synthesizes for you.
Prerequisites
Whichever cloud you target:
- Node.js 22 or newer. Deployed functions run on the Node.js 22 runtime, and the CLI targets the same.
- A laranja account + API key. laranja synthesizes your deployment template on
its server, so
plan,deploy, andejectneed an API key (created in the dashboard) and a project to link to. You connect both by runninglaranja init— see the Quickstart. - An account with the cloud you're deploying to, and credentials for it on that cloud's standard chain (below).
AWS (the default)
- Credentials on the standard AWS chain — any of:
aws configure(a shared credentials file),- AWS SSO (
aws sso login), - environment variables (
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY/AWS_SESSION_TOKEN), - a named profile (set
profilein config).
- A region, from
regionin your config or theAWS_REGION/AWS_DEFAULT_REGIONenvironment variable.
You do not need to install the AWS CDK or the AWS CLI separately — the CDK toolkit is embedded in laranja.
Azure
- Credentials on the standard
DefaultAzureCredentialchain —az loginlocally, or a service principal viaAZURE_*env vars in CI. - A subscription and an already-existing resource group, set under
azurein your config.
You do not need Bicep, ARM templates, or the Azure Functions Core Tools. Full setup — including the resource providers to register — is in Deploying to Azure.
laranja deploy runs a preflight for whichever provider you're on and prints
the exact command to fix anything missing, so you find out before it touches the
cloud.
Install
Add the CLI as a dev dependency:
npm install -D @alzulejos/laranja
If you use decorators or function markers for jobs and queues, also install:
npm install @alzulejos/laranja-decorators
@alzulejos/laranja-decoratorsis a regular dependency (not dev-only) because your application imports@Cron,@Queue,rate, etc. at runtime.
First-time setup
On AWS, the first deploy to a given account + region runs a one-time
bootstrap that creates a small set of shared resources in your account (an
S3 asset bucket and a few IAM roles). laranja deploy detects this and prompts
you before doing it — see deploy.
On Azure there's no bootstrap; the resource group you point at is the only thing that has to exist up front.
Verify
npx laranja --help
You're ready for the Quickstart.
laranja