This repository contains all documentation for the Alternate Futures platform, including:
- Guides: Platform usage guides and tutorials
- CLI Documentation: Auto-generated from the
cloud-clirepository - SDK Documentation: Auto-generated from the
cloud-sdkrepository
# Install dependencies
pnpm install
# Start dev server
pnpm run docs:dev
# Generate CLI docs from cloud-cli repo
pnpm run generate:cli
# Generate SDK docs from cloud-sdk repo
pnpm run generate:sdk
# Generate all docs
pnpm run generate:all
# Build for production
pnpm run builddocs/
├── .vitepress/ # VitePress configuration
├── index.md # Homepage
├── guides/ # Hand-written platform guides
│ ├── index.md
│ ├── quickstart.md
│ ├── authentication.md
│ ├── dashboard.md
│ ├── agents.md
│ ├── sites.md
│ ├── storage.md
│ ├── api-keys.md
│ └── billing.md
├── cli/ # Auto-generated CLI docs
│ ├── index.md
│ ├── installation.md
│ └── commands.md # Generated from cloud-cli
└── sdk/ # Auto-generated SDK docs
├── index.md
├── installation.md
└── api.md # Generated from cloud-sdk (TypeDoc)
The CLI documentation is automatically generated by:
- Running the generator script in the
cloud-clirepository - The script outputs markdown files to this repository
- Run
npm run generate:clito update
The SDK documentation is automatically generated by:
- Using TypeDoc to generate markdown from TypeScript source
- The TypeDoc config in
cloud-sdkpoints to this repository - Run
npm run generate:sdkto update
The repository uses three main branches:
- main: Production-ready code, deploys to https://docs.alternatefutures.com
- staging: Pre-production testing, deploys to https://docs-staging.alternatefutures.com
- develop: Active development, deploys to https://docs-dev.alternatefutures.com
The documentation is automatically built and deployed to the Alternate Futures platform when:
- Changes are pushed to
main,staging, ordevelopbranches - Manual workflow dispatch is triggered
- The
cloud-cliorcloud-sdkrepositories are updated (triggers regeneration via repository dispatch)
Each branch has its own GitHub Actions workflow that automatically deploys to Alternate Futures:
- Production (
mainbranch):.github/workflows/af-deploy-production.yml - Staging (
stagingbranch):.github/workflows/af-deploy-staging.yml - Develop (
developbranch):.github/workflows/af-deploy-develop.yml
All workflows use a common reusable workflow: .github/workflows/af-deploy-common.yml
The deployment process:
- Checks out the docs repository and dependencies (cloud-cli, cloud-sdk)
- Generates CLI and SDK documentation
- Builds VitePress documentation
- Deploys to Alternate Futures platform via
af sites deploycommand
Configure the following secrets in GitHub repository settings:
AF_API_KEY: Alternate Futures API key (get from app.alternatefutures.ai/api-keys)GH_PAT: GitHub Personal Access Token (for accessing cloud-cli and cloud-sdk repos)
All deployments use IPFS network by default. This can be modified in the workflow files to use:
ipfs- IPFS network (frequent updates, recommended for docs)arweave- Arweave network (permanent storage)filecoin- Filecoin network (large files)
Docs are deployed to:
- Production: https://docs.alternatefutures.com (from
mainbranch) - Staging: https://docs-staging.alternatefutures.com (from
stagingbranch) - Develop: https://docs-dev.alternatefutures.com (from
developbranch)
- Hand-written guides go in
docs/guides/ - CLI docs are generated - edit the source in
cloud-cli - SDK docs are generated - edit the source in
cloud-sdk - Configuration changes go in
docs/.vitepress/config.js
The initial architecture and conceptual foundation of this project were derived from a fork of the Fleek.xyz platform.
As our project's requirements led to significant architectural changes, we have diverged from the original fork. However, we remain grateful to the Fleek team for their pioneering open-source contributions to decentralized application hosting and infrastructure.