Skip to main content
zavu functions (alias fn) drives Zavu Functions — your TypeScript running on every messaging event. The most-used subcommands are also available at the top level: zavu deploy is zavu fn deploy.

Scaffold

Writes index.ts, a package.json declaring @zavudev/functions, a tsconfig.json, and .zavu/config.json holding the function’s id. Run zavu fn init --help for the current template list.
Commit .zavu/. It holds the functionId, and there is no command to look one up — a teammate who clones without it cannot deploy.
To start from a working agent instead of a blank file, see zavu agents pull.

Deploy

The summary lists what the deploy did to your agents and tools. Read the lines above the ✓ — warnings print before the success line, and the command exits non-zero when your declarations were not synced at all. Warnings you may see, and what they mean: zavu fn push updates the draft without deploying. Useful to save work in progress; nothing changes in production until deploy.

Run it locally

fn invoke runs your code with Bun. Every other command runs under plain Node.
This is the cheapest feedback in the product: it exercises your handler exactly as production will, in milliseconds, without deploying or spending anything.

Logs

Run it from the function’s directory. Lambda’s own noise is filtered out and internal identifiers are redacted.

Secrets

Values are write-only: list shows the last four characters, never the secret. Reach them in your handler with process.env.STRIPE_KEY.
Secrets apply on the next deploy. Setting one does not change the running function until you run zavu deploy.

Triggers

A trigger subscribes the function to an event, optionally scoped to one sender. A function that only declares an agent and its tools needs no triggers — the agent path invokes it directly.

Versions and rollback

Every deploy is a version with its own record. rollback republishes a previous one’s source and dependencies; it always asks for confirmation. Secrets are not rolled back.

Delete

Removes the function and everything it owns — its triggers, secrets, deployment history, and the agents and tools it manages. It asks you to type the slug first, because there is no undo.

Where to go next

How agents work

What a deploy actually does, with diagrams.

zavu agents

Test, connect and inspect the agents your code declares.