
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
@t3-oss/env-core
Advanced tools
This is the framework agnostic core package of t3-env.
For full documentation, see https://env.t3.gg
# npm
npm i @t3-oss/env-core
# pnpm
pnpm add @t3-oss/env-core
# bun
bun add @t3-oss/env-core
# deno
deno add jsr:@t3-oss/env-core
[!NOTE]
You may use any Standard Schema compliant validator of your choice. This example uses Zod
// src/env.ts
import { createEnv } from "@t3-oss/env-core";
import { z } from "zod";
export const env = createEnv({
/*
* Serverside Environment variables, not available on the client.
* Will throw if you access these variables on the client.
*/
server: {
DATABASE_URL: z.string().url(),
OPEN_AI_API_KEY: z.string().min(1),
},
/*
* Environment variables available on the client (and server).
*
* 💡 You'll get type errors if these are not prefixed with PUBLIC_.
*/
clientPrefix: 'PUBLIC_',
client: {
PUBLIC_CLERK_PUBLISHABLE_KEY: z.string().min(1),
},
/*
* Specify what values should be validated by your schemas above.
*/
runtimeEnv: process.env,
});
FAQs
This is the framework agnostic core package of t3-env.
The npm package @t3-oss/env-core receives a total of 519,116 weekly downloads. As such, @t3-oss/env-core popularity was classified as popular.
We found that @t3-oss/env-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.