Installation
Install the Enclavely CLI, authenticate, and create your first project and environment.
This guide covers installing the Enclavely CLI, authenticating with your Enclavely instance, and setting up your first project.
Install the CLI
Install the Enclavely CLI globally using npm:
npm install -g enclavelyOr with your preferred package manager:
# yarn
yarn global add enclavely
# pnpm
pnpm add -g enclavelyVerify the installation succeeded:
enclavely --versionAuthenticate
Connect the CLI to your Enclavely account:
enclavely auth login --token <your-api-key> --api-url https://your-enclavely-instance.com| Flag | Description |
|---|---|
--token | Your API key, generated from the Enclavely dashboard under Settings > API Keys |
--api-url | Base URL of your Enclavely workspace (for example https://dev.enclavely.com) |
If you omit the flags, the CLI will prompt you interactively for your token and instance URL.
Where credentials are stored
After authentication, your credentials and CLI configuration are saved to:
~/.config/enclavely/config.jsonThis file contains your API key and instance URL. It is read automatically by all subsequent CLI commands.
Keep your config.json file secure. It contains your API key which grants access to your Enclavely resources. Do not commit it to version control.
Verify your connection
Confirm that the CLI can reach your Enclavely instance and that your credentials are valid:
enclavely project listIf authentication is successful, this returns your list of projects (or an empty list if you have not created any yet).
Create your first project
A project in Enclavely represents one deployed service. Create one with:
enclavely project create my-serviceYou can also create projects from the dashboard.
Create an environment
Each project needs at least one environment to deploy to. Environments are user-defined isolated deploy targets such as dev, qa, prod-eu, or customer-a.
Create a development environment for your project:
enclavely env create my-service developmentYou can create additional environments as needed:
enclavely env create my-service dev
enclavely env create my-service qaStart with one environment (for example dev), then add others as your workflow requires.
Project structure
After running enclavely init in your service directory, you will have the following layout:
my-service/
Dockerfile # Your runtime image
enclavely.yaml # Enclavely service configuration
src/
... # Your application source codeThe enclavely.yaml file is the primary configuration for builds and deploys. See the Configuration reference for the full schema.
Next steps
- Configuration — configure
enclavely.yaml - Quick Start — end-to-end walkthrough from install to deploy