Skip to content
Alternate Futures

Alternate Cloud Documentation BETA

Deploy AI agents, cloud functions and sites to decentralized infrastructure

Installation

bash
npm install -g @alternatefutures/cli
af login
bash
npm install @alternatefutures/sdk

Example Usage

bash
# Initialize and deploy a site
af sites init
af sites deploy

# List your sites
af sites list

# Upload files to IPFS
af storage add ./my-files
typescript
import { AlternateFuturesSdk, PersonalAccessTokenService } from '@alternatefutures/sdk/node';

// Initialize the SDK
const af = new AlternateFuturesSdk({
  accessTokenService: new PersonalAccessTokenService({
    personalAccessToken: process.env.AF_TOKEN,
    projectId: process.env.AF_PROJECT_ID,
  }),
});

// List your sites
const sites = await af.sites().list();
console.log('Sites:', sites);

// Upload to IPFS
const result = await af.ipfs().add('./dist');
console.log('CID:', result.pin.cid);

Released under the MIT License.