❯envpilot
featurespricing❯docsblogchangelogwishlistfaq
sign-inget-started
// documentation
Start Here
  • Quickstart
  • Core concepts
  • Architecture: the machine surfaces
Platform
  • Data model
  • Variables
  • Secret files
  • Shared Accounts
  • Secret Sharing Links
  • Diagrams in documentation
  • Sharing documentation
  • Roles & permissions
  • Requests & approvals
  • Rotation & expiry
  • Security
Plans & Limits
  • Plans & Limits
  • Rate limits
CLI
  • CLI overview
  • Authentication & accounts
  • Linking projects
  • Pull & push
  • Running commands with secrets
  • Single secrets
  • Requests
  • Secret files
  • Command reference
  • CLI in CI & troubleshooting
VS Code
  • VS Code overview
  • Linking & sync
  • Protection
  • Editor features
  • Commands
  • Settings
  • Troubleshooting
GitHub Action
  • GitHub Action overview
  • Inputs & outputs
  • Secret files in CI
  • Recipes
  • Action security
Docker
  • Docker overview
  • Build time
  • Runtime
  • Docker Compose
  • Docker reference
API Reference
  • API overview
  • API Quickstart
  • Authentication
  • Errors
  • Organization
  • Projects
  • Variables
  • Shared accounts
  • Secret files
MCP Server
  • MCP overview
  • MCP setup
  • Connecting a client
  • Tools
  • Agent requests
Web Dashboard
  • Dashboard overview
  • Working in a project
  • Organization administration
Integrations
  • Slack & Discord Notifications
Guides
  • How to Share Environment Variables Securely
  • Next.js Environment Variables Best Practices
  • Android keystore in CI
  • Giving an agent secrets safely

// resources

  • github
  • npm
  • vs code marketplace
Start HerePlatformPlans & LimitsCLIVS CodeGitHub ActionDockerAPI ReferenceMCP ServerWeb DashboardIntegrationsGuides
❯envpilot

Encrypted environment variables for teams that live in the terminal. No .env files, no secrets in Slack.

$npm install -g @envpilot/cli

// product

  • Features
  • Pricing
  • Changelog
  • Wishlist

// resources

  • Getting Started
  • CLI Reference
  • VS Code Extension
  • Security

// compare

  • vs Doppler
  • vs Infisical
  • vs .env files

// support

  • FAQ
  • Support
  • Contact
  • Docs
  • Status

// legal

  • Privacy Policy
  • Terms of Service

© 2026 Envpilot · Built at Syntax Lab Technology · Abdul Rafay

ENVPILOT

❯envpilot
featurespricing❯docsblogchangelogwishlistfaq
sign-inget-started
// documentation
Start Here
  • Quickstart
  • Core concepts
  • Architecture: the machine surfaces
Platform
  • Data model
  • Variables
  • Secret files
  • Shared Accounts
  • Secret Sharing Links
  • Diagrams in documentation
  • Sharing documentation
  • Roles & permissions
  • Requests & approvals
  • Rotation & expiry
  • Security
Plans & Limits
  • Plans & Limits
  • Rate limits
CLI
  • CLI overview
  • Authentication & accounts
  • Linking projects
  • Pull & push
  • Running commands with secrets
  • Single secrets
  • Requests
  • Secret files
  • Command reference
  • CLI in CI & troubleshooting
VS Code
  • VS Code overview
  • Linking & sync
  • Protection
  • Editor features
  • Commands
  • Settings
  • Troubleshooting
GitHub Action
  • GitHub Action overview
  • Inputs & outputs
  • Secret files in CI
  • Recipes
  • Action security
Docker
  • Docker overview
  • Build time
  • Runtime
  • Docker Compose
  • Docker reference
API Reference
  • API overview
  • API Quickstart
  • Authentication
  • Errors
  • Organization
  • Projects
  • Variables
  • Shared accounts
  • Secret files
MCP Server
  • MCP overview
  • MCP setup
  • Connecting a client
  • Tools
  • Agent requests
Web Dashboard
  • Dashboard overview
  • Working in a project
  • Organization administration
Integrations
  • Slack & Discord Notifications
Guides
  • How to Share Environment Variables Securely
  • Next.js Environment Variables Best Practices
  • Android keystore in CI
  • Giving an agent secrets safely

// resources

  • github
  • npm
  • vs code marketplace
Start HerePlatformPlans & LimitsCLIVS CodeGitHub ActionDockerAPI ReferenceMCP ServerWeb DashboardIntegrationsGuides
❯envpilot

Encrypted environment variables for teams that live in the terminal. No .env files, no secrets in Slack.

$npm install -g @envpilot/cli

// product

  • Features
  • Pricing
  • Changelog
  • Wishlist

// resources

  • Getting Started
  • CLI Reference
  • VS Code Extension
  • Security

// compare

  • vs Doppler
  • vs Infisical
  • vs .env files

// support

  • FAQ
  • Support
  • Contact
  • Docs
  • Status

// legal

  • Privacy Policy
  • Terms of Service

© 2026 Envpilot · Built at Syntax Lab Technology · Abdul Rafay

ENVPILOT

// documentation
Start Here
  • Quickstart
  • Core concepts
  • Architecture: the machine surfaces
Platform
  • Data model
  • Variables
  • Secret files
  • Shared Accounts
  • Secret Sharing Links
  • Diagrams in documentation
  • Sharing documentation
  • Roles & permissions
  • Requests & approvals
  • Rotation & expiry
  • Security
Plans & Limits
  • Plans & Limits
  • Rate limits
CLI
  • CLI overview
  • Authentication & accounts
  • Linking projects
  • Pull & push
  • Running commands with secrets
  • Single secrets
  • Requests
  • Secret files
  • Command reference
  • CLI in CI & troubleshooting
VS Code
  • VS Code overview
  • Linking & sync
  • Protection
  • Editor features
  • Commands
  • Settings
  • Troubleshooting
GitHub Action
  • GitHub Action overview
  • Inputs & outputs
  • Secret files in CI
  • Recipes
  • Action security
Docker
  • Docker overview
  • Build time
  • Runtime
  • Docker Compose
  • Docker reference
API Reference
  • API overview
  • API Quickstart
  • Authentication
  • Errors
  • Organization
  • Projects
  • Variables
  • Shared accounts
  • Secret files
MCP Server
  • MCP overview
  • MCP setup
  • Connecting a client
  • Tools
  • Agent requests
Web Dashboard
  • Dashboard overview
  • Working in a project
  • Organization administration
Integrations
  • Slack & Discord Notifications
Guides
  • How to Share Environment Variables Securely
  • Next.js Environment Variables Best Practices
  • Android keystore in CI
  • Giving an agent secrets safely

// resources

  • github
  • npm
  • vs code marketplace
Start HerePlatformPlans & LimitsCLIVS CodeGitHub ActionDockerAPI ReferenceMCP ServerWeb DashboardIntegrationsGuides
Docker overviewBuild timeRuntimeDocker ComposeDocker reference
docs/Docker

Build time

Secrets available while docker build runs, with nothing left in a layer.

open in claudeopen in chatgptopen in cursor

Build time

Use this when the build itself needs a credential: installing from a private registry, compiling against a licensed SDK, running a migration, signing an artifact.

The rule for all of it: the values must not survive into the image. Two BuildKit features do that for you.

  • --mount=type=secret puts the API key in the build without it entering image history.
  • --mount=from= mounts the Envpilot binary for one instruction, so it never becomes a layer either.

Variables#

❯dockerfile
# syntax=docker/dockerfile:1
FROM node:22-alpine
WORKDIR /app
COPY package.json package-lock.json ./
 
RUN --mount=type=secret,id=envpilot_token \
    --mount=from=ghcr.io/rafay99-epic/envpilot:1,source=/envpilot,target=/envpilot \
    ENVPILOT_TOKEN_FILE=/run/secrets/envpilot_token \
    /envpilot exec --project checkout-api --env production -- npm ci
 
COPY . .
RUN npm run build

Build it with the key passed as a secret:

❯terminal
docker build --secret id=envpilot_token,src=./.envpilot-token .

npm ci sees NPM_TOKEN (or whatever your project stores) in its environment. The next layer does not.

The # syntax=docker/dockerfile:1 line is required — it opts the build into BuildKit's mount syntax.

Secret files#

Same shape. The difference is that files land on the filesystem, so delete them in the same RUN instruction. A file removed in a later instruction is still recoverable from the earlier layer.

❯dockerfile
RUN --mount=type=secret,id=envpilot_token \
    --mount=from=ghcr.io/rafay99-epic/envpilot:1,source=/envpilot,target=/envpilot \
    ENVPILOT_TOKEN_FILE=/run/secrets/envpilot_token \
    /envpilot files --project mobile --env production --dir /build \
 && ./gradlew assembleRelease \
 && rm -rf /build/*.jks

The key needs the files resource, which is never granted by default.

Both at once#

exec --files writes the secret files, then runs your command with the variables injected:

❯dockerfile
RUN --mount=type=secret,id=envpilot_token \
    --mount=from=ghcr.io/rafay99-epic/envpilot:1,source=/envpilot,target=/envpilot \
    ENVPILOT_TOKEN_FILE=/run/secrets/envpilot_token \
    /envpilot exec --project mobile --env production --files --dir /build \
      -- ./gradlew assembleRelease \
 && rm -rf /build/*.jks

A dotenv file for a later step#

When a build tool insists on reading a file rather than the environment, write one and remove it in the same instruction:

❯dockerfile
RUN --mount=type=secret,id=envpilot_token \
    --mount=from=ghcr.io/rafay99-epic/envpilot:1,source=/envpilot,target=/envpilot \
    ENVPILOT_TOKEN_FILE=/run/secrets/envpilot_token \
    /envpilot pull --project web --env production --out .env.production \
 && npm run build \
 && rm -f .env.production

pull --out writes at mode 0600.

Getting the key to the build#

In CI you usually already have it in a secret store. Feed it in without ever writing it to the workspace:

❯terminal
# GitHub Actions
docker build --secret id=envpilot_token,env=ENVPILOT_TOKEN .
❯terminal
# Locally, from a file you keep out of git
echo ".envpilot-token" >> .gitignore
docker build --secret id=envpilot_token,src=./.envpilot-token .

Compose reads the same secrets in a build: block — see Docker Compose.

What not to do#

Never bake the key in

Never put the key in an ARG or an ENV. Build arguments are stored in image history and travel to everyone who pulls the image. docker history --no-trunc <image> will show it.

❯dockerfile
# Wrong — the key is now permanently in the image
ARG ENVPILOT_TOKEN
RUN /envpilot pull --out .env
❯dockerfile
# Wrong — .env is baked into this layer forever, even if a later RUN deletes it
RUN --mount=type=secret,id=envpilot_token /envpilot pull --out .env
RUN npm run build
RUN rm .env

Keep the fetch, the use, and the cleanup inside one RUN.

Caching#

BuildKit caches a RUN layer on its instruction text, not on what the secret contained. A rotated variable will not invalidate the cache on its own. If a build must always see current values, either bust it explicitly or move the fetch to runtime, which is the better answer for anything that is not needed to produce the artifact.

Troubleshooting#

What you seeWhat it means
--mount option is not supportedBuildKit is off. Add # syntax=docker/dockerfile:1 and set DOCKER_BUILDKIT=1.
ENVPILOT_TOKEN_FILE points at … which could not be readThe --secret id= name does not match the path. The default mount is /run/secrets/<id>.
no such file or directory: /envpilotThe --mount=from= line is missing, or source=/target= do not match.
A 403 naming the environmentThe key is not scoped to that environment.
A 403 mentioning ProThe org is not on a plan that includes the public API.

Every exit code is listed in the reference.

← dockerDocker overview
docker →Runtime

// on this page

  • Variables
  • Secret files
  • Both at once
  • A dotenv file for a later step
  • Getting the key to the build
  • What not to do
  • Caching
  • Troubleshooting