Developer Platform
// Quick start import { a6c } from '@a6c/core'; const client = a6c.init({ key: 'your-api-key', region: 'us-east-1' }); const result = await client.run({ project: 'my-app', env: 'production' }); // { status: 'deployed', id: 'proj_a6c_...' }
The a6c platform provides a unified interface for building and deploying applications. Install the core package and initialize with your API key to begin. All methods return promises and support both async/await and callback patterns.
# Install via npm npm install @a6c/core # Or use yarn yarn add @a6c/core
After installation, import the client and initialize with your credentials. The client handles connection pooling, retries, and error formatting automatically.
All API requests require a valid key. Keys are scoped to projects and carry specific permissions. Generate keys from your dashboard. Rotate keys periodically. Never expose keys in client-side code.
import { a6c } from '@a6c/core'; const client = a6c.init({ key: process.env.A6C_API_KEY, region: 'us-east-1', timeout: 30000 }); // Verify connection const status = await client.ping(); // { ok: true, latency: 12 }
Configuration can be set at initialization or per-request. Global defaults apply to all requests unless overridden. Timeout defaults to 30 seconds. Retries default to 3 with exponential backoff.
Pass options as the second argument to any method call. Options include timeout, retries, headers, and signal for abort control.
const result = await client.projects.list({}, { timeout: 5000, retries: 1, signal: controller.signal });
Projects are the primary organizational unit in a6c. Each project contains deployments, environments, and configuration. Projects can be created, listed, updated, and deleted through the API.
// Create a new project const project = await client.projects.create({ name: 'my-app', framework: 'next', buildCommand: 'npm run build' }); // List all projects const { data } = await client.projects.list({ limit: 10, sort: 'updated' });
Deploy your projects to production, staging, or preview environments. Each deployment is immutable and receives a unique URL. Rollbacks are instant since previous deployments remain available.
const deployment = await client.deployments.create({ project: 'proj_a6c_29dk3', env: 'production', branch: 'main' }); // Poll deployment status const status = await client.deployments.get(deployment.id); // { state: 'ready', url: 'https://my-app.a6c.dev' }
Complete working examples to get you started quickly. Each example includes error handling and best practices.
import { a6c } from '@a6c/core'; async function main() { const client = a6c.init({ key: process.env.A6C_API_KEY }); try { // Create project const project = await client.projects.create({ name: 'demo', framework: 'react' }); // Deploy to production const deploy = await client.deployments.create({ project: project.id, env: 'production' }); // Output: https://demo.a6c.dev } catch (err) { // Errors include request ID for support // err.requestId: 'req_a6c_...' } } main();
RESTful endpoints for the a6c platform. All responses return JSON.
/v1/projects
List all projects
/v1/projects
Create a new project
/v1/projects/:id
Get project by ID
/v1/projects/:id
Update project settings
/v1/projects/:id
Delete a project
/v1/projects/:id/deploy
Create a deployment
/v1/deployments/:id
Get deployment status
/v1/deployments/:id/rollback
Rollback deployment
/v1/status
Platform health check
/v1/regions
List available regions