Getting started
Owly runs your functions and static sites inside fast, snapshot-restored
micro-VMs. You write ordinary handlers — using the SDK in TypeScript/JavaScript,
net/http in Go — and Owly handles the build, the deploy, and fast cold starts.
Install
The owly CLI drives everything: scaffolding, building, and deploying.
owly --help
You'll also need the toolchain for whatever language you build in:
- TypeScript / JavaScript — Node ≥ 20 and a package manager (npm, pnpm, or yarn).
- Go — Go ≥ 1.23 and TinyGo ≥ 0.34.
Create a project
Scaffold a new function. Pick a language with --lang:
owly init --lang ts hello
cd hello && npm install
This produces a project wired to the TypeScript SDK:
hello/
├── .owly/ # owly's build artifacts (generated, hidden)
├── src/index.ts # your handler
├── owly.yaml # project + function config
├── package.json
└── tsconfig.json
The generated src/index.ts:
import { createApp } from '@owly/runtime';
const app = createApp();
app.onSetup(() => {
// Warm caches / build lookup tables at snapshot-build time.
});
app.get('/', (c) => c.text('Hello from hello!\n'));
app.listen();
For Go, owly init --lang go hello scaffolds the Go SDK instead.
Add more functions
A project can host many functions, each mounted at its own path:
owly add --lang ts api-users # → /api/api-users
owly add --lang go cruncher --path /compute
owly add --lang go works in any project — even one that already has JS/TS
functions; Owly wires up everything the new function needs automatically.
Build and deploy
owly build # compile every function
owly deploy # ship functions + static files
See Build & deploy for the full workflow.
The first request to a freshly deployed function is a cold start: Owly restores a snapshot rather than starting from scratch. Use the setup hook to make that first request fast.
Static sites
No functions, just files? Scaffold a static-only project:
owly init --static my-site
This emits a minimal owly.yaml with functions: [] and a public/
placeholder. Point publicDir/publicBuild at any static generator —
Docusaurus, Astro, Vite, or hand-written HTML. (These very docs are an Owly
static site; see owly.yaml reference.)