Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gradial.com/llms.txt

Use this file to discover all available pages before exploring further.

CLI Reference

The aci command-line interface (CLI) is the primary tool for developers working with ACI. It handles local development, content validation, preview, and publishing.

Installation

# Install via curl (recommended)
curl -fsSL https://raw.githubusercontent.com/gradial/aci-learn/main/install.sh | sh

# This installs to ~/.local/bin/aci
# Make sure ~/.local/bin is in your PATH
Verify installation:
aci version
# 0.1.0

Global Flags

These flags work with any command:
FlagDescription
-s, --site-dirSite directory containing .aci.yaml (default: current directory)
-d, --domainOverride the site domain
-v, --verboseEnable verbose output
-h, --helpHelp for any command

Local Development

aci serve

Start a local ACI API server with in-memory storage. This is the foundation for local development — it provides the same API that runs in production, but stores everything locally.
aci serve
Output:
serving memory API on :8080
Flags:
FlagDescriptionDefault
--addrAPI listen address:8080
--tenant-idTenant ID for the memory APIlocal
--repo-idRepository IDsite-local
--local-ssg-rootLocal SSG hosting artifact root
Usage pattern:
# Terminal 1: Start the API server
aci serve

# Terminal 2: Run your framework dev server
cd packages/astro
npm run dev
The serve command runs the full ACI API locally. Content is stored in memory (resets on restart). This lets you develop without any cloud infrastructure.

aci dev

Start your framework’s development server with ACI integration.
aci dev
Flags:
FlagDescription
--portDev server port override
This command:
  1. Compiles the component and layout registries
  2. Starts your framework’s native dev server (e.g., astro dev)
  3. Watches for changes
Requires the component registry to be properly configured. Run aci doctor first to check your setup.

aci doctor

Check your local site configuration and tooling.
aci doctor
Output:
ok: config discovered (.aci.yaml)
ok: version is 1
ok: siteId present (site_aci_local_astro_starter)
ok: framework valid (astro)
ok: component registry exists (src/cms/components.ts)
ok: layout registry exists (src/cms/layouts.ts)
ok: renderer entry exists (src/cms/renderer.ts)
ok: node available
ok: npm available
Run this first when setting up a new project or debugging issues. It checks:
  • Config file exists and is valid
  • Required files are present
  • Node.js and npm are available
  • Registry files can be compiled

Content Management

aci validate

Validate local content files against the component schemas.
aci validate
Checks all content in .content/ against the schemas defined in your component registry. Reports validation errors with file paths and field names.

aci content status

Show the status of local content files.
aci content status

aci content pull

Pull content from the API into your local .content/ directory.
aci content pull

aci content push

Push local content changes to the API.
aci content push

aci content clone

Clone content from the API into a local workspace.
aci content clone

Preview & Render

aci preview

Open a rendered preview of your site.
# Preview the homepage
aci preview

# Preview a specific route
aci preview --route /products/widget
Flags:
FlagDescriptionDefault
--routeRoute to preview/
--no-openPrint path without opening browser
--no-renderOpen existing HTML without re-rendering
Subcommands:
# Use your framework's native preview server
aci preview framework

aci render

Render pages using your configured renderer.
aci render
Validates content and invokes your renderer to produce HTML output.

aci build

Build your frontend site.
aci build
Runs your framework’s build command (e.g., astro build).

aci typecheck

Run TypeScript type checking on your site.
aci typecheck

Publishing

aci publish local

Publish content and rendered output to a local release.
aci publish local
Packages your content and renderer output into a release that can be served locally.

Registry Compilation

aci compile

Compile component and layout registries to JSON Schema.
aci compile
Reads your components.ts and layouts.ts files, extracts the Zod schemas, and generates JSON Schema files in .aci/. These schemas are used for content validation.

API Interaction

The aci api commands interact with a running ACI API server (either local via serve or remote).

Common Flags

FlagDescriptionDefault
--api-urlACI API base URLhttp://localhost:8080
--tokenAPI bearer tokendev-user

aci api content

Read content from the API.
aci api content

aci api branches

Manage content branches.
aci api branches

aci api previews

Manage preview sessions.
aci api previews

aci api publishes

Manage publish operations.
aci api publishes

aci api releases

Activate or roll back releases.
aci api releases

aci api code-builds

Build and inspect code artifacts.
aci api code-builds

aci api request

Send a raw API request.
aci api request GET /v1/sites

aci api system

Read API system state.
aci api system

Typical Workflows

Local Development

# 1. Clone the quickstart repo
git clone https://github.com/gradial/aci-learn.git
cd aci-learn

# 2. Install dependencies
npm install

# 3. Check your setup
cd packages/astro
aci doctor

# 4. Start the dev server
npm run dev

# 5. Edit content in .content/ and see changes instantly

Preview Changes

# Start the local API server
aci serve

# In another terminal, preview a page
aci preview --route /products/widget

Validate Before Committing

# Validate all content
aci validate

# Type-check your code
aci typecheck

# Build to catch any issues
aci build

Environment Variables

VariableDescription
ACI_CONTENT_ROOTOverride the content directory path
ACI_API_URLDefault API URL for api commands
ACI_TOKENDefault API token

Exit Codes

CodeMeaning
0Success
1General error
2Validation error (content or config)

Next: Quickstart →