vmlive
v1.0.24
Published
Local development VM for custom Serverless PaaS
Readme
@vmlive/cli
Local emulation sandbox, deployment CLI, and AI Edge toolkit for vm.live.
This CLI provides a local development environment for serverless edge functions running on vm.live, including local emulation for DB, KV, Bucket storage, and Native AI capabilities.
Installation
You do not need to install the CLI globally. It can be run directly via npx:
npx vmlive [command]Commands
npx vmlive login
Authenticates the CLI with your vm.live account via PKCE OAuth. Saves the access token to ~/.vm-config.json.
npx vmlive init
Scaffolds a new project in the current directory.
- Prompts for Workspace and Project selection.
- Generates
vm.json(configuration manifest) and dynamically scopes your first endpoint tosrc/. - Installs
@vmlive/typesand configures TypeScript.
npx vmlive add
Interactively scaffolds additional serverless endpoints natively into your src/ directory, immediately mapping them into your vm.json so the local proxy and production Gatekeeper seamlessly route to your independent microservices.
npx vmlive dev
Starts the local emulation environment.
- Iteratively hosts your entire multi-function footprint locally via predictable slugs:
http://<workspace_id>-<project_id>-<function_name>.localhost:8787. - Local Dashboard: Automatically spawns a web dashboard at
http://dashboard.localhost:8787for visualizing offline databases, global KV, and Object Storage. - Provides local proxy bindings for your SQL Database (
env.DB), Global KV (env.KV), Object Storage (env.BUCKET), and AI/Memory Models (env.AI) using the.vmlive/directory for persistent storage. - Supports hot-reloading for
.jsand.tsfiles.
npx vmlive deploy
Uploads the local code to the vm.live edge platform.
- Bundles the code using
esbuild. - Evaluates and injects environment variables from
.envand.env.production.
npx vmlive db push [local|remote]
Orchestrates Zero-Config declarative D1 schema migrations.
- Discovers raw
.sqlfiles within themigrations/folder at the root of your project. local: Evaluates files headless locally completely mirroring Cloudflare's Edge V8 SQLite dialect.remote: Natively routes your SQL to Gatekeeper to provision schema into the physical Cloudflare global footprint.
AI / LLM Tooling Setup
If you are using an AI assistant (such as Cursor, Copilot, or Aider) to write code, provide it with the platform context to ensure it adheres to the V8 Isolate execution model and uses the correct infrastructure bindings.
Instructions:
- Download the rules seamlessly via the API directly into your local root footprint:
curl -O https://api.vm.live/vmlive-ai-rules.md - Configure your AI Assistant (e.g. Cursor, Copilot) to ingest this manifest so it dynamically enforces the strict PaaS architectural primitives across your local logic scope!
