---
name: itproshare
description: Publish websites, web apps, HTML reports, images, video, audio, PDFs or any files to a private share URL on share.itproact.com. Use when the user asks to share, publish, host, deploy or "send a link to" something you made, or when a result is easier to view in a browser than in the terminal.
---

# ITProShare — instant private hosting at share.itproact.com

`itpshare` uploads a folder or file and prints a public URL like
`https://bright-otter-3f9a.share.itproact.com/`. It is already configured with an API key.

## Publish

```sh
itpshare publish ./dist            # a folder (static site / built app) -> URL
itpshare publish report.html       # one HTML page (served as index.html)
itpshare publish chart.png         # image, video, audio or PDF -> viewer page + direct file
itpshare publish ./photos          # folder without index.html -> auto gallery/listing page
```

Options:
- `--slug my-demo` — pick the name: `https://my-demo.share.itproact.com/` (a-z, 0-9, `-`).
- `--ttl 24h` / `--ttl 7d` — auto-delete later. Default is keep forever; use a TTL for throwaway previews.
- `--spa` — single-page app routing (unknown paths return `index.html`).
- `--title "Q3 results"` — say what it is. Always set one; it shows on the team dashboard and on generated viewer pages.
- `--extract` — unpack a `.zip` / `.tar.gz` file as a site instead of sharing the archive.
- `--new` — force a new URL. Without it, re-publishing the same path updates the same URL.
- `--json` — machine-readable output.

Manage: `itpshare list`, `itpshare delete <slug>`, `itpshare whoami`, `itpshare update`.

## Guidance

- Build first, then publish the output folder (`dist/`, `build/`, `out/`), not the source tree.
  Configure bundlers with a relative or root base path (`/`) — each site has its own subdomain so root-absolute paths work.
- Sites are static: HTML/CSS/JS, WASM, media, JSON. No server-side code runs. Client-side apps that call external APIs are fine.
- `index.html` is the entry point; `/about` also serves `about.html`; a `404.html` is used for missing pages.
- Video and audio support seeking (HTTP range requests). Keep uploads under ~500 MB.
- Links are unlisted but not secret — anyone with the URL can view. Don't publish credentials or sensitive personal data.
- Always give the user the printed URL.

## Raw HTTP API (if the CLI isn't available)

Auth header: `Authorization: Bearer $ITPS_KEY` (key is in `~/.config/itproshare/config`).

```sh
# folder
tar -C ./site -czf - . | curl -sS -X POST -H "Authorization: Bearer $ITPS_KEY" \
  -H "Content-Type: application/gzip" -T - "https://share.itproact.com/api/sites?ttl=7d"
# single file
curl -sS -X POST -H "Authorization: Bearer $ITPS_KEY" -T video.mp4 "https://share.itproact.com/api/sites?filename=video.mp4"
# multiple files (form filename keeps sub-paths)
curl -sS -H "Authorization: Bearer $ITPS_KEY" -F "f=@index.html" -F "f=@app.js;filename=js/app.js" "https://share.itproact.com/api/sites"
```

- `POST /api/sites` creates (optional `?slug=`); `PUT /api/sites/<slug>` creates or replaces.
- Body: `application/gzip` or `application/x-tar` (tarball), `application/zip`, `multipart/form-data`, or any single raw file with `?filename=`.
- Query: `ttl`, `spa=1`, `title`, `format=text`. Response JSON includes `url`, `slug`, `files`, `bytes`, `expires`.
- `GET /api/sites` lists your sites, `GET /api/sites/<slug>` shows one, `DELETE /api/sites/<slug>` deletes, `GET /api/me` checks the key.
