Install the tool and create a project
Every StayFn release publishes the SDK packages and
the tool to nuget.org, public, at the product version (amended 2026-10-12): no feed access or token is needed. The
licence (LICENSE.md in each package) is free for developing and testing; running functions in production needs a StayFn agreement.
| Package | Contents |
|---|---|
stayfn (.NET tool) |
the CLI with the host, the reference functions, the OHIP specs and the dashboard: stayfn dev, mcp stdio, new …, catalog export, ohip ping from any folder |
StayFn.Abstractions, StayFn.Ohip.Generated |
function contracts, the generated OHIP models and ctx.Ohip.Api |
StayFn.Events (with StayFn.Runtime, StayFn.Data, StayFn.Ohip) |
typed event contracts for handlers |
StayFn.Testing |
FunctionTestHost for function tests |
StayFn.Analyzers |
the design rules, code fixes and the typed function client generator |
StayFn.Client |
the runtime of SDKs from stayfn sdk generate |
1. The tool. ~/.dotnet/tools must be on your PATH.
dotnet tool install -g stayfnstayfn --helpUpdate with dotnet tool update -g stayfn.
.NET from Homebrew (macOS). If stayfn answers “You must install .NET to run this application … .NET location: Not found”, the
tool cannot find a .NET that Homebrew installed (it looks in the default location). Point DOTNET_ROOT at it in your shell profile, then
open a new terminal (write dotnet instead of dotnet@8 if that is the formula you installed):
echo 'export DOTNET_ROOT="$(brew --prefix dotnet@8)/libexec"' >> ~/.zshrcThe VS Code extension sets DOTNET_ROOT itself when it starts the tool.
2. A project.
stayfn new project MyHotelFunctionscd MyHotelFunctionsdotnet test # restores the SDK packages, builds, runs the sample's testscp .env.example .env # fill in OHIP_SANDBOX_*, or: stayfn sandbox connect (free StayFn Sandbox)stayfn dev # PostgreSQL via docker compose, the host from the tool on :5080curl -s -X POST http://localhost:5080/api/functions/custom/ping/invoke -H 'Content-Type: application/json' -d '{"message":"hi"}'The project has functions/ (your functions, StayFnVersion in Directory.Build.props), tests/, docker-compose.yml with the host’s
init.sql, .env.example, .mcp.json for Claude Code and .vscode/settings.json. Add functions with stayfn new function … [--operation rsv.getReservation] or the extension’s wizard.
3. Deploy. The project’s Dockerfile and build-image.sh build your functions into an image on the StayFn host image; deploy that
image as STAYFN_IMAGE. See Deploy your functions.
4. Editors. Install the StayFn extension in VS Code and open the folder: its walkthrough repeats these steps, and Start Dev Host
uses the installed tool. Claude Code picks up .mcp.json.
stayfn equivalence run and the Kiota regeneration still need the repository. To try the packages before a release, pack them and point a
project at the folder: dotnet pack StayFn.sln -c Release -o ./packages, then stayfn new project Demo --feed ./packages --sdk-version <version> (CI does exactly this in DistributionProofTests).