Minimal CLI to deploy and share static sites, HTML, and Markdown from your own server.
Project description
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
- Zero server-side dependencies beyond Caddy and SSH access
Installation and setup
[!NOTE] The following prerequisites are needed before installing toss.
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
Local CLI
Once the server is configured, clone the repo and install toss locally:
git clone https://github.com/brayevalerien/toss
cd toss
uv tool install .
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.
[!NOTE] Re-run
toss initat any time to update your configuration. If you prefer to edit it manually, it uses the following format:host = "user@my-server" domain = "share.mydomain.com" remote_path = "/srv/sites" slug_length = 6
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
toss deploy report.md --slug my-report
# build then deploy
toss deploy . --build "npm run build"
toss deploy . --build "npm run build" --out dist
# list all deployments
toss list
# hide (makes URL return 404) and unhide
toss hide <slug>
toss unhide <slug>
# permanently delete
toss undeploy <slug>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toss_cli-1.0.0.tar.gz.
File metadata
- Download URL: toss_cli-1.0.0.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc5b538d134f61cd5f81721c40eacae254c6740c24662ab422a7d0bed7f1bb94
|
|
| MD5 |
57932ce2e089b47045357e02a1146e87
|
|
| BLAKE2b-256 |
541674eabf3e54f131415be3632fa18b22eb4674491b9c391a1a1653e1ff7d59
|
Provenance
The following attestation bundles were made for toss_cli-1.0.0.tar.gz:
Publisher:
publish.yml on brayevalerien/toss
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toss_cli-1.0.0.tar.gz -
Subject digest:
dc5b538d134f61cd5f81721c40eacae254c6740c24662ab422a7d0bed7f1bb94 - Sigstore transparency entry: 1008235552
- Sigstore integration time:
-
Permalink:
brayevalerien/toss@ab25904869f617fc20822cdd6706952cf9fb63ff -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/brayevalerien
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ab25904869f617fc20822cdd6706952cf9fb63ff -
Trigger Event:
push
-
Statement type:
File details
Details for the file toss_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: toss_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47418617303d4c9514d3bc4d281afe6a43bed03bbabd4ed6d0f70c6a6594f4a4
|
|
| MD5 |
b3d6b63dc072371174aad100f08b7fc6
|
|
| BLAKE2b-256 |
839f46451bc48c7fc2a10869cea307290695d8f62e8b2e02cd7bad9159ede625
|
Provenance
The following attestation bundles were made for toss_cli-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on brayevalerien/toss
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toss_cli-1.0.0-py3-none-any.whl -
Subject digest:
47418617303d4c9514d3bc4d281afe6a43bed03bbabd4ed6d0f70c6a6594f4a4 - Sigstore transparency entry: 1008235556
- Sigstore integration time:
-
Permalink:
brayevalerien/toss@ab25904869f617fc20822cdd6706952cf9fb63ff -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/brayevalerien
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ab25904869f617fc20822cdd6706952cf9fb63ff -
Trigger Event:
push
-
Statement type: