Getting Started

Deploy your app to Fastly's global edge network in under a minute.

Prerequisites

  • Bun v1.0 or later
  • A GitHub account (for authentication)

Install the CLI

bun install -g @virke/cli

Verify the installation:

virke --version

Authenticate

Browser login (recommended)

virke login

This opens your browser for GitHub OAuth. After authorizing, you are logged in automatically.

To use Google OAuth instead:

virke login --google

API key login (for CI)

Generate an API key from the Dashboard under Settings > API Keys, then:

virke login --api-key vk_your_api_key_here

Create Your First Project

cd my-app
virke init

Or create a new project from scratch:

virke init --name my-app --type static

This creates a virke.toml configuration file:

[project]
name = "my-app"

[build]
command = "bun run build"
output = "dist"

Auto-detect your framework

For existing projects, use --detect to automatically identify your framework, build command, and output directory:

virke init --detect
-> Analyzing project...

ok Detected Next.js
  Type: compute
  Build: bun run build
  Output: .next
  Entry: server.js

ok Created virke.toml for my-app (compute)

Auto-detection supports Next.js, SvelteKit, Remix, Astro, Vite, Hono, Express, and static sites. It also detects database usage (Prisma, Drizzle) and environment variables from .env.example.

See Framework Support for framework-specific guides.

Project types

Type Description
static Static site deployed to Fastly's CDN (default)
compute Edge compute function on dedicated Fastly Compute service
component Virke Components project (learn more)
fullstack Static assets + edge compute + database

Deploy

virke deploy

The CLI runs your build command, bundles the output, uploads it to Fastly Object Storage, and activates the deployment. Your site is live globally in seconds.

-> Running build: bun run build
ok Build complete (1.2s)
-> Uploading 12 files (148.3 KB)...
-> Deployment a1b2c3f created
ok Deployed to https://my-app.virke.dev (3.1s)

View Your Site

Every project gets a default https://<slug>.virke.dev domain. Check status at any time:

virke status

Custom Domains

virke domains add myapp.com

SSL is provisioned automatically via Let's Encrypt. Point your DNS to the provided CNAME:

CNAME myapp.com -> myapp.virke.dev

Preview Deployments

virke deploy --preview

Preview deployments are isolated and shareable. They do not affect your production traffic.

The CLI outputs a preview activation URL and a cache clear URL (/_preview/clear) to deactivate the preview.

Rollback

virke rollback

Instantly roll back to the previous deployment. Or specify a deployment ID:

Running virke rollback without arguments shows an interactive picker with your recent deployments.

virke deployments       # list history
virke rollback abc123   # rollback to specific deploy

Rollbacks update the Edge Dictionary and purge the CDN cache. No rebuild — completes in under two seconds.

Environment Variables

virke env set DATABASE_URL=sqlite://my.db
virke env set API_SECRET=s3cr3t --secret

Secret values are encrypted at rest and masked in output.

What's Next

  • Framework Support — Deploy Next.js, SvelteKit, Remix, and Astro
  • GitHub Integration — Auto-deploy on push, preview per PR
  • Virke Run — Build edge functions with JavaScript/TypeScript or Rust
  • Virke Cron — Schedule recurring tasks at the edge
  • Teams & Orgs — Collaborate with role-based access control
  • Virke DB — Full SQL at the edge with SQLite on Compute@Edge
  • Virke KV — Fast key-value storage with 4-10ms warm reads
  • Virke OS3 — S3-compatible object storage with CDN-cached reads
  • CI/CD — Set up GitHub Actions to deploy on every push