hoshilet
Deploy static sites to a hoshilet instance.
Also available as an npm package.
Install
pip install hoshilet
# or
uv tool install hoshilet
Requires Python 3.10–3.15.
Quick Start
Set two environment variables and you're ready to deploy:
export HOSHILET_SERVER=https://hoshilet-admin.example.com
export HOSHILET_API_KEY=your-key
Deploy a directory as a static site:
hoshilet deploy ./dist --namespace team --project docs
That's it — the site goes live immediately at /~team/docs/.
Deploying
The basic deploy command zips your directory and uploads it:
# Auto-creates the project if your key belongs to a namespace admin.
hoshilet deploy ./dist --namespace team --project docs
# Use a project ID directly (project keys can't auto-create projects).
hoshilet deploy ./dist --project-id PROJECT_ID
By default, a deployment is activated (goes live) as soon as the upload succeeds. To upload without going live, add --no-activate:
hoshilet deploy ./dist --project-id PROJECT_ID --no-activate
Concurrency Safety
--revisionprevents accidental overwrites — the server rejects the deploy if someone else published in the meantime.--idempotency-keylets you safely retry a failed upload without creating a duplicate deployment.
Tip: If a deploy seems stuck or the network dropped, check existing deployments first (
hoshilet deployments list) rather than immediately retrying with a new idempotency key.
Managing Deployments
# List all deployments of a project.
hoshilet deployments list --project-id PROJECT_ID
# Activate (roll forward/back to) a specific deployment.
hoshilet activate DEPLOYMENT_ID --project-id PROJECT_ID
JSON Output
Add --json to any command for machine-readable JSON output on stdout:
hoshilet --json deploy ./dist --namespace team --project docs
GitLab CI (OIDC)
Instead of static API keys, you can authenticate with a GitLab CI OIDC token:
export HOSHILET_ID_TOKEN=$CI_JOB_JWT_V2 # or use GitLab's id_tokens
hoshilet deploy ./dist --oidc --project-id PROJECT_ID
The audience must match the management origin. A namespace admin needs to configure OIDC trust rules in the web UI beforehand, binding the GitLab issuer, the numeric GitLab project ID, and allowed branches.
Branch matching rules:
*means all branches (but not tags).allis a literal branch name — it only matches a branch literally namedall.- Glob patterns like
release/*are not supported.
Each trust rule can independently set:
require_ref_protected(default: off) — only accepts tokens where theref_protectedclaim istrue.allow_mr_pipelines(default: off) — accepts merge-request pipelines from the same repo, matched by source branch. Cross-fork MRs are always rejected.
See deploy/gitlab-ci.example.yml for a working CI config.
OIDC deploys cannot auto-create projects.
Limits
- Namespace mode is sticky: a namespace is either a single root site or a collection of sub-projects. Delete all projects to switch modes.
- Versions are immutable. Going live is an atomic symlink swap; the version directory itself never changes.
- Empty ZIPs are rejected (directories only, no regular files →
422 empty_deployment). Zero-byte files are fine. - No symlinks in uploads. Paths cannot escape the archive root. ZIPs are validated and extracted in a sandboxed subprocess.
- Classic ZIP only: Store or Deflate. No ZIP64, encryption, self-extracting, or multi-volume archives. Files inside the archive may themselves be compressed files — they won't be recursively unpacked.
- Retention: 10 versions per project by default, 100 MiB max per version (uncompressed). Old files are cleaned up after a 10-minute grace period.
- No cross-request snapshot guarantee. Use content-hashed filenames for assets. Set the correct
/~namespace/project/base path at build time — the platform won't rewrite URLs. - Upload concurrency: 4 global / 1 per user by default, 120s timeout. Multiple keys from the same user share the quota; OIDC quotas are per issuer + GitLab project ID. Tunable via
max_uploads,max_uploads_per_principal,upload_timeout_seconds. - Shared content origin. The management site must use a separate origin. The first version does not support private sites, custom domains, SSR, online builds, SPA fallback, or replicas.
Server Messages
Instance administrators can set a broadcast message in the server config:
{"server_message": "Welcome.\nMaintenance window: Sundays 02:00–03:00 UTC."}
The CLI displays these messages on stderr. Duplicate messages within a single command are shown only once. Malformed message headers produce a fixed warning and are never echoed raw.
Metadata
Release files for hoshilet 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hoshilet-0.1.0.tar.gz | 11.5 kB | Without provenance | Details for hoshilet-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hoshilet-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for hoshilet-0.1.0-py3-none-any.whl |
Total release size: 19.0 kB
Release files / hoshilet-0.1.0.tar.gz
| Download URL | hoshilet-0.1.0.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b74b6b97209558f70ad8425a22ad1d79bfe742b53c8c821e539c5db9e900ad2
|
|
BLAKE2b-256 checksum How to use checksums |
f4706b3d0e9a6d9f9f9aa48bf29bad781370d034398ced9cb61321b113e503ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / hoshilet-0.1.0-py3-none-any.whl
| Download URL | hoshilet-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30d19d75ece48ca6cf6727f78928a07f619ad0791e9d58483ca0a74c72f9d285
|
|
BLAKE2b-256 checksum How to use checksums |
65d856bce21dd142027ff5949de8223340be13f369c8e5c95f04a8b89dc52d8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for hoshilet 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.