Skip to main content
toss logo

Toss

Toss is a minimal CLI to deploy and share static sites, HTML, and Markdown from your own server. Fast configuration and easy to setup so you can use it from about everywhere and share your work with private URLs.

Features

  • Deploy a Markdown file, an HTML file, or a full directory with a single command
  • Markdown pages render in the browser with LaTeX (KaTeX), syntax highlighting, footnotes, callouts, and Mermaid diagrams
  • Random slugs by default, custom slugs with --slug
  • Build-and-deploy in one step with --build
  • List, hide, unhide, and permanently delete deployments
  • Visit stats (total requests, unique visitors, last accessed) via Caddy JSON logs
  • Machine-readable JSON output with --json (deploy, list, stats)
  • Skip confirmation prompts with -y for scripting and automation
  • Zero server-side dependencies beyond Caddy and SSH access

Installation and setup

Server-side setup

You'll first need to configure your server to serve files through SSH and Caddy. This section assumes you are running the commands on your server.

Add a DNS A record: share (or anything you like) pointing to your server IP.

Create the sites directory and give your SSH user write access:

sudo mkdir -p /srv/sites
sudo chown youruser:youruser /srv/sites

Add a block to your Caddyfile for the share subdomain:

share.yourdomain.com {
    root * /srv/sites
    file_server
    header X-Robots-Tag "noindex, nofollow"
    handle_errors {
        rewrite * /404.html
        file_server
    }
}

If running Caddy in Docker, also mount /srv/sites in your Caddy container's volumes:

volumes:
  - /srv/sites:/srv/sites:ro

Copy the 404 page to your server. Feel free to edit assets/404.html to add your own contact info, and edit toss_cli/templates/markdown_page.html to customize the Markdown rendering theme before installing:

scp assets/404.html user@your-server:/srv/sites/404.html

Then restart Caddy:

# assuming systemd
sudo systemctl reload caddy
# or if using Docker
docker compose up -d caddy

Enabling visit stats

toss stats parses Caddy's JSON access logs over SSH. Note that this required Caddy logging and thus is optional.

Add a log block to your Caddy site block:

share.yourdomain.com {
    log {
        output file /var/log/caddy/access.log
        format json
    }
    root * /srv/sites
    ...
}

If running Caddy in Docker, mount the log directory in your docker-compose.yml:

volumes:
  - /var/log/caddy:/var/log/caddy

Create the log directory and make it readable by your SSH user (run on server):

sudo mkdir -p /var/log/caddy
sudo chmod o+rx /var/log/caddy
# after the first restart, also:
sudo chmod o+r /var/log/caddy/access.log

Restart Caddy, then re-run toss init and enter the log path (default: /var/log/caddy/access.log).

Local CLI

Once the server is configured, install toss:

uv tool install toss-cli

Once toss is installed, run the interactive setup wizard once:

toss init

This will prompt you for your server details, validate SSH connectivity, and save a config file at ~/.config/toss/config.toml.

Usage

# deploy a Markdown file, an HTML file, or a directory
toss deploy path/to/file.md
toss deploy path/to/page.html
toss deploy path/to/site/

# custom slug and title (for Markdown files)
toss deploy report.md --slug my-report
toss deploy report.md --title "My Report"

# build then deploy
toss deploy . --build "npm run build"
toss deploy . --build "npm run build" --out dist

# skip confirmation prompts (useful for scripts)
toss deploy path/to/site/ --slug my-site -y
toss rm <slug> -y

# list all deployments
toss list

# hide (makes URL return 404) and unhide
toss hide <slug>
toss unhide <slug>

# permanently delete
toss rm <slug>

# show visit stats
toss stats <slug>

# machine-readable JSON output
toss --json deploy path/to/site/
toss --json list
toss --json stats <slug>

Metadata

Release files for toss-cli 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toss-cli 1.3.0
File Size Uploaded Provenance Actions
toss_cli-1.3.0.tar.gz 17.9 kB With provenance Details for toss_cli-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for toss-cli 1.3.0
File Interpreter ABI Platform Actions
toss_cli-1.3.0-py3-none-any.whl Python 3 none any Details for toss_cli-1.3.0-py3-none-any.whl

Total release size: 33.3 kB

Release files / toss_cli-1.3.0.tar.gz

Download URL toss_cli-1.3.0.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2d684910ef74e592b58bf30a8fdf0b04d0f00069191d305eb55439c425a23b7d
BLAKE2b-256 checksum
How to use checksums
d73fab56bd41e6653fc59ed366f2196e7e3f4199f9912cd31a29293b4564fffa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Release files / toss_cli-1.3.0-py3-none-any.whl

Download URL toss_cli-1.3.0-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2cd011b5302a1eeb0ea6c310c5c2d43974050f09bc9a787a2a8f866e504daacf
BLAKE2b-256 checksum
How to use checksums
8b542b9086ca63ffd2655adb7cb8a7ae187010b98e2dc5d8992b8f4cba82acfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Security for toss-cli 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for toss_cli-1.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page