vpm (package manager)
vpm is Vow’s package manager — install, publish, and search packages. End users get it with vow via the curl installer (no separate pip install).
curl -fsSL https://install.vowlang.dev | shexport PATH="$HOME/.local/bin:$PATH"vpm init my-apivpm add vow-web-server@0.2.2vpm installCommands
Section titled “Commands”vpm init [dir] # scaffold project.toml + src/main.vowvpm install # resolve deps → .vow/deps/vpm add pkg@0.1.0 # registry dependencyvpm add my-lib --git https://github.com/org/my-libvpm add my-lib --path ../my-libvpm add vow-serve -g # global CLI (vow-serve, vs, vds)vpm add vow-serve --path ../vow-serve -g # monorepo / offlinevpm publish # PUT tarball (needs token)vpm search web-servervpm config set registry <url>vpm login # save publish tokenDefault registry: https://vpm.vowlang.dev (override with vpm config set registry or VPM_REGISTRY).
Async I/O in HTTP apps
Section titled “Async I/O in HTTP apps”Pair vow-web-server with vow-postgres (or file async) using language async fn / await / block_on:
vpm add vow-web-server vow-postgresvpm installasync fn list_rows() -> String { return await db_query(g_handle, "SELECT id, title FROM todos")?;}
fn list_todos(_req: request.Request) -> response.Response { return vws.json("{\"todos\":" + block_on(list_rows) + "}");}Guide: Async / await · full demo: hello-app/
Global install (-g)
Section titled “Global install (-g)”Project libraries use vpm add (.vow/deps/). CLI tools use vpm add -g — similar to npm install -g pm2.
vpm add vow-serve -gexport PATH="$HOME/.vow/global/bin:$PATH"vow-serve --versionvds --helpErgonomic alias: vow add vow-serve -g (delegates to vpm).
| Path | Purpose |
|---|---|
~/.vow/global/deps/<pkg>/ |
Global package tree |
~/.vow/global/bin/ |
Symlinked commands |
~/.vow/global/lock.toml |
Global lock file |
vow-serve workflow
Section titled “vow-serve workflow”After global install, deploy vow-web-server apps with vow-serve and vds:
cd my-apivow-serve init # vow.serve.toml, vow.grants.toml, templatesvds # dev — watch + rebuildvow-serve start # prod — registry in ~/.vow/serve/vow-serve listvow-serve logs my-api -fvow-serve stop my-apiSee Deploying vow-web-server and vow-serve.
Monorepo / offline
Section titled “Monorepo / offline”vpm add vow-serve --path ../vow-frameworks/vow-serve -gexport VPM_LOCAL_STORE=/path/to/registry/store # optional tarball mirrorTroubleshooting
Section titled “Troubleshooting”| Problem | Fix |
|---|---|
vow-serve: command not found |
vpm add vow-serve -g; add ~/.vow/global/bin to PATH |
| Registry unreachable | --path or VPM_LOCAL_STORE |
| Stale global install | Remove ~/.vow/global/deps/<pkg> and reinstall |
Import styles
Section titled “Import styles”| Syntax | Meaning |
|---|---|
import vow_web_server.router |
Submodule; alias = last segment (router) |
import r from vow_web_server.router |
Submodule with custom alias |
import vws from vow_web_server |
Package entry (main in the dep’s project.toml) |
Package names normalize - ↔ _ (vow-web-server ↔ vow_web_server).
project.toml
Section titled “project.toml”name = "my-api"version = "0.1.0"
[deps]vow-web-server = "0.2.2"my-lib = { git = "git+https://github.com/org/my-lib" }local = { path = "../my-lib" }Published libraries declare an entry point:
name = "vow-web-server"version = "0.2.0"main = "lib/index.vow"CLI packages declare [bin]:
name = "vow-serve"version = "0.1.0"
[bin]vow-serve = "bin/vow-serve"vs = "bin/vow-serve"vds = "bin/vds"Install globally with vpm add vow-serve -g. Paths in [bin] are relative to the package root.
Vow CLI integration
Section titled “Vow CLI integration”vow build/vow run/vow checkauto-runvpm installwhen lock/deps are missing (ifvpmis onPATH)vow add pkg -gdelegates tovpm add pkg -gvow serve …delegates tovow-serveon PATH- Prefer
vpm add/vpm installover deprecatedvow add/vow syncfor project deps
Publishing
Section titled “Publishing”vpm loginvpm publishPacks the project and publishes to the configured registry (cloud or local). Sign up on the registry UI for a publish token, then vpm login.
CLI packages: include executable bin/* files and document vpm add <pkg> -g in the README.
Production registry (cloud)
Section titled “Production registry (cloud)”The hosted registry runs on Vercel + Firebase (vow-package-manager/registry-cloud/):
- UI + API on Vercel
- Auth / Firestore metadata / Storage tarballs on Firebase
- Default client URL:
https://vpm.vowlang.dev
Contributors: see registry-cloud/README.md for Firebase + Vercel env setup and npm run seed.
Local registry (contributors)
Section titled “Local registry (contributors)”From the vow-package-manager tree:
cd registry./seed.sh # bootstrap vow-web-server@0.2.2 into data/vpm installvpm serve --watch # UI + API at http://127.0.0.1:8787/Then point another project at it:
vpm config set registry http://127.0.0.1:8787vpm add vow-web-server@0.2.2vpm installSee examples/http-api/ in that repo.
Featured package: vow-web-server
Section titled “Featured package: vow-web-server”HTTP API framework with a three-tier grant model: grants.toml (supply), use_grant_at (middleware demand), get_needs / post_needs (API demand).
- Full docs: vow-web-server
- vpm markdown (clone):
vow-package-manager/docs/vow-web-server.md