Skip to content

Quickstart

This illustrative example creates an immutable catalog, searches it, and describes one operation:

import { Forage } from "@fungi.computer/forage";
import { z } from "zod";
const catalog = Forage.createCatalog({
revision: "run-1",
operations: [
{
path: "files.read",
description: "Read a file",
input: z.object({ path: z.string() }),
},
],
});
const matches = catalog.search({ query: "read" });
const description = catalog.describe({ path: "files.read" });
const firstPage = catalog.list({ limit: 25 });

The catalog tests exercise creation, search, description, and stable stamps in test/catalog.test.ts.