@actuate-media/client
v0.5.2
Published
Type-safe read/delivery client and React hooks for the Actuate CMS REST API (read-only; author content over MCP or the HTTP API).
Readme
@actuate-media/client
Type-safe read / delivery client and React hooks for the Actuate CMS REST API.
npm install @actuate-media/clientScope: read-only by design
This SDK is the delivery layer — it fetches published content into a frontend. It is intentionally read-only and ships no create/update/delete/publish or upload methods.
| You want to… | Use |
| ---------------------------------- | --------------------------------------------------------------- |
| Render published content in a site | This package (@actuate-media/client) |
| Create / edit / publish content | MCP (@actuate-media/mcp-server) — for AI agents & tooling |
| Script writes from a backend / CI | The authenticated HTTP API (POST/PUT/DELETE /api/cms/…) |
Keeping authoring out of the delivery package is a deliberate decision: the
delivery bundle stays small, its API key only needs the read scope, and the
entire write surface stays auditable in one place (the CMS API + MCP server).
If you need an authoring SDK, drive the documented HTTP endpoints — the same
ones the MCP server calls.
Usage
import { ActuateClient } from '@actuate-media/client'
import type actuateConfig from './actuate.config'
const client = new ActuateClient<typeof actuateConfig>({
url: 'https://your-site.com',
apiKey: process.env.ACTUATE_API_KEY, // read scope is sufficient
})
// List published posts (typed by your config)
const { docs } = await client.list('posts', { status: 'PUBLISHED' })
// Fetch a single document, a global, or resolve a public URL
const post = await client.get('posts', id)
const brand = await client.getGlobal('brand')
const page = await client.resolve('/about')
// Media assets come back as the canonical { docs, total, page, … } envelope
const { docs: media } = await client.listMedia({ search: 'logo' })React and Next.js entrypoints are available at @actuate-media/client/react
and @actuate-media/client/next (the latter wires next/cache tags +
revalidate).
License
MIT
