Skip to Content
ProvidersLocal development

Local development

The local provider makes declared resource values available to the application’s normal development command. It does not create infrastructure, deploy code, or run a development server.

There is no local-provider account or CLI to install.

Describe the local environment

bahama.yaml
environments: local: provider: local

By default, values go to .env.local. Your agent can choose another file inside the repository:

bahama.yaml
environments: local: provider: local config: envFile: .env.development.local

The provider preserves unrelated entries, adds the file to .gitignore, and sets restrictive file permissions. It rejects paths outside the project.

Bind only the values local code needs

bahama.yaml
bindings: DATABASE_URL: from: resources.database.connectionUrl to: environments.local.variables

If the source is secret, Bahama keeps it sealed until the local provider writes the file. Your agent does not need to reveal or copy the value.

After the infrastructure plan is applied, continue with the framework’s normal command:

npm run dev

bahama deploy local is never valid. Local is a configuration destination, not a host.

Secrets that do not come from a provider

Raw secret values cannot appear in bahama.yaml. If the application needs a third-party key that no selected provider produces, your agent can add a placeholder to the protected environment file:

.env.local
OPENAI_API_KEY=replace-with-your-key

Open the file and replace the placeholder yourself. Do not paste the value into the agent conversation.

Last updated on