@shiftescape/astro-env-inspector
Dev toolbar panel that shows all your environment variables — grouped,
masked, and searchable — directly inside
astro dev. Active only in
development, zero production footprint.
features
No more grepping `.env` files or digging through terminal output.
Public, private, and Astro built-ins in separate sections for fast scanning.
Sensitive values hidden. Per-variable reveal toggle for safe screen sharing.
Warns when a PUBLIC_* var looks like it contains a
secret key or token.
Instantly spot variables your app expects but haven't been defined yet.
Filter by key or value in real time across all variable groups.
Completely stripped in astro build. Zero production
footprint, guaranteed.
configuration
Add it with no options — everything is detected automatically. Customise when you need to.
import { defineConfig } from 'astro/config' import envInspector from '@shiftescape/astro-env-inspector' export default defineConfig({ integrations: [ envInspector({ // extra patterns to always mask sensitivePatterns: ['MY_APP_SECRET', 'INTERNAL_*'], // hide Astro built-ins (MODE, DEV, PROD…) showAstroBuiltins: false, // start values revealed (not for shared screens) revealByDefault: false, }), ], })
| Option | Type | Default | Description |
|---|---|---|---|
| sensitivePatterns | string[] | [] |
Extra key patterns to mask. Supports
* suffix wildcard.
|
| showAstroBuiltins | boolean | true |
Show MODE,
DEV,
PROD,
SITE,
BASE_URL etc.
|
| revealByDefault | boolean | false | Start with all sensitive values unmasked. Not recommended for shared screens. |
install
Works with Astro 4, 5, and 6. No other dependencies required.
import envInspector from '@shiftescape/astro-env-inspector' export default defineConfig({ integrations: [envInspector()] // click 🔍 in the dev toolbar })