# Getting started Interfold lets you and your agents publish real websites, files, and backend functions from the command line — no build step, no servers to manage. Ship a page, expose an API endpoint, persist data, and get a live `*.interfold.site` URL in seconds. This guide takes you from zero to a live page and a working function. - New to the model? Read [Core concepts](/concepts) first. - Building an agent that uses Interfold? Jump to the [Agent guide](/agents). --- ## 1. Install the CLI The `interfold` CLI is the primary way to work with Interfold. Install it with: ```sh curl -fsSL https://downloads.interfold.dev/install.sh | bash ``` The installer adds Interfold to your zsh or Bash startup files when it recognizes your shell. Open a new terminal window, or run the `source` command it prints, then continue below. To manage your PATH yourself, run the installer with `bash -s -- --no-path`. Verify the install: ```sh interfold version ``` ## 2. Log in Authenticate the CLI. This opens a browser to approve the session and stores a credential locally (at `~/.interfold/credentials.json`) — you never paste keys into your shell. ```sh interfold login ``` Confirm you're authenticated: ```sh interfold whoami ``` You'll see the account the CLI is acting as. Everything you publish belongs to this account. ## 3. Create a site A **site** is a container for files and functions, served at its own `*.interfold.site` subdomain. Create one: ```sh interfold sites create --name "My Site" --access PUBLIC ``` The response includes the site `id` and `subdomain`. Save the id — site-scoped commands require a `--site ` flag. > `--access PUBLIC` means anonymous visitors can open the site. Use `PRIVATE` > for a draft or team-only project. See [Sites & access](/sites). ## 4. Publish a page Create a local HTML file: ```sh cat > index.html <<'HTML' Hello, Interfold

Hello from Interfold

HTML ``` Upload it to the site's web directory: ```sh interfold files put ./index.html /web/index.html --site --content-type 'text/html; charset=utf-8' ``` Look up your subdomain and open the live URL: ```sh interfold sites get curl -I https://.interfold.site/ ``` Your page is live at `https://.interfold.site/`. ## 5. Deploy a function Interfold Functions let you run TypeScript on the server at `/api/*`. Create a handler: ```sh cat > hello.ts <<'TS' export async function handler(req: Request, ctx: InterfoldContext) { const name = new URL(req.url).searchParams.get('name') ?? 'world' return Response.json({ ok: true, message: `hello ${name}` }) } TS ``` Deploy it by uploading the source under `/api/`: ```sh interfold files put ./hello.ts /api/hello.ts --content-type text/typescript ``` Invoke it: ```sh curl -i "https://.interfold.site/api/hello?name=agent" ``` You now have a live page and a live endpoint. See [Functions](/functions) for the full runtime contract, [Databases](/databases) or [Data files](/data-storage) for persistence, and [Secrets](/secrets) for runtime config. --- ## Where to go next - [Core concepts](/concepts) — the mental model behind sites, files, access, and functions. - [Cron Jobs](/cron-jobs) — scheduled TypeScript for recurring work. - [CLI reference](/cli) — every command and flag. - [API reference](/api-reference) — the REST API behind the CLI. - [Agent guide](/agents) — how to drive Interfold from a coding agent.