Skip to content

Languages

getmyenv works with every language that reads environment variables: Node, Python, Ruby, Rust, Go, PHP and more. Same run command. No SDK.

Last updated: 2026-10-05

No SDK

Values are set as environment variables before your process starts. Any language that reads the environment works.

Documented

Node, Python, Ruby, Rust, Go, and PHP below. Also works: Java, .NET, shell.

Node

npx getmyenv run -- npm run dev
js
const key = process.env.OPENAI_API_KEY;

Python

npx getmyenv run -- python app.py
python
import os key = os.environ["OPENAI_API_KEY"]

Ruby

npx getmyenv run -- ruby app.rb
ruby
key = ENV["OPENAI_API_KEY"]

Rust

npx getmyenv run -- cargo run
rust
let key = std::env::var("OPENAI_API_KEY").expect("missing");

Go

npx getmyenv run -- go run .
go
key := os.Getenv("OPENAI_API_KEY")

PHP

npx getmyenv run -- php app.php
php
$key = getenv('OPENAI_API_KEY');

Also works

Java, .NET, and shell scripts read the same environment variables. Wrap the start command with npx getmyenv run --.

npx getmyenv run -- java -jar app.jar
npx getmyenv run -- dotnet run
npx getmyenv run -- ./start.sh

Containers: /docs/docker.

Frameworks and tools

Wrap the command that starts or builds the app. The tool reads the variables from its environment, as it would from a shell.

Next.js: NEXT_PUBLIC_ names are inlined at build time, so run the build under getmyenv too.

npx getmyenv run -- next dev
npx getmyenv run production -- next build

Vite: VITE_ names already in the environment reach import.meta.env.

npx getmyenv run -- vite
npx getmyenv run production -- vite build

Laravel: real environment variables win over .env. If you cache config, run config:cache under getmyenv too.

npx getmyenv run -- php artisan serve
npx getmyenv run production -- php artisan config:cache

Rails and Kamal: Rails reads ENV. Kamal reads secrets from .kamal/secrets, which can take them from the environment, like DATABASE_URL=$DATABASE_URL.

npx getmyenv run -- bin/rails server
npx getmyenv run production -- kamal deploy

Prisma: the CLI reads DATABASE_URL from the environment.

npx getmyenv run production -- npx prisma migrate deploy

Turborepo: in strict env mode, list the names in env or passThroughEnv in turbo.json so tasks receive them.

npx getmyenv run -- turbo run dev

PM2 and systemd: start the process manager command under getmyenv. After a change, restart PM2 with --update-env. With systemd, put the same command in ExecStart.

npx getmyenv run production -- pm2 start ecosystem.config.js
npx getmyenv run production -- pm2 restart app --update-env