Start with install notes or jump straight into the API.

Guides

Layer CLI

The layer CLI ships with the Python SDK. It covers workflows that kubectl and the SDK don’t: dispatching UDFs against existing namespaces, applying a spec across a namespace prefix, and producing an agent-readable bundle of the hev layer and Turbopuffer docs.

For query, scan, and warm-cache work, use the Python SDK. For raw CRDs, use kubectl. For cluster and pipeline visibility, use the dashboard.

Install

pip install hevlayer
export LAYER_GATEWAY_URL=https://aws-us-east-1.hevlayer.com
export LAYER_GATEWAY_API_KEY=...

See Install for SDK install details and base-URL defaults.

VariablePurpose
LAYER_GATEWAY_URLBase URL of the gateway.
LAYER_GATEWAY_API_KEYAPI key sent on every request.

Run a UDF

layer run -f submits a Function spec to the gateway and runs it against the named index. The gateway resolves defaults (image registry, compute pool, cache rules) the YAML can omit.

layer run -f tag-products.yaml --index products

The command blocks until the run reaches a terminal state and exits non-zero on failure. Use --detach to submit and return immediately.

A full build-and-run loop — Depot build, ECR push, Function apply — is roadmapped as layer push; see the roadmap.

Initialize a namespace

layer init runs a one-shot UDF against an existing namespace to populate attributes, backfill embeddings, or migrate document shape. It is shorthand for layer run -f against a built-in initializer Function, parameterized by flags.

layer init products --embed text --target embedding

The namespace must already exist; layer init does not create indexes.

Apply across a namespace prefix

layer apply -f applies a spec across every namespace matching a prefix selector, which would otherwise be a shell loop over kubectl apply.

layer apply -f infrarules.yaml --namespaces 'products-*'

Use --dry-run to print the resolved target list without applying.

Agent-friendly docs

layer docs prints a single markdown bundle of the hev layer docs plus the Turbopuffer reference to stdout. Pipe it into an agent or save it locally:

layer docs > hevlayer.md
layer docs | pbcopy

The bundle follows the llms.txt convention. hev layer publishes its docs at two URLs:

URLContents
https://hevlayer.com/llms.txtNavigation index — titles, descriptions, and links per page.
https://hevlayer.com/llms-full.txtEvery docs page concatenated as one markdown file.

layer docs fetches llms-full.txt from the gateway-configured docs origin and from Turbopuffer’s published llms.txt, then concatenates the two. Pass --source hevlayer or --source turbopuffer to fetch just one half.