Installation
Prerequisites
Section titled “Prerequisites”- Node.js 18+ and npm/pnpm/yarn
- An Aether account with a connected site
- Basic knowledge of your framework (Astro, Next.js, etc.)
Install the SDK
Section titled “Install the SDK”== npm
# Install the SDKnpm install @aether-official/sites-sdk
# Install the CLI (for type generation)npm install -D @aether-official/cli== pnpm
# Install the SDKpnpm add @aether-official/sites-sdk
# Install the CLI (for type generation)pnpm add -D @aether-official/cli== yarn
# Install the SDKyarn add @aether-official/sites-sdk
# Install the CLI (for type generation)yarn add -D @aether-official/cliGet Your Credentials
Section titled “Get Your Credentials”You’ll need three values from your Aether dashboard:
1. Site ID
Section titled “1. Site ID”Navigate to Sites → Your Site → Settings. Copy the Site ID.
Example: clqx1234abcd5678efgh
2. Organization ID
Section titled “2. Organization ID”From your organization settings page. Copy the Organization ID.
Example: org_abc123xyz789
3. API Token
Section titled “3. API Token”Required for the CLI and content fetching:
- Go to Sites → Your Site → API
- Click Generate Token
- 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
Quick Setup with CLI
Section titled “Quick Setup with CLI”The easiest way to configure your project is using the interactive CLI:
npx aether-sdk initThis will:
- Prompt for your credentials
- Test the connection
- Create a
.envfile - Fetch your schema
- Generate TypeScript types
Manual Setup
Section titled “Manual Setup”Alternatively, create a .env file manually:
# Required for CLI (type generation)AETHER_SITE_ID=clqx1234abcd5678efghAETHER_ORGANIZATION_ID=org_abc123xyz789AETHER_API_TOKEN=aether_your_token_hereAETHER_API_URL=http://localhost:3000
# Public (exposed to browser)PUBLIC_AETHER_SITE_ID=clqx1234abcd5678efghPUBLIC_AETHER_ORG_ID=org_abc123xyz789PUBLIC_AETHER_EDITOR_URL=http://localhost:3000TypeScript Configuration
Section titled “TypeScript Configuration”The SDK includes TypeScript definitions. Add to your tsconfig.json:
{ "compilerOptions": { "moduleResolution": "bundler", "types": ["@aether-official/sites-sdk"] }}Verify Installation
Section titled “Verify Installation”Create a test file to verify the SDK installed correctly:
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:
npx tsx test-sdk.tsYou should see: SDK loaded successfully!
Generate TypeScript Types
Section titled “Generate TypeScript Types”After setup, generate types for autocomplete:
# Fetch schema and generate typesnpx aether-sdk syncnpx aether-sdk typesThis creates src/aether-types.d.ts with type-safe section IDs and interfaces.
Next Steps
Section titled “Next Steps”Now that the SDK is installed:
- CLI Tool - Learn about type generation and CLI commands
- Configure the SDK - Detailed configuration options
- Fetch Content - Start fetching content from Aether
- Framework Guides - Framework-specific instructions