CLI reference¶
sharepack PROJECT [-o OUT] [options]
Arguments¶
PROJECTProject root directory. For Django, the directory containing
manage.py.
Options¶
-o, --out PATHOutput HTML file. Default:
demo.html.-q, --quietSuppress the build report.
-V, --versionPrint the sharepack version and exit.
--openOpen the built file in your default browser after writing it.
--dry-runPrint every file that would be bundled (with sizes), everything scrubbed, and every file skipped with the reason. Writes nothing.
--include GLOBBundle files matching this glob even if their extension is not bundled by default. Matched against the file’s path relative to the project root, e.g.
--include "data/*.csv". Repeatable.--exclude GLOBKeep files matching this glob out of the bundle. Takes precedence over everything else. Repeatable.
--settings-module DOTTED.PATHDjango settings module, for projects where detection from
manage.pyfails (customDJANGO_SETTINGS_MODULElogic, split settings, etc.).--app MODULE:VARFlask/FastAPI app location (e.g.
app:app,main:api), for projects where entry-module detection fails. Same syntax as gunicorn/uvicorn.--pyodide-version X.Y.ZPyodide release the artifact loads from the CDN at view time.
--pip-pin SPECpip requirement installed in the browser for the framework. Defaults:
django>=4.2,<5.2,flask>=3,<4,fastapi>=0.110,<0.116. (--django-pinstill works as an alias.)
Exit status¶
0 on success; 1 with a message on stderr when the project path is
invalid or no supported framework is detected.
Examples¶
sharepack myproject -o demo.html --open
sharepack myproject --dry-run
sharepack myproject --include "data/*.csv" --exclude "notebooks/*"
sharepack myproject --settings-module config.settings.dev
sharepack myflaskapp --app serve:application
sharepack myproject --pip-pin "django==5.0.6"