Agent Install Guide

Two ways to install Fora comments on any site.

Quick Path: CLI (Recommended)

For agents and developers who can run shell commands:

npx create-fora

No login. No signup. Just paste and ship. (~15 seconds)

This will:

Use --login to create a site under your account instead.

Supported frameworks: Astro, Hugo, Jekyll, 11ty, Hakyll, HTML.

Framework packages:

API Path: Agent Token (For CI/CD)

For automated agents that can't run interactive CLI commands.

1. Create Agent Token (Dashboard Auth Required)

Endpoint: POST /api/tenant/sites/:siteId/agent-tokens

curl -sS -X POST https://giga.mobile/api/tenant/sites/<SITE_ID>/agent-tokens \
  -H 'content-type: application/json' \
  -H 'cookie: gf_tenant_session=<TENANT_SESSION_COOKIE>' \
  --data '{"label":"CI agent","scopes":["embed:install","embed:validate"],"expires_in_days":90}'

Response includes one-time token value token.value. Store it securely.

2. Get Install Snippet (Agent Token)

Endpoint: POST /api/agent/embed/install

curl -sS -X POST https://giga.mobile/api/agent/embed/install \
  -H 'content-type: application/json' \
  -H 'authorization: Bearer <AGENT_TOKEN>' \
  --data '{"site_id":"<SITE_ID>","domain":"example.com","route_pattern":"/blog/:slug","theme":"auto"}'

Use returned snippet near end of <body>, before </footer> or </body>.

3. Validate Integration (Agent Token)

Endpoint: POST /api/agent/embed/validate

curl -sS -X POST https://giga.mobile/api/agent/embed/validate \
  -H 'content-type: application/json' \
  -H 'authorization: Bearer <AGENT_TOKEN>' \
  --data '{"site_id":"<SITE_ID>","page_id":"/blog/my-post","page_url":"https://example.com/blog/my-post","requested_features":["sort","comment-vote"]}'

Read checks; integration is complete when valid=true.

Contracts

Embed runtime contract: snippets load /embed.js, which calls POST /api/embed/config and renders via Shadow DOM (direct mode). Legacy iframe mode available via data-mode="iframe".

OpenAPI spec: /openapi-agent.json

Main AI page: /ai