Skip to content

Installation

  • Node.js 18+ and npm/pnpm/yarn
  • An Aether account with a connected site
  • Basic knowledge of your framework (Astro, Next.js, etc.)

== npm

Terminal window
# Install the SDK
npm install @aether-official/sites-sdk
# Install the CLI (for type generation)
npm install -D @aether-official/cli

== pnpm

Terminal window
# Install the SDK
pnpm add @aether-official/sites-sdk
# Install the CLI (for type generation)
pnpm add -D @aether-official/cli

== yarn

Terminal window
# Install the SDK
yarn add @aether-official/sites-sdk
# Install the CLI (for type generation)
yarn add -D @aether-official/cli

You’ll need three values from your Aether dashboard:

Navigate to SitesYour SiteSettings. Copy the Site ID.

Example: clqx1234abcd5678efgh

From your organization settings page. Copy the Organization ID.

Example: org_abc123xyz789

Required for the CLI and content fetching:

  1. Go to SitesYour SiteAPI
  2. Click Generate Token
  3. Copy the token (starts with aether_)

Note: The API token is required for:

  • CLI commands (aether-sdk init, sync, types)
  • Server-side content fetching
  • Build-time content generation

The easiest way to configure your project is using the interactive CLI:

Terminal window
npx aether-sdk init

This will:

  1. Prompt for your credentials
  2. Test the connection
  3. Create a .env file
  4. Fetch your schema
  5. Generate TypeScript types

Alternatively, create a .env file manually:

Terminal window
# Required for CLI (type generation)
AETHER_SITE_ID=clqx1234abcd5678efgh
AETHER_ORGANIZATION_ID=org_abc123xyz789
AETHER_API_TOKEN=aether_your_token_here
AETHER_API_URL=http://localhost:3000
# Public (exposed to browser)
PUBLIC_AETHER_SITE_ID=clqx1234abcd5678efgh
PUBLIC_AETHER_ORG_ID=org_abc123xyz789
PUBLIC_AETHER_EDITOR_URL=http://localhost:3000

The SDK includes TypeScript definitions. Add to your tsconfig.json:

{
"compilerOptions": {
"moduleResolution": "bundler",
"types": ["@aether-official/sites-sdk"]
}
}

Create a test file to verify the SDK installed correctly:

test-sdk.ts
import { AetherSDK } from '@aether-official/sites-sdk';
const sdk = new AetherSDK({
siteId: 'test',
organizationId: 'test',
editorOrigin: 'http://localhost:3000',
debug: true,
});
console.log('SDK loaded successfully!');

Run it:

Terminal window
npx tsx test-sdk.ts

You should see: SDK loaded successfully!

After setup, generate types for autocomplete:

Terminal window
# Fetch schema and generate types
npx aether-sdk sync
npx aether-sdk types

This creates src/aether-types.d.ts with type-safe section IDs and interfaces.

Now that the SDK is installed: