@buoy-gg/env
v7.0.40
Published
Environment variable inspector for React Native with runtime-visible values, required-variable checks, and type validation.
Downloads
10,885
Maintainers
Readme
@buoy-gg/env
Inspect the environment values available to your app at runtime and check required variables against expected types and values.
Part of Buoy. Install the package, complete account setup, and follow the integration steps below.
Install
npm install @buoy-gg/core @buoy-gg/envBefore you start
Use a development build with @buoy-gg/core and a Free or Pro Buoy account key. From your app’s directory, sign in:
npx --package=@buoy-gg/core buoy loginFor Expo, initialize Buoy before rendering the menu:
import { Buoy } from "@buoy-gg/core";
Buoy.init({ licenseKey: process.env.EXPO_PUBLIC_BUOY_KEY });The login command writes the Expo key to .env.local. For React Native CLI, pass the key from your app’s environment configuration; React Native does not load .env.local automatically. Mount FloatingDevTools inside the same providers as your screens and restart the development server after installation. The Quick Start shows the complete root component setup.
Quick start
After initialization, render the menu in your app root:
import { FloatingDevTools } from "@buoy-gg/core";
export default function App() {
return (
<>
{/* your app */}
<FloatingDevTools />
</>
);
}To validate required variables, build the tool with createEnvTool and the fluent envVar builder, then pass it via apps={[...]}:
import { createEnvTool, envVar } from "@buoy-gg/env";
const envTool = createEnvTool({
requiredEnvVars: [
envVar("EXPO_PUBLIC_API_URL").exists(),
envVar("EXPO_PUBLIC_DEBUG_MODE").withType("boolean").build(),
envVar("EXPO_PUBLIC_ENVIRONMENT").withValue("development").build(),
envVar("EXPO_PUBLIC_MAX_RETRIES")
.withType("number")
.withDescription("Maximum API retry attempts")
.build(),
],
});
// Render this menu inside your existing app root.
<FloatingDevTools apps={[envTool]} />;Check the integration
Open Env and check one known variable and one deliberately missing required variable. Expo statically replaces direct process.env.EXPO_PUBLIC_NAME references; enumerating process.env does not guarantee that those values are available. An empty list does not prove your app has no environment configuration.
What you get
- Runtime discovery — collects enumerable
EXPO_PUBLIC_values available at runtime. Expo’s static inlining limits what enumeration can see. - Required-variable validation — declare which vars must exist, with expected values or types:
string,number,boolean,array,object,url. - Type detection — values are auto-classified (string, number, boolean, array, object, url, json).
- Health score — a 0-100% health percentage with HEALTHY / WARNING / ERROR / CRITICAL states, plus counts for total, required, missing, and wrong value/type.
- Per-variable status — green (present and correct), yellow (wrong value or type), red (required but missing).
- Search and filters — real-time search plus "All", "Missing", and "Issues" filters.
- Copy to clipboard — copy any value with one tap.
Desktop & AI
To connect a React Native app to Buoy Desktop or MCP, install @buoy-gg/external-sync and follow the Desktop connection guide. Sign in to Desktop separately. MCP setup also requires a process account and Pro access. Available remote actions depend on the tool and app integration.
Account and plan requirements
Use a Free or Pro Buoy account. History limits and paid features vary by tool; see pricing. Production access requires Pro where supported. Development-only hooks and actions remain unavailable in release builds.
Proprietary software. © Buoy LLC. Terms
