> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nika.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow registry

> List, page, reload and inspect raw workflow source through the preview service namespace.

export const RemoteContract = () => <Warning>
    <strong>Preview surface.</strong> The root package types the intended
    workflow HTTP and SSE API. The reference engine does not ship a compatible
    workflow service today. Do not point it at the stable resident firer or
    <code>nika model serve</code>.
  </Warning>;

<RemoteContract />

`nika.workflows` exposes the service's workflow set without inventing a
second workflow representation.

## List ordinary catalogs

```ts theme={"system"}
const workflows = await nika.workflows.list()
console.log(workflows.map((workflow) => workflow.name))
```

`list()` requests bounded pages until `has_more` is false.

## Own pagination at scale

```ts theme={"system"}
let after: string | undefined

do {
  const page = await nika.workflows.listPage({
    limit: 50,
    after,
  })

  render(page.workflows)
  after = page.has_more ? page.workflows.at(-1)?.name : undefined
} while (after)
```

The cursor is the last workflow name, not an opaque integer offset.

## Rescan or inspect

```ts theme={"system"}
const refreshed = await nika.workflows.reload()
const yaml = await nika.workflows.source('release.nika.yaml')
```

`source()` returns the actual YAML text. Send that text to a language-aware
editor or audit surface. Do not downcast it to a partial application object.

<div className="sdk-flight sdk-flight-compact">
  <span>WORKFLOW REGISTRY · PREVIEW</span>

  <pre tabIndex={0}>
    {`directory
         ├── reload ── rescan
         ├── list ──── names + sizes
         └── source ── raw .nika.yaml`}
  </pre>
</div>

## Continue

<CardGroup cols={2}>
  <Card title="Jobs" icon="list-check" href="/sdk/remote/jobs">
    Submit a registered workflow.
  </Card>

  <Card title="Workflow concepts" icon="file-code" href="/concepts/workflows">
    Keep the YAML as the language authority.
  </Card>

  <Card title="Schema reference" icon="brackets-curly" href="/reference/schema">
    Validate the source in editors.
  </Card>

  <Card title="Examples" icon="rocket" href="/examples/overview">
    Browse the projected workflow corpus.
  </Card>
</CardGroup>
