# What a forge is https://friend1.forges.open-platform.sh/docs/guide-what-a-forge-is.md A forge is your own workspace: git hosting, preview environments and a crew in one program. The crew, the forge's AI agents, builds your apps when you ask. The forge runs them on the web. It is one program and one database file, so it is small, fast and yours to keep. You never need to read code to use it. You request a change. The crew builds it in a preview environment, a working copy of the app. You try it and say yes or no. ## Four words - **App**: a thing that runs on the web, with its code in a repository. - **Crew**: the AI agents that work on your apps. They never change your app directly: they open a **pull**, which is a proposed change. - **Preview**: every pull gets its own running copy of the app, so you see the change before you accept it. - **Ship**: accept a pull. The change goes live. ## What you can see - `/` is home: a timeline of what your crew and your apps are doing. - `/apps` lists your apps and `/explore` lists what others made. Any public app has a "make it yours" button that copies it into your forge. - `/talk` is where you tell the crew something. Swap `YOUR-FORGE` for your forge's address. To check that it is listening: ```sh curl -s https://YOUR-FORGE/llms.txt ``` Everything is private until you make it public, and each page says in one line who can see it. ## Where to go next 1. [Your first app in five minutes](guide-first-app.md) 2. [Tell the crew](guide-tell-the-crew.md) The reference behind this page is [the studio](STUDIO.md) and [the vision](VISION.md). Every feature note, by topic: [the reference notes](features/README.md). # Your first app in five minutes https://friend1.forges.open-platform.sh/docs/guide-first-app.md You need a forge address (the link you were given) and a terminal with `git` and `curl`. You need no account to start. You claim the app afterwards. ## 1. Start Replace `YOUR-FORGE` with the forge's address and run: ```sh curl -sX POST https://YOUR-FORGE/api/v1/start -d '{"name":"my-app"}' ``` The answer is a small JSON document. Four parts matter: - `git.url`: where the code lives. - `token`: your password for it. Keep it private. - `app.url`: where the app is live. - `claim.url`: open this in a browser to make the app yours with a real account. ## 2. Get the code Take `git.url` from the answer and put `USER:TOKEN@` right after `https://`, where `USER` is `user.username` and `TOKEN` is `token`. Then clone it: ```sh git clone https://USER:TOKEN@YOUR-FORGE/OWNER/my-app ``` (`OWNER/my-app` is the rest of `git.url`: copy it as it is.) ## 3. Change something and push ```sh cd my-app echo "hello" > NOTES.md git add . && git commit -m "first change" git push origin HEAD:main ``` The forge builds the app on every push to `main`. A few seconds later `app.url` shows it. Open it. ## 4. Make it yours Open `claim.url` and choose a user name and password. The app and its token move to your account. An app nobody claims sleeps after 7 days and is archived after 30. ## 5. Tell the crew With the forge's `forge` command installed and signed in, ask for a change in plain words: ```sh forge tell "make the page say hello in big letters" ``` Or open `/talk` and type it. What happens next is in [Tell the crew](guide-tell-the-crew.md). If something does not work, see [When something is wrong](guide-when-wrong.md). The reference for the command is [CLI.md](CLI.md). Every feature note, by topic: [the reference notes](features/README.md). # Tell the crew https://friend1.forges.open-platform.sh/docs/guide-tell-the-crew.md The crew is the forge's AI agents. They build your apps. You direct them with requests in your own words. ## How to ask - On the web: `/talk`, or the "tell the crew" box in the toolbar at the bottom of any app or preview. - In a terminal: `forge tell "words"`, with `--repo owner/name` when you are not inside the app's folder. - From an AI assistant: through the MCP (see [Agents](guide-agents.md)). Say the outcome, not the code: "the checkout total is wrong when there are two coupons". One thought per ask works best. ## What happens next 1. Your words become an **issue** on the app. 2. A crew member picks it up and starts a **run**. 3. It opens a **pull** with the change, and the forge runs the app's tests on it. 4. The pull gets a **preview**: a running copy you can click through. 5. You read it and **ship** it, or tell the crew what to change. When the crew needs a decision from you, it appears as an **ask**. `/asks` lists them and `forge asks` shows them in a terminal. ## How to read a run A run is one piece of the crew's work: it builds, tests or deploys. Open a run from its pull or from the runs list: ```sh forge runs forge pulls ``` A run shows its state (queued, running, ok, failed) and its log. A red run says why in the last lines of the log. Tell the crew "the check on pull 3 failed, fix it" and it reads the log itself. ## Related Reference: [the crew](CREW.md), [asks](ASKS.md), [pulls](PULLS.md). Next: [Ship and undo](guide-ship-and-undo.md). Every feature note, by topic: [the reference notes](features/README.md). # Ship and undo https://friend1.forges.open-platform.sh/docs/guide-ship-and-undo.md To ship a change, merge its pull request: the proposed change, with its preview environment. The change goes into `main` and the app deploys with it. ## Ship Open the pull, look at its preview, check that its test result is green, and press Merge. Or from a terminal: ```sh forge ship 3 ``` It shows the pull and its check, asks `Ship #3? [y/N]`, and merges. Add `--yes` to skip the question. The forge's rules stay in force: a red check or a conflict refuses the merge and says why. ## Look before you ship - The preview is a real running copy of the app with the change in it. - `forge pulls` lists the open pulls and their checks. - A pull you do not like can be answered in words: tell the crew what to change, and it updates the same pull. ## Undo Nothing is lost when you ship: every version is in the git history. - Ask the crew: `forge tell "undo what pull 3 changed"`. It opens a new pull that reverses it, and you ship that. - Or do it yourself in your clone: `git revert` the merge commit, then `git push origin HEAD:main`. Undo is itself a pull or a push, so it is checked and deployed like any other change. ## Hold If you are not ready, leave the pull open: it stays previewed and nothing changes in production. Reference: [pulls](PULLS.md), [apps](APPS.md), [cloning over git](GIT.md). Next: [Your apps](guide-your-apps.md). Every feature note, by topic: [the reference notes](features/README.md). # Your apps https://friend1.forges.open-platform.sh/docs/guide-your-apps.md Each app has a Settings tab (General, App, Prompts, Labels, Webhooks, Machines, Danger zone). The things most people reach for are below. ## How an app runs The repository says how to run itself in `forge.json` at its root. Only `app.run` is needed; `health` is the page the forge polls until the app answers. ## Domains Every app has an address on the forge. To use your own, open the app's Settings, App pane, add the domain, and put the DNS records it shows at your registrar. The forge checks them and says what is missing. Reference: [an app's own domain](features/app-own-domain.md). ## Environment and secrets Variables are set in the app's Settings, App pane: a name, a value, and where it applies (production or previews). A name ending `_KEY`, `_SECRET` or `_TOKEN` is hidden after you save it. A `.env.example` file in the repository opens as a table of what the app needs. Never commit a real secret. Your own account's keys, tokens and passkeys are at `/settings/secrets`, `/settings/tokens` and `/settings/passkeys`. ## Schedules An app can run a path on a timer. Declare it in `forge.json`, beside `run`: ```json { "app": { "run": "bun run src/server.ts" }, "schedules": [ { "name": "print", "cron": "30 6 * * *", "timezone": "America/Chicago", "path": "/jobs/print" } ] } ``` The forge wakes a sleeping app at that time and calls the path. Printing a daily report is just a schedule that calls a page which produces it. ## Backups of an app's data An app's own data lives under `FORGE_APP_DATA`. See [an app's encrypted backup](features/app-backup.md). ## Which files open Every kind of file the viewer draws, and its size limit: [which files open](features/file-kinds.md). Reference: [apps](APPS.md). Next: [Hosting forges](guide-hosting.md). Every feature note, by topic: [the reference notes](features/README.md). # Hosting forges for others, and getting paid https://friend1.forges.open-platform.sh/docs/guide-hosting.md You can make a forge for a person, a client or an organization, and send them one link. They open it and see the crew, the forge's AI agents, already at work. ## Make one Open `/forges/new`, choose the apps to include (some copied from yours, some still shared so they see them change), a plan and an admin. The page gives you one link to send. From an AI assistant the same step is the `spawn` tool. ## Plans `/api/v1/plans` is public and lists the plans: free, small, medium and large, each with a price, a size and a monthly crew credit, and beside them `startCreditUsd`: the crew credit a new free forge gets once, to start (the `spawn.included_credit_usd` limit, $2 by default). After that, a free forge's crew runs on the person's own model key ([Bring your own AI](guide-own-ai.md)). Free and Small are the same size; a free forge sleeps when idle, and a paid one stays awake. Read the plans from a shell (`YOUR-FORGE` is your forge's address): ```sh curl -s https://YOUR-FORGE/api/v1/plans ``` A forge admin edits the plans at `/admin/limits`. ## Getting paid Billing is at `/settings/billing`. Connect your Stripe account there, make payment links and codes, and see orders. If a forge's payment lapses it enters a grace period with a pay link, and then sleeps; its data is kept. ## What they get A hosted forge sleeps when idle and wakes on its next visit. Each person they add gets their own forge that follows theirs, so good changes flow both ways. The client list at `/forges` shows who was sent what and what happened. Reference: [plans](features/plans.md), [new forge first minutes](features/new-forge-first-minutes.md), [the platform](PLATFORM.md). Next: [Bring your own AI](guide-own-ai.md). Every feature note, by topic: [the reference notes](features/README.md). # Bring your own AI https://friend1.forges.open-platform.sh/docs/guide-own-ai.md The crew, the forge's AI agents, runs on a model. A paid plan includes a monthly crew credit. A new free forge gets a small crew credit once, to start. After that, or whenever you prefer, bring your own model credential and the crew uses it. ## Set it Open `/settings/model` and add your credential. The crew's other knobs (who works, how much, how fast) are at `/settings/crew`. ## See what it costs `/settings/spend` shows what the crew spent today and this month, and `/settings/usage` shows by whom. A crew with no credential and no credit stays off, and says so on home. ## Keep it contained Agents run in a sandbox with no network except the forge and the hosts an app lists in `egress` in its `forge.json`. Their pulls are reviewed and the tests run before anything lands. For example, an app that calls a weather service lists that host in its `forge.json`: ```json { "egress": ["api.weather.example.com"], "app": { "run": "bun run src/server.ts" } } ``` ## Use your own tools too Your own assistant can drive the forge through the MCP: [Agents](guide-agents.md). Reference: [the crew](CREW.md), [model grants](features/org-model-grant.md). Next: [Agents](guide-agents.md). Every feature note, by topic: [the reference notes](features/README.md). # Agents: MCP, git, or the terminal https://friend1.forges.open-platform.sh/docs/guide-agents.md An agent can use a forge three ways. Pick the one that fits. ## 1. MCP The forge is a Model Context Protocol server at `/mcp`, with OAuth. In an assistant that takes a custom connector, paste `https://YOUR-FORGE/mcp` and sign in. The server card is at `/.well-known/mcp.json`. Tools answer with the same rules as the web: what you may not do, they refuse. ## 2. Clone and push Any agent that can run `git` can work. With no account at all, an agent starts with one call ([Your first app](guide-first-app.md)); with an account, it clones with a token from `/settings/tokens` and pushes a branch. A push to a branch opens or updates a pull. See [cloning over git](GIT.md). ## 3. The terminal The `forge` command reads and steers from a shell: ```sh forge login forge ls forge asks forge pulls forge tell "words" ``` `forge ui` opens a full-screen terminal. ## What an agent should read first - `/llms.txt`: what this forge is, and each action with its method and URL. - `/agents`: the same as a page. - `/docs`: these guides, with search. - The repository's `AGENTS.md`. Reference: [MCP](MCP.md), [CLI](CLI.md), [roles](ROLES.md). Next: [Backups and moving](guide-backups-moving.md). Every feature note, by topic: [the reference notes](features/README.md). # Backups and moving https://friend1.forges.open-platform.sh/docs/guide-backups-moving.md ## Backups The forge copies itself every night: repositories, the database and settings. Open `/settings/backups` to see the last copy, send copies somewhere else (a destination you choose), take one now, and run a restore drill that proves a copy works. A copy that has not been proved is not counted as safe, and home says so when a backup is overdue. What a copy does not hold is listed in [recovery](RECOVERY.md#what-a-snapshot-does-not-hold). ## Restore Recovery is a printable guide, with two routes: the restore command, or the objects by hand. Read [recovery](RECOVERY.md) before you need it, and keep the key to your backup off the forge. ## Moving - **To your machine**: `forge sync` clones the apps you pin (or, with none pinned, the ones you own), and work continues offline. See [on your machine](ON-YOUR-MACHINE.md). - **Between forges**: connect another forge as an origin at `/settings/origins`, bring an app in, and send changes back. See [origins](ORIGINS.md). - **Your own data**: **Download** under Your data at `/settings/payments` saves one JSON file of what the forge holds about you, no secret in it; the terminal writes the same file ([your data](features/account-help.md)). - **To a new owner**: transfer an app from its Danger zone. Old links keep working ([transfer](features/repo-transfer.md)). To keep your repositories mirrored on your machine, so you can work offline, run this after `forge login`: ```sh forge sync ``` Next: [Every setting, by topic](guide-settings.md). Every feature note, by topic: [the reference notes](features/README.md). # Every setting, by topic https://friend1.forges.open-platform.sh/docs/guide-settings.md Settings has two levels: the forge's, at `/settings`, and each app's own tab. ## Forge settings - **You**: `/settings/everyday` (your everyday account), `/settings/password`, `/settings/passkeys`, `/settings/tokens`, `/settings/devices`, `/settings/notify`. - **Crew and AI**: `/settings/crew`, `/settings/model`, `/settings/spend`, `/settings/usage`, `/settings/packs`. - **People**: `/settings/people`, `/settings/teams`, `/settings/access`, `/settings/accounts`. - **Data**: `/settings/backups`, `/settings/origins`, `/settings/secrets`, `/settings/keys`. - **Money**: `/settings/billing`, `/settings/subscriptions`, `/settings/economics`, `/settings/capacity`. - **Safety**: `/settings/security`, `/settings/trusted`, `/settings/confirms`. - **Switches**: `/settings/features`, `/settings/flags`, `/settings/traffic`, `/settings/telemetry`. ## An app's settings General (name, default branch, visibility), App (how it runs, variables, domains), Prompts (what the crew is told on this app), Labels, Webhooks, Machines, and the Danger zone (transfer, archive, delete). ## Admin Before changing anything, check which account the terminal is signed in as (it says so, or tells you to `forge login`): ```sh forge whoami ``` Admin work uses a separate account from the everyday one, and `/admin/limits` holds the limits and plans. Using AI with admin stays possible, but deliberate. Reference: [operating](OPERATING.md), [roles](ROLES.md). Next: [When something is wrong](guide-when-wrong.md). Every feature note, by topic: [the reference notes](features/README.md). # When something is wrong https://friend1.forges.open-platform.sh/docs/guide-when-wrong.md Start here, top to bottom. ## The app does not come up after a push Open the app's latest deploy run (`forge runs`) and read the last lines of its log. Common causes: `run` in `forge.json` names a file that is not there, or `health` is a page that does not answer within `ready` seconds. ## A pull's check is red Read its run. Then tell the crew: `forge tell "fix the failing check on pull 3"`. ## The crew does nothing - No model credential or credit: see `/settings/model`. - Waiting on you: `/asks` lists the decisions it needs. - Over its spend limit: see `/settings/spend` and `/settings/crew`. ## I cannot sign in or push Your token may have been revoked. Make a new one at `/settings/tokens` and run `forge login` again. ## The forge itself is unwell - `/healthz` answers if it is up. - `/system` (admins) shows load, disk and the slowest things. - A failed backup or a red restore drill is on `/settings/backups`. - If the forge cannot start, follow [recovery](RECOVERY.md); the ways it can stop are in [failure domains](DOMAINS.md). From another machine, `curl -s https://YOUR-FORGE/healthz` (your forge's address) is the quickest check: ```sh curl -s https://YOUR-FORGE/healthz ``` ## Still stuck Report a problem on the app's page, or tell the crew about the forge's own repository. Say what you did, what you saw, and what you expected. Reference: [operating](OPERATING.md). Every feature note, by topic: [the reference notes](features/README.md).