Skip to content

Latest commit

Β 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Varlock Examples

Example projects demonstrating Varlock usage with various frameworks and tools.

Each example is a standalone project, organized into category folders: integrations/ (using varlock with a framework or build tool), core/ (core varlock features, no framework), and plugins/ (secret-provider plugins). _scripts/ is repo tooling, not examples.

Integrations

Example Uses Demonstrates
astro/v5 @varlock/astro-integration Astro 5 β€” SSR, client components, MDX
cloudflare-workers/simple @varlock/cloudflare-integration Workers via varlock-wrangler
cloudflare-workers/vite @varlock/cloudflare-integration Workers via the Cloudflare Vite plugin
express just varlock plain node server β€” auto-load, varlock run, log redaction
hono just varlock Hono on node β€” auto-load, log redaction
nestjs just varlock NestJS server
nextjs/v15 @varlock/nextjs-integration Next.js 15 β€” server/client/edge, actions, leak prevention
nextjs/v16 @varlock/nextjs-integration Next.js 16 (Turbopack) β€” same tour as v15
nuxt/basic @varlock/nuxt-integration Nuxt
qwik @varlock/vite-integration Qwik City
sveltekit/basic @varlock/vite-integration SvelteKit β€” SSR, client, form actions, optional Cloudflare adapter
sveltekit/static-dynamic @varlock/vite-integration static vs dynamic config β€” build-time inlining vs runtime values, server-hydrated public env
tanstack-start @varlock/vite-integration TanStack Start β€” loaders, server actions, api routes
vite/basic @varlock/vite-integration vanilla Vite + TS β€” ENV vs import.meta.env, leak prevention
vite/react @varlock/vite-integration React via Vite
vite/vue @varlock/vite-integration Vue via Vite

Core

Example Demonstrates
basic loading patterns β€” auto-load, varlock run, dotenv override β€” plus redaction and error states
imports sharing config across projects via @import (pulls from imports-shared-vars)
init-test / init-sample-test playgrounds for varlock init migration from existing .env files

Plugins

Examples for each secret-provider plugin: 1password, aws, azure, bitwarden, gcp, infisical, pass. These reference real items in the dmno team's own vaults β€” see plugins/README.md.

Development

This repo expects the main varlock monorepo to be cloned as a sibling directory (i.e., ../varlock).

Switching dependency modes

The _scripts/deps.ts script toggles varlock dependencies between locally linked copies and published npm versions.

# Switch all examples to published versions
pnpm deps:published

# Switch all examples to local links
pnpm deps:local

# Only switch specific examples (matched by path substring)
pnpm deps:local -- astro next

# By default, pkg.pr.new preview URLs are left untouched.
# Use --force to overwrite them too
pnpm deps:published -- --force

About

πŸ§™β€β™‚οΈπŸ” Examples using Varlock with various frameworks + tools

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages