Features

Provider Import

Pull existing environment variables from external platforms into secr. Connect to Render, Vercel, Heroku, Netlify, Supabase, or Railway — preview what you'll get, then import with one click.

How It Works

  1. Connect — provide your provider API key and service/project identifier
  2. Preview — secr fetches all variables and shows them in a table
  3. Select — choose which variables to import (all selected by default)
  4. Import — selected variables are encrypted and stored as secr secrets
Security: Your provider credentials are used once to fetch variables, then immediately discarded. They are never stored in the database or written to logs.

Supported Providers

ProviderID FieldWhere to Find ItNotes
RenderService IDService settings page (srv-...)All env vars readable
VercelProject IDProject settings > GeneralSensitive vars show as empty
HerokuApp NameYour app's URL slugAll config vars readable
NetlifySite IDSite configuration > GeneralUses 'all' context, falls back to 'production'
SupabaseProject RefProject settings > GeneralAll secrets readable
RailwayProject IDProject settingsSealed vars show as ***

CLI Usage

Use secr import to import from a provider. Requires a linked project (.secr.json).

Basic usage
secr import --from <provider> --key <api-key> --service-id <id>

Examples

Render
secr import --from render \
  --key rnd_xxxxxxxxxxxx \
  --service-id srv-abc123def456
Vercel
secr import --from vercel \
  --key tok_xxxxxxxxxxxx \
  --service-id prj-abc123def456
Heroku
secr import --from heroku \
  --key h_xxxxxxxxxxxx \
  --service-id my-app-name
Netlify
secr import --from netlify \
  --key nfp_xxxxxxxxxxxx \
  --service-id abc123-def456-ghi789
Supabase
secr import --from supabase \
  --key sbp_xxxxxxxxxxxx \
  --service-id abcdefghijklmnop
Railway (with optional env & service scoping)
secr import --from railway \
  --key rw_xxxxxxxxxxxx \
  --service-id project-uuid \
  --railway-env env-uuid \
  --railway-service service-uuid
OptionRequiredDescription
--from <provider>YesProvider name: render, vercel, heroku, netlify, supabase, railway
--key <apiKey>YesProvider API key or access token
--service-id <id>YesProvider-specific service/project identifier
--env <environment>NoTarget environment (defaults to .secr.json setting)
--allNoImport all variables without confirmation prompt
--railway-env <id>NoRailway environment ID (Railway only)
--railway-service <id>NoRailway service ID (Railway only)

The CLI shows a preview table before importing. Use --all to skip the confirmation prompt (useful for CI scripts).

Dashboard Usage

  1. Navigate to your project's environment page
  2. Click “Import from Provider”
  3. Select your provider from the grid
  4. Enter your API key and service/project identifier
  5. Review the variable list — check or uncheck individual variables
  6. Click “Import”

Variables that the provider marks as sensitive or unreadable are shown but cannot be imported (they have no value). These are typically secrets that the provider encrypts and never exposes via API.

API Endpoints

Two endpoints power the import flow. Both require authentication and a verified email.

MethodPathDescription
POST/v1/import/previewTest connection and list available variables (no writes)
POST/v1/import/executeImport selected variables as encrypted secrets

Preview Request Body

POST /v1/import/preview
{
  "config": {
    "provider": "heroku",
    "apiKey": "your-api-key",
    "appName": "my-app"
  },
  "orgSlug": "my-org",
  "projectSlug": "my-project",
  "envSlug": "development"
}

Preview Response

200 OK
{
  "provider": "heroku",
  "vars": [
    { "key": "DATABASE_URL", "value": "postgres://...", "sensitive": false },
    { "key": "SECRET_KEY", "value": "", "sensitive": true }
  ],
  "count": 2,
  "skipped": 1
}

Execute Request Body

POST /v1/import/execute
{
  "config": {
    "provider": "heroku",
    "apiKey": "your-api-key",
    "appName": "my-app"
  },
  "orgSlug": "my-org",
  "projectSlug": "my-project",
  "envSlug": "development",
  "selectedKeys": ["DATABASE_URL"]
}

Execute Response

200 OK
{
  "created": 1,
  "updated": 0,
  "total": 1
}

Provider Config Shapes

The config object varies by provider. Each uses a discriminated union on the provider field.

Provider configs
// Render
{ "provider": "render", "apiKey": "...", "serviceId": "srv-..." }

// Vercel
{ "provider": "vercel", "apiKey": "...", "projectId": "prj-..." }

// Heroku
{ "provider": "heroku", "apiKey": "...", "appName": "my-app" }

// Netlify
{ "provider": "netlify", "apiKey": "...", "siteId": "..." }

// Supabase
{ "provider": "supabase", "apiKey": "...", "projectRef": "..." }

// Railway
{ "provider": "railway", "apiKey": "...", "projectId": "...",
  "environmentId": "...",   // optional
  "serviceId": "..."        // optional
}

Sensitive Variables

Some providers restrict access to certain variable values:

  • Vercel — variables of type sensitive return empty values
  • Railway — sealed variables return *** instead of the actual value

These variables appear in the preview with a “sensitive” label but cannot be imported since the provider does not expose the plaintext value. You'll need to set those manually.

Migrate your secrets in seconds

Stop copying environment variables by hand. Import them from your existing platform.