stacc-deploy

Let your AI agent put anything online and send you a link.

  1. Paste this in your terminal (ask Aditya for the token):
curl -fsSL https://deploy.preview.thestacc.com/install | bash -s -- YOUR_TOKEN
  1. Tell your agent: "Deploy this and send me the link."
Instructions for agents

Plain text version: /llms.txt

---
name: stacc-deploy
description: Put any project online and get a shareable link — static HTML pages, frontends, or full apps with a backend. Use whenever the user asks to deploy, host, publish, share a link to, or "put online" something they built.
---

# stacc-deploy

`stacc-deploy` uploads a folder to theStacc's preview server and returns a public
HTTPS link like `https://my-app.preview.thestacc.com`. It handles plain HTML,
frontends (Vite, React, Next.js…), and backends (Node, Python, Go, anything with a
Dockerfile). No accounts, config files, or Git needed.

## Deploy

```bash
stacc-deploy ./path/to/project --name short-name
```

- The command waits until the app is live and prints the link. Give that link to the user.
- **Deploying again with the same name updates the app** at the same link.
- Without `--name`, the folder name is used. Names: lowercase letters, digits, dashes.
- Pick a clear, specific name (`pricing-calculator`, not `test` or `app`) so you
  don't overwrite a teammate's app. Run `stacc-deploy list` first if unsure.

Options:
- `--password SECRET` — require a login (username `team`). Use for anything internal.
  `--no-password` removes it.
- `--keep 30` / `--keep forever` — apps are deleted after 14 days by default.
- `--env-file FILE` — environment variables / secrets. A `.env` in the project
  folder is sent automatically and never uploaded as a file.

## What the project must look like

- **Static site:** a folder with `index.html` (or a built `dist/`/`build/` folder).
- **Backend / full-stack:** the server must listen on **`0.0.0.0`** and on the port
  in the **`PORT`** environment variable (fall back to 3000). Listening on
  `localhost`/`127.0.0.1` will not work.
  - Node: `app.listen(process.env.PORT || 3000, "0.0.0.0")`; have a `start` script in package.json.
  - Python: include `requirements.txt`; e.g. `uvicorn main:app --host 0.0.0.0 --port $PORT`
    or `gunicorn -b 0.0.0.0:$PORT app:app`, set via a `Procfile` (`web: ...`) if needed.
  - Anything else: add a `Dockerfile`.
- **Saving data:** only files written under the `STORAGE_DIR` env var (`/storage`)
  survive redeploys. Use SQLite at `$STORAGE_DIR/app.db` for a simple database.
- Each app gets 1 CPU and 1 GB RAM.

## When a deploy fails

The command prints the error and the end of the build log. Read it, fix the
project, and deploy again with the same name. Common causes: app bound to
localhost, missing `start` script, missing dependency in requirements.txt/package.json.

## Other commands

```bash
stacc-deploy list                 # all apps, links, owners, expiry
stacc-deploy logs NAME [LINES]    # runtime logs of a live app
stacc-deploy restart NAME
stacc-deploy keep NAME 30|forever # extend or remove the expiry
stacc-deploy delete NAME          # take it down
```

Only delete or overwrite apps the user owns or explicitly asked about.