Skip to content

Quickstart

import { Steps } from ‘@astrojs/starlight/components’;

Publish a live page with one request. You’ll need an API token — see Authentication.

  1. Save your token. Put it in ~/.shareout/credentials:

    ~/.shareout/credentials
    { "token": "so_your_token_here" }
  2. Publish a page. ShareOut sits behind Cloudflare, which can block raw Python requests. The reliable pattern is to build the JSON in Python and pipe it to curl:

    Terminal window
    TOKEN=$(python3 -c "import json,os; print(json.load(open(os.path.expanduser('~/.shareout/credentials')))['token'])")
    python3 - <<'PY' | curl -sS -X POST 'https://shareout.site/v1/publish' \
    -H "Authorization: Bearer $TOKEN" \
    -H 'Content-Type: application/json' \
    --data-binary @-
    import json, sys
    json.dump({
    "name": "Hello ShareOut",
    "slug": "hello-shareout",
    "visibility": "public",
    "files": [{
    "path": "index.html",
    "content": "<!DOCTYPE html><html><body><h1>Hello, world.</h1></body></html>",
    "mime": "text/html",
    "encoding": "utf8"
    }]
    }, sys.stdout)
    PY
  3. Open your URL. The response includes the live link:

    {
    "artifact": { "id": "art_abc123" },
    "deployment": {
    "slug": "hello-shareout",
    "url": "https://shareout.site/a/hello-shareout/"
    }
    }

That’s it — your page is live. Update it any time by publishing again with the same slug; ShareOut creates a new version and keeps the old ones.