CLI Commands

Full reference for the virke CLI. Install with bun install -g @virke/cli.

Auth

virke login

Authenticate with the Virke API.

virke login                    # Browser OAuth (opens GitHub login)
virke login --api-key <key>    # API key authentication
virke login --api-url <url>    # Custom API URL (for self-hosted)
Option Description
--api-key <key> Authenticate with an API key instead of browser OAuth
--api-url <url> Override the API base URL (default: https://api.virke.dev)
--google Use Google OAuth instead of GitHub

Environment variables: VIRKE_API_KEY and VIRKE_API_URL override stored credentials. Used in CI environments.

virke logout

virke logout

virke whoami

virke whoami

Project

virke init

Initialize a new Virke project. Creates a virke.toml file.

virke init                                # defaults
virke init --name my-app                  # custom name
virke init --type compute                 # compute project
virke init --name my-app --type static --yes  # skip prompts
Option Description
-n, --name <name> Project name (default: current directory name)
-t, --type <type> static, compute, or fullstack (default: static)
-y, --yes Skip prompts and use defaults
--template <id> Use a starter template (vanilla, react, hono)
-d, --detect Auto-detect framework and configuration

virke status

virke status

virke dev

Start a local development server.

virke dev              # default port 3000
virke dev --port 8080  # custom port

Deploy

virke deploy

virke deploy             # production deploy
virke deploy --preview   # preview deploy
virke deploy --no-build  # skip build step
Option Description
--preview Deploy to a preview URL instead of production
--no-build Skip the build step

virke deployments

List deployment history.

virke deployments

virke rollback

virke rollback              # previous deployment
virke rollback <deploy-id>  # specific deployment

virke canary

Manage canary deployments (static sites only in V1).

virke canary start [deploy-id] [weight]         # start static canary (interactive if no args)
virke canary start-compute <weight>             # start compute canary
  --service-version <version>                   #   (required) Fastly service version
  --no-sticky                                   #   disable sticky sessions
virke canary adjust <weight>                    # adjust traffic split
virke canary adjust <weight> --compute          # adjust compute canary
virke canary promote                            # promote to production
virke canary promote --compute                  # promote compute canary
virke canary abort                              # revert to stable
virke canary abort --compute                    # abort compute canary
virke canary status                             # show canary status

Resources

virke domains

virke domains add <domain>       # add with auto SSL
virke domains list               # list all domains
virke domains remove <domain-id> # remove a domain
virke domains status [domain]    # check TLS/DNS status
virke domains verify <domain>    # verify DNS challenge

virke env

virke env set KEY=VALUE [KEY2=VALUE2 ...]  # set env vars
virke env set KEY=VALUE --secret           # set as secret
virke env list                             # list all
virke env delete <key>                     # delete

virke db

virke db create [name]       # create database
  --async-writes             #   enable async write-back
  --cache-ttl <seconds>      #   edge cache TTL (default: 60)
virke db list                # list databases
virke db query <sql>         # read-only SQL query
virke db execute <sql>       # write SQL statement
virke db schema              # show schema
virke db migrate             # run pending migrations
  --dry-run                  #   show pending without running
virke db export              # export as SQL dump
virke db import <file>       # import SQL dump
virke db status              # show sync status and settings
virke db flush               # force sync pending writes
virke db settings            # update performance settings
virke db promote             # promote to higher storage tier

virke kv

virke kv get <key>                  # get value
virke kv set <key> <value>          # set value
virke kv set <key> <value> --ttl 60 # set with TTL
virke kv delete <key>               # delete key
virke kv list                       # list all keys
virke kv list --prefix user:        # list with prefix

virke os3

virke os3 buckets                       # list buckets
virke os3 create <name>                 # create bucket
virke os3 ls <bucket>                   # list objects
virke os3 put <bucket> <key> <file>     # upload file
virke os3 get <bucket> <key>            # download object
virke os3 get <bucket> <key> -o out.txt # download to file
virke os3 rm <bucket> <key>             # delete object
virke os3 delete <bucket>               # delete bucket

Organizations

virke orgs

virke orgs                      # list organizations
virke orgs create <name>        # create team org
  --slug <slug>                 #   custom slug
virke orgs members [org-slug]   # list members
virke orgs invite <email>       # invite member
  --role <role>                 #   admin, dev, viewer (default: dev)
  --org <slug>                  #   target org
virke orgs switch <slug>        # set active org context
virke orgs invitations          # list pending invitations
virke orgs accept <id>          # accept invitation
virke orgs decline <id>         # decline invitation

GitHub Integration

virke link

Connect a GitHub repository for automatic deployment on push.

virke link <owner/repo>         # connect repo for auto-deploy
  -b, --branch <branch>        #   branch to track (default: main)
virke unlink                    # disconnect GitHub repo

Virke Cron

virke cron

Manage scheduled edge functions. Requires a compute project.

virke cron list                            # list cron jobs
virke cron add <name> <schedule> <handler> # add cron job
virke cron remove <name>                   # remove cron job
virke cron enable <name>                   # enable cron job
virke cron disable <name>                  # disable cron job
virke cron history <name>                  # show execution history

Monitoring

virke logs

virke logs                    # tail logs for current project
virke logs --project my-app   # tail logs for specific project

Global Options

virke --version    # show CLI version
virke --help       # show help
virke <cmd> --help # help for a specific command
virke completion <shell>   # generate completions (bash, zsh, fish)

Configuration Files

File Location Description
virke.toml Project root Project configuration
~/.virke/auth.json Home directory Stored authentication credentials
~/.virke/config.json Home directory Active organization context