• Product Introduction
  • Quick Start
    • Agent Development
    • Importing a Git Repository
    • Starting From a Template
    • Direct Upload
    • Start with AI
  • Framework Guide
    • Agent
    • Frontends
      • Vite
      • React
      • Vue
      • Hugo
      • Other Frameworks
    • Backends
    • Full-stack
      • Next.js
      • Nuxt
      • Astro
      • React Router
      • SvelteKit
      • TanStack Start
      • Vike
    • Custom 404 Page
  • Project Guide
    • Project Management
    • edgeone.json
    • Configuring Cache
    • Building Output Configuration
    • Domain Management
      • Overview
      • Custom Domain
      • HTTPS Configuration
        • Overview
        • Apply for Free Certificate
        • Using Managed SSL Certificate
      • Configure DNS CNAME Record
    • Error Codes
  • Build Guide
  • Deployment Guide
    • Overview
    • Create Deploys
    • Manage Deploys
    • Deploy Button
    • Using Github Actions
    • Using Gitlab CI/CD
    • Using CNB Plugin
    • Using IDE PlugIn
    • Using CodeBuddy IDE
  • Makers for Platforms
    • Platform and Multi-Tenancy
    • Vibe Coding Solution
    • Template Example
      • Vibe Coding General Template
      • Vibe Coding Platform Template
  • Observability
    • Overview
    • Metric Analysis
    • Log Analysis
  • Functions
    • Overview
    • Edge Functions
    • Cloud Functions
      • Overview
      • Node.js
      • Python
      • Go
  • Agents
    • Overview
    • Quick Start
    • Conversation Management
    • Observability
    • Sandbox Tool
      • Overview
      • Using the Agent Framework
      • Sandbox Atomic API
      • Network Search Tool
    • Agent Authentication
  • Models
    • Overview
    • Models and Vendors
      • Overview
      • Using the Zhuque Model
      • Using the Jev Model
      • Using Vendor Keys
        • OpenAI
        • Anthropic
        • Google AI Studio
        • DeepSeek
        • MiniMax
        • Hunyuan
        • Zhipu
        • MoonShot AI
    • FAQs
  • Storage
    • Overview
    • KV
    • Blob
  • Middleware
  • AI-Native Development
    • Skills
    • MCP
    • Plugin
  • Copilot
    • Overview
    • Quick Start
  • API Token
  • EdgeOne CLI
  • Makers SDK
    • Overview
    • Examples
      • Creating a Deployment
      • Deploying via the CLI
      • Project Management
    • Projects
      • Project Operations
      • Environment Variable
    • Deployment
  • Message Notification
  • Integration Guide
    • AI
      • Makers Models Integration
      • Large Models for Images Integration
    • Database
      • Supabase Integration
      • Pages KV Integration
    • Ecommerce
      • Shopify Integration
      • WooCommerce Integration
    • Payment
      • Stripe Integration
      • Integrating Paddle
    • CMS
      • WordPress Integration
      • Contentful Integration
      • Sanity Integration
      • Payload Integration
    • Authentication
      • Supabase Integration
      • Clerk Integration
    • IM
      • Overview
      • WeCom
      • Feishu
      • DingTalk
      • Telegram
      • slack
      • Discord
  • Best Practices
    • Adding an AI Chat Assistant to a Website
    • AI Dialogue Deployment: Deploy Project with One Sentence Using Skill
    • Building Agent Applications Quickly with Makers Agents
    • Building an Ecommerce Platform with Shopify
    • Building a SaaS Site Using Supabase and Stripe
    • Building a Company Brand Site Quickly
    • How to Quickly Build a Blog Site
    • Quick Launch via Login-Free Deployment in WorkBuddy
  • Migration Guides
    • Migrating from Vercel to EdgeOne Makers
    • Migrating from Cloudflare Pages to EdgeOne Makers
    • Migrating from Netlify to EdgeOne Makers
  • Troubleshooting
  • FAQs
  • Limits
  • Pricing
  • Contact Us
  • Release Notes

Environment Variable

This chapter describes the methods for listing, writing, and deleting environment variables on makers.projects.
Environment variables apply to the entire project and are not split between production and preview environments. deployments.deploy does not accept environment variables. You can write them together through initialEnvVars/initial_env_vars when creating a project.

Data Model

projects.listEnvs / projects.list_envs returns an environment variable object. projects.setEnvs / projects.set_envs and projects.deleteEnvs / projects.delete_envs have no return value.
Field
Type
Required
Description
key
string/str
Yes
Variable Name
value
string/str
Yes
Variable value.
comment
string/str
No
Remarks

projects.listEnvs / projects.list_envs

List all environment variables of the project.
Parameter
Parameter
Type
Required
Description
projectId/project_id
string/str
Yes
Project ID
Return Value
Promise<EnvVar[]>/list[dict]

Examples
Typescript
Python
const envVars = await makers.projects.listEnvs({
projectId: "your-project-id",
});

for (const envVar of envVars) {
console.log(envVar.key, envVar.comment);
}
env_vars = makers.projects.list_envs(project_id="your-project-id")

for env_var in env_vars:
print(env_var["key"], env_var.get("comment"))

projects.setEnvs / projects.set_envs

Existing variable names will be overwritten, while variable names that are not passed in retain their original values. If duplicate variable names appear in the same batch of parameters, a ValidationError is thrown before the request is sent.
Parameter
Parameter
Type
Required
Description
projectId/project_id
string/str
Yes
Project ID
envVars/env_vars
EnvVar[]/list[dict]
Yes
Variables to write, overwritten or added by variable name
Return Value
Promise<void>/None

Examples
Typescript
Python
await makers.projects.setEnvs({
projectId: "your-project-id",
envVars: [
{ key: "API_URL", value: "https://example.com", comment: "origin" },
],
});
makers.projects.set_envs(
project_id="your-project-id",
env_vars=[
{
"key": "API_URL",
"value": "https://example.com",
"comment": "origin",
},
],
)

projects.deleteEnvs / projects.delete_envs

If duplicate items appear in keys, a ValidationError is thrown before the request is sent.
Parameter
Parameter
Type
Required
Description
projectId/project_id
string/str
Yes
Project ID
keys
string[]/list[str]
Yes
Variable names to delete
Return Value
Promise<void>/None

Examples
Typescript
Python
await makers.projects.deleteEnvs({
projectId: "your-project-id",
keys: ["API_URL"],
});
makers.projects.delete_envs(
project_id="your-project-id",
keys=["API_URL"],
)


ai-agent