# Put this online with Vinssi

Vinssi puts your app or website on the internet in Europe. Billing is per app, at a fixed monthly price from €5, excluding VAT.

You are a coding agent. Put the user's work online with Vinssi Pages, then give them the live link. Pages publishes a static file or folder. It does not need a plan. Follow the skill at https://vinssi.ai/skills/vinssi-pages/SKILL.md and the docs at https://vinssi.ai/docs/pages and https://vinssi.ai/docs/cli.

Run every command below as `vinssi` if that command is installed. If it is not, run the same command as `npx -y vinssi`. The CLI needs Node 20 or newer.

## 1. Sign in

A workspace is created the first time the user signs in.

Ask the user to run `vinssi login`. It opens the dashboard in their browser. They choose Allow, and the CLI stores a token in `~/.vinssi/credentials.json`. If no browser opens, they paste the printed URL into one. The request expires after five minutes.

If the address of this page includes `ref`, `utm_source`, `utm_medium`, `utm_campaign`, or `code`, pass those same values to login and omit any flag that was not in the address. This records where the signup came from. It does not change the price.

```sh
vinssi login --ref <ref> --utm-source <source> --utm-medium <medium> --utm-campaign <campaign> --code <code>
```

This file is static, so it cannot insert those values for you. Read them from the page address.

Do not run login in a loop. If a later command fails with `UNAUTHORIZED`, ask them to run `vinssi login` again.

`vinssi whoami` shows who is signed in.

## 2. Publish

Publish only what the user asked to share. If the files look sensitive, such as credentials, customer data, or internal financials, ask first.

```sh
vinssi pages publish /absolute/path/to/file.html --json
```

`--json` prints `siteId`, `versionId`, `url`, `bytes`, and `fileCount`.

- A single `.html` file becomes the site's index page.
- A folder is published as-is. It should have `index.html` at its root. Relative asset paths work. Dotfiles and symlinks are skipped.
- To update the same URL later, add `--site <siteId>` and keep the site id from the first publish.
- `--name <n>` sets the display name and the start of the URL. If you omit it, the name comes from the file.

## 3. No project yet

If the user has nothing to publish, write one HTML file and publish that file with the command above. A single `.html` file becomes the site's index page. For example, `hello.html`:

```html
<!doctype html>
<html>
  <body>
    <p>Hello from Vinssi.</p>
  </body>
</html>
```

```sh
vinssi pages publish /absolute/path/to/hello.html --json
```

## 4. Give the user the link

Before you hand the link over, check it:

```sh
curl -s -o /dev/null -w "%{http_code}" <url>
```

The result should be 200. A site that was just published can return 404 for about ten seconds. One retry after a short wait is enough.

Then give the user the `url` as a link.
