Enclavely Docs
Getting Started

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 enclavely

Or with your preferred package manager:

# yarn
yarn global add enclavely

# pnpm
pnpm add -g enclavely

Verify the installation succeeded:

enclavely --version

Authenticate

Connect the CLI to your Enclavely account:

enclavely auth login --token <your-api-key> --api-url https://your-enclavely-instance.com
FlagDescription
--tokenYour API key, generated from the Enclavely dashboard under Settings > API Keys
--api-urlBase 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.json

This 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 list

If 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-service

You 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 development

You can create additional environments as needed:

enclavely env create my-service dev
enclavely env create my-service qa

Start 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 code

The enclavely.yaml file is the primary configuration for builds and deploys. See the Configuration reference for the full schema.

Next steps

On this page