verglas
v0.2.2
Published
Command-line interface for all things Verglas Workers
Maintainers
Readme
verglas is a command-line tool for building and deploying Verglas Workers.
It retains the Workers API and configuration model while targeting Verglas.
Quick Start
To get started quickly with a Hello World worker, run the command below:
npx verglas init my-worker -yFor more info, visit our Getting Started guide.
We support running the Wrangler CLI with the Current, Active, and Maintenance versions of Node.js. Your Worker will always be executed in workerd, the open source Cloudflare Workers runtime.
Wrangler is only supported on macOS 13.5+, Windows 11, and Linux distros that support glib 2.35. This follows workerd's OS support policy.
Documentation
For the Workers-compatible command reference, see the Cloudflare Wrangler documentation.
To read more about Workers in general:
Configuration
Verglas is configured via a wrangler.jsonc (recommended), wrangler.json or
wrangler.toml file in the project root. An example configuration generated by
npx verglas init is as follows:
{
"$schema": "node_modules/verglas/config-schema.json",
"name": "my-worker",
"main": "./src/index.ts",
"compatibility_date": "YYYY-MM-DD",
}For more detailed information about configuration, refer to the documentation.
Commands
The verglas CLI offers various commands, the most popular being:
verglas devto start a local development server, with live reloading and devtools.verglas deployto deploy a Worker to the Verglas network.
There are many more commands and options available; the command surface follows the Cloudflare Workers API.
API endpoint
Verglas uses https://api.verglas.dev/client/v4 by default. Set
VERGLAS_API_BASE_URL to target another Verglas-compatible API.
Set VERGLAS_API_TOKEN and VERGLAS_ACCOUNT_ID for non-interactive use.
Run verglas login for interactive WorkOS browser authentication. Verglas
listens only on http://localhost:3080 for the short-lived browser handoff and
stores the resulting access token atomically at ~/.verglas/credentials.json
with mode 0600. verglas logout removes that local credential; it never
touches Wrangler's credential directory.
