---
name: vinssi-pages
description: >-
  Publish an HTML file or a static folder (for example a built ./dist) to Vinssi Pages
  with the Vinssi CLI and hand back a shareable link. Use when the user mentions Vinssi
  or Vinssi Pages, or asks to publish, share or "give me a link to" an HTML page,
  report, prototype, landing page or other static content they want to open outside
  the chat. No Git repository, no build step and no plan needed.
---

# Publish to Vinssi Pages

Vinssi Pages uploads a static file or folder and returns an unlisted URL of the form
`https://<name>-<random>-<workspace>.pages.vinssi.ai`. Anyone with the link can open
it; the random part makes it hard to guess and search engines are told not to index
it. Pages does not need a plan. Vinssi runs on servers in the EU and is made by Vertics Oy.

Docs: https://vinssi.ai/docs/pages and https://vinssi.ai/docs/cli

**Publishing is an external action.** Publish only what the user asked to share. If
the files look sensitive (credentials, customer data, internal financials), ask
first.

## Run the CLI

Use the tested npm release on Node 20 or newer:

```sh
npx -y vinssi@0.1.4 --version
```

The version must report `0.1.4`. If npm resolves a workspace or PATH binary with
a different version, stop and run the pinned command from a fresh temporary
folder. Use absolute file paths when publishing from there. Do not continue with
the unexpected binary.

Run **every** CLI command below with the prefix `npx -y vinssi@0.1.4`.
Examples use `vinssi` as shorthand for that exact prefix. Do not switch to an
unverified global installation: releases before 0.1.3 use a localhost login
callback that fails when the agent and browser are on different machines.
Do not install or upgrade the global CLI as part of publishing.


## 1. Sign in

Check first:

```sh
vinssi whoami
```

If it says you are not logged in, or a command fails with `UNAUTHORIZED`, sign in:

```sh
vinssi login
```

`vinssi login` prints a short code and a link. Show both to the user. They open the
link on any device, sign in, check that the code matches, and choose Allow. The CLI
waits for the approval and then saves a token in `~/.vinssi/credentials.json`. This
works when you run on a different machine from the user, because no localhost
callback is needed. The code expires after a few minutes; if it does, run
`vinssi login` again once. Do not run login in a loop.

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

## 2. Publish

```sh
vinssi pages publish /absolute/path/to/report.html --json
vinssi pages publish ./dist --name "Launch page" --json
```

- `--json` prints `{"siteId", "versionId", "url", "bytes", "fileCount"}`. Read the
  `url` and keep the `siteId`.
- A single `.html` file becomes the site's index page.
- A folder is published as-is and should have `index.html` at its root. Relative
  asset paths work. Dotfiles (such as `.env` and `.git`) and symbolic links are
  skipped.
- `--name` sets the display name and the start of the URL. Without it the name
  comes from the file or folder.
- To publish a new version **at the same URL**, pass the site id:
  `vinssi pages publish ./dist --site <siteId> --json`.

If the user has nothing yet, write a single HTML file and publish that file.

Pages serves static files only (`GET`/`HEAD`). Anything that needs a server, a
database or a build on the platform belongs in an app: use the `vinssi-deploy`
skill.

Limits: 50 MB compressed upload, 200 MB uncompressed, 50 MB per file, 2,000 files
per publish, 100 sites per workspace, 10 versions kept per site.

## 3. Check the link, then hand it over

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

Expect `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.

## Manage sites

```sh
vinssi pages list --json
vinssi pages versions <siteId>
vinssi pages usage <siteId>
vinssi pages rollback <siteId>               # previous version
vinssi pages rollback <siteId> <versionId>   # a specific version
vinssi pages delete <siteId>
```

`pages rollback` changes what visitors see and `pages delete` removes the site and
its files for good. Ask the user before running either.

## Notes

- The CLI reads `~/.vinssi/credentials.json`. `VINSSI_TOKEN` overrides the saved
  credentials (useful in CI). Never print, paste or log the token.
- If it is not signed in, or fails with `UNAUTHORIZED`, run
  `npx -y vinssi login` yourself in the background. It prints a link and a
  code, then the line `This code expires in 10 minutes.` That is the server's
  `expiresIn` of 600 seconds. Show both to the user and wait. Do not retry in a loop.
- Pages is only for static files. A Vite app is published from its `dist`
  folder after `npm run build`. A Next.js or Node app is not a Pages upload.
  Follow https://vinssi.ai/get-started.md for that path.
- A custom domain is connected in the dashboard, on the site's page. This CLI
  release has no command for it.
