Documentation
Hostfunc Docs
Hostfunc is a control plane for TypeScript functions: build in dashboard or CLI, deploy to Cloudflare runtime workers, and operate with execution logs, metrics, and token-based automation.
Read By Area
Start with Getting Started, then move through platform behavior, operations, and SDK modules.
Getting Started
Use dashboard or CLI to deploy your first function, then verify execution and logs through the same control plane.
Functions
Functions move through draft and deployed versions. Runtime dispatch resolves deployed version metadata and executes in Cloudflare workers.
Triggers
Trigger config is persisted per function/kind and controls how runtime invocation is initiated.
Websites
Attach an index.html to a function and hostfunc serves it as a live web page at the function's run URL — static sites and dynamic pages, not just JSON APIs.
Custom Domains
Serve a deployed website from your own domain (www.yoursite.com) instead of the run.hostfunc.io URL. hostfunc provisions and renews SSL automatically — you add a couple of DNS records and watch it go live.
Marketplace
Publish a function to the public marketplace so anyone can discover, star, discuss, and fork it. Forks copy the code into the forker's workspace with lineage back to the original.
Executions
Every invocation writes an execution row plus logs and metrics. Use dashboard and CLI to investigate failures quickly.
Limits and Plans
Per-plan execution limits and platform-wide request guardrails. Limits are enforced at registration time by the control plane and at the edge by the runtime.
Security
Security is split by boundary: dashboard session auth, API-token auth for automation, and internal bearer-token controls for runtime/control-plane traffic.
CLI
Public npm package @hostfunc/cli supports login, init, list, deploy, run, logs, and secrets set flows.
VS Code Extension
The hostfunc extension brings your functions into VS Code: browse them, deploy, run with a payload, and stream execution logs — without leaving the editor. Sign in happens in your browser; no token to copy.
MCP
MCP endpoint is available at /api/mcp with API-token auth, rate limiting, and tool-call audit logging.
@hostfunc/sdk
The runtime SDK is split into core function APIs plus optional AI, agent, and vector modules.
AI module
Use @hostfunc/sdk/ai to call workspace AI providers for text generation and embeddings.
Agent module
Use @hostfunc/sdk/agent to create and run autonomous jobs with structured status and step traces.
Vector module
Use @hostfunc/sdk/vector for vector CRUD and retrieval workflows.