Home /

docs

Docs Cloud

Docs Cloud is the hosted layer around @farming-labs/docs. Your repository stays the source of truth, your docs app still owns the runtime, and Cloud adds managed deploys, analytics, publish workflows, and agent operations around it.

The Cloud contract has three parts:

  • docs.config.ts stays the executable config for the docs runtime.
  • docs.json is the serializable project contract that Cloud can read.
  • Docs Cloud owns hosted services such as deploys, analytics storage, and publish workflows.

Cloud access

Docs Cloud is rolling out gradually. If your workspace does not have access yet, join the Cloud waitlist. Once access is enabled, create the API key from your Docs Cloud project settings.

Cloud Sections

PageUse it for
DeployAPI keys, docs deploy, preview deploys, publish mode, and deploy troubleshooting
AnalyticsCloud analytics storage, project identity, privacy defaults, and optional customer callbacks
docs.jsonThe repo-level contract that Cloud reads
CLIThe complete command reference

Minimal Config

Add a cloud block when the project should participate in Cloud-aware CLI flows:

docs.config.ts
import { defineDocs } from "@farming-labs/docs";

export default defineDocs({
  entry: "docs",
  cloud: {
    apiKey: { env: "DOCS_CLOUD_API_KEY" },
    deploy: { enabled: true },
    publish: { mode: "draft-pr", baseBranch: "main" },
  },
});

cloud.apiKey.env names the environment variable that stores the project API key. The raw key stays outside source control.

Sync The Contract

Run cloud sync to write the serializable Cloud contract:

terminal
pnpm dlx @farming-labs/docs cloud sync

docs.json is safe to commit because it contains configuration and environment variable names, not secret values.

Check Before Deploy

Run a read-only check when you want to validate Cloud wiring without creating a preview:

terminal
pnpm dlx @farming-labs/docs cloud check

Use --analytics, --ask-ai, or --deploy when you only want to validate one part of the Cloud setup. The check reports stale docs.json, missing project/API key env vars, hosted API reachability, and CORS issues before you spend time on a deploy.

Next Step

Use the deploy page for the full preview flow:

terminal
pnpm dlx @farming-labs/docs deploy

See Deploy for API key setup, command options, preview behavior, publish mode, and troubleshooting.

  • Deploy covers hosted preview deployments.
  • Analytics covers Cloud-managed analytics storage.
  • docs.json explains the repo-level contract that Cloud reads.
  • Configuration lists the cloud config fields.
  • CLI covers the full command surface.
  • Cloud landing page explains the managed product direction and waitlist.
Customize
Live preview on these docs
Reset
Customize
Export Code
Preset
Explore more themes
Primary Color
Primary
Colors
Background
Foreground
Muted Text
Border
Card
Muted BG
Ring
Layout
SidebarBordered
TOC StyleDirectional (tree)
TOC DepthH2 + H3
Ask AI
ModeFloating
Floating StyleFull Modal
PositionBottom Right
Features