Guide
How to Import Secrets from Any Provider
Already have environment variables in Supabase, Vercel, Railway, or another platform? This guide walks you through finding your API tokens and project identifiers so you can import everything into secr in under a minute.
How It Works
Whether you use the dashboard or the CLI, importing follows three steps:
Connect
Enter your provider API key and project/service ID.
Preview
secr fetches all variables and shows you what's available.
Import
Select the variables you want and import them — encrypted and versioned.
Save Connections for Reuse
After importing, the dashboard offers to save your connection credentials (encrypted with KMS) so you don't need to re-enter them next time. Saved connections appear at the top of the import modal — click one to skip straight to the preview step.
About Sensitive Variables
Some providers restrict access to certain variable values. When this happens, secr shows a warning banner during the preview step. These variables appear in the list but can't be imported — you'll need to add them manually in secr.
| Provider | Sensitive Behavior |
|---|---|
| Vercel | Variables of type "sensitive" return empty values. Common for database passwords and API secrets. |
| Railway | Sealed variables return *** instead of the actual value. |
| Supabase | All variables are readable — no restrictions. |
| Render | All variables are readable — no restrictions. |
| Heroku | All config vars are readable — no restrictions. |
| Netlify | All variables are readable — no restrictions. |
Provider-by-Provider Walkthrough
Jump to your provider: Supabase · Vercel · Railway · Render · Heroku · Netlify
Supabase
Find Your API Token
- 1Go to app.supabase.com
Open the Supabase dashboard in your browser.
- 2Click your avatar in the top right
This opens the user menu.
- 3Click Account Preferences
Navigate to your account settings.
- 4Click Access Tokens
You'll see a list of your personal access tokens.
- 5Generate a new token
Give it a descriptive name like "secr import". Copy the token — you won't see it again.
Find Your Project Ref
- 1Open your project in Supabase
Select the project you want to import secrets from.
- 2Go to Project Settings
Click the gear icon in the sidebar.
- 3Under General, find Project ID
This is the short alphanumeric string (e.g. abcdefghijklmnop). This is your Project Ref.
Import via Dashboard
- Navigate to your project's environment page and click “Import from Provider”
- Select Supabase from the provider grid
- Paste your API token and Project Ref
- Review the variable list — uncheck any you don't want
- Click “Import”
- Optionally save the connection for next time
Import via CLI
secr import --from supabase \
--key sbp_your_access_token \
--service-id abcdefghijklmnopVercel
Find Your API Token
- 1Go to vercel.com/account/tokens
Or: click your avatar > Settings > Tokens.
- 2Click Create Token
Give it a name like "secr import" and set a scope (Full Account or specific team).
- 3Copy the token
This is your API key. Store it somewhere safe — Vercel only shows it once.
Find Your Project ID
- 1Open your project in Vercel
Select the project from your dashboard.
- 2Go to Settings > General
Scroll down to the Project ID section.
- 3Copy the Project ID
It looks like prj_abc123... or can be the project name slug.
Import via Dashboard
- Navigate to your project's environment page and click “Import from Provider”
- Select Vercel from the provider grid
- Paste your API token and Project ID
- Review the variable list — uncheck any you don't want
- Click “Import”
- Optionally save the connection for next time
Import via CLI
secr import --from vercel \
--key your_vercel_token \
--service-id prj_abc123Railway
Find Your API Token
- 1Go to railway.com/account/tokens
Or: click your avatar > Account Settings > Tokens.
- 2Create a new token
Name it "secr import" and copy it.
Find Your Project ID
- 1Open your project in Railway
Select the project from your dashboard.
- 2Go to Settings
Click the Settings tab at the top.
- 3Copy the Project ID
It's a UUID displayed under the project name.
Import via Dashboard
- Navigate to your project's environment page and click “Import from Provider”
- Select Railway from the provider grid
- Paste your API token and Project ID
- Review the variable list — uncheck any you don't want
- Click “Import”
- Optionally save the connection for next time
Import via CLI
secr import --from railway \
--key rw_your_api_token \
--service-id your-project-uuid
# Optionally scope to a specific environment and service:
secr import --from railway \
--key rw_your_api_token \
--service-id your-project-uuid \
--railway-env environment-uuid \
--railway-service service-uuidRender
Find Your API Token
- 1Go to dashboard.render.com/settings
Or: click your avatar > Account Settings.
- 2Scroll to API Keys
Click Create API Key.
- 3Copy the key
It starts with rnd_. This is your API key.
Find Your Service ID
- 1Open your service in Render
Select the web service, worker, or cron job.
- 2Check the URL
The Service ID is in the URL: dashboard.render.com/web/srv-abc123. It starts with srv-.
Import via Dashboard
- Navigate to your project's environment page and click “Import from Provider”
- Select Render from the provider grid
- Paste your API token and Service ID
- Review the variable list — uncheck any you don't want
- Click “Import”
- Optionally save the connection for next time
Import via CLI
secr import --from render \
--key rnd_your_api_key \
--service-id srv-abc123def456Heroku
Find Your API Token
- 1Go to dashboard.heroku.com/account
Scroll to the API Key section.
- 2Click Reveal or Regenerate
Copy your API key.
Find Your App Name
- 1Find your app name
It's the URL slug of your app: my-app-name.herokuapp.com → my-app-name.
Import via Dashboard
- Navigate to your project's environment page and click “Import from Provider”
- Select Heroku from the provider grid
- Paste your API token and App Name
- Review the variable list — uncheck any you don't want
- Click “Import”
- Optionally save the connection for next time
Import via CLI
secr import --from heroku \
--key your_heroku_api_key \
--service-id my-app-nameNetlify
Find Your API Token
- 1Go to app.netlify.com/user/applications
Or: User Settings > Applications > Personal access tokens.
- 2Create a new token
Name it "secr import" and copy it.
Find Your Site ID
- 1Open your site in Netlify
Select the site from your dashboard.
- 2Go to Site configuration > General
The Site ID is listed under Site information.
Import via Dashboard
- Navigate to your project's environment page and click “Import from Provider”
- Select Netlify from the provider grid
- Paste your API token and Site ID
- Review the variable list — uncheck any you don't want
- Click “Import”
- Optionally save the connection for next time
Import via CLI
secr import --from netlify \
--key nfp_your_access_token \
--service-id abc123-def456-ghi789Tips
- Import into the right environment. Make sure you're on the correct environment tab (development, staging, production) before importing.
- Existing keys get updated, not duplicated. If a key already exists in secr, importing it again will create a new version (with the old value preserved in history).
- Save your connection. After importing, save the connection to skip credential entry next time. Useful if you import from the same provider regularly.
- Rotate provider tokens after import. If you created a one-time token just for this import, revoke it in the provider's settings once you're done.
- Use templates to catch missing vars. After importing, run
secr template validateto make sure you haven't missed any required variables.
Migrate your secrets in under a minute
Stop copying environment variables by hand. Connect your provider and import everything in one click.