Skip to main content

Mooship Python CLI

Install Mooship through pip or pipx, then use one command for its existing Moodle deployment, backup, restore and diagnostics scripts. The Python package needs Python 3.8+ and has no runtime dependencies. It follows LaraShip's verified-release installer design. Installing the package does not deploy Moodle, install Docker or modify server resources.

Install the CLI

Version 1.2.0 introduces Python packaging. Until it is published, install a reviewed checkout with pipx install . or python -m pip install . in a virtual environment. After publication:

pipx install mooship==1.2.0
mooship --version
mooship --help

Help and installation previews work without root. Server operations target Ubuntu 20.04+ with Bash, Python 3 and Docker/Compose; use SSH from Windows/macOS. Do not use sudo pip or bypass OS-managed Python protections.

Install the native toolkit

The CLI downloads an exact official GitHub release archive and its SHA-256 file over HTTPS, verifies the checksum, archive paths/types/limits and embedded VERSION, then installs into a new directory. Existing files/directories/symlinks are refused. A failed copy remains marked for inspection and cannot silently be reused. Checksums establish consistency with the release assets rather than an independent signature.

mooship install --version 1.2.0 --directory /opt/mooship --dry-run
MOOSHIP_CLI="$(command -v mooship)"
sudo "$MOOSHIP_CLI" install --version 1.2.0
mooship toolkit-version
sudo "$MOOSHIP_CLI" deploy -- \
  --slug lms --domain lms.example.com --db-type postgres --ssl-email admin@example.com
sudo "$MOOSHIP_CLI" doctor -- --slug lms
sudo "$MOOSHIP_CLI" backup -- --slug lms

Default directory: /opt/mooship; its parent must exist. Use --directory /absolute/path before -- for another installation or a complete reviewed checkout containing VERSION. The CLI never escalates privileges implicitly; underlying scripts retain their root checks, confirmation prompts and operational contracts.

Commands and forwarding

mooship --version
mooship install [--version X.Y.Z] [--directory PATH] [--dry-run]
mooship toolkit-version [--directory PATH]
mooship deploy|activate|deactivate|remove|list|backup|restore|schedule-backup|doctor [--directory PATH] -- [script arguments]

Arguments following -- are forwarded unchanged as separate values. The adapter does not print them. Terminal input, signals and exit codes pass to the existing Bash process, including doctor's status 0/1/2. Argument parsing errors exit 2, installation/preflight errors exit 1, and interrupted installation exits 130. Check the README and each script's supported flags before use.

The Docker Hub images contain the Moodle application and nginx, not these host administration scripts. There is no privileged Docker-controller backend in this CLI. Run the standalone stack using the separate Docker guide.

Updating the Python package updates the adapter only. Install a new native toolkit into a new directory and select it explicitly; existing sites, data, backups and templates are not migrated. Uninstalling the package does not remove sites or toolkit files.

Build and verify

python -m pip install -r requirements-python-build.txt
python -m unittest discover -s tests -p test_python_cli.py -v
python -m build
python -m twine check --strict dist/*

The package workflow also rebuilds the wheel from the source distribution, installs it in fresh Python environments, and runs installed CLI checks. Native toolkit archives are separate GitHub release assets generated from tracked runtime files by .github/scripts/build_release.py; no local secrets or AI-KIT files are included.

PyPI publication

The Release workflow publishes checked distributions through PyPI Trusted Publishing, without a long-lived PyPI token. Configure a pending publisher in your PyPI account: project mooship, owner shellharbor, repository mooship, workflow release.yml, environment pypi. A pending publisher does not reserve the package name. Create the matching GitHub environment and set repository variable PYPI_PUBLISH=true when configured.

See release publication for checked release tags, native assets, Docker Hub configuration, retries and evidence. Package version and toolkit release come from the same VERSION file.

Metadata

Release files for mooship 1.2.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 mooship 1.2.0
File Size Uploaded Provenance Actions
mooship-1.2.0.tar.gz 8.9 kB With provenance Details for mooship-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mooship 1.2.0
File Interpreter ABI Platform Actions
mooship-1.2.0-py3-none-any.whl Python 3 none any Details for mooship-1.2.0-py3-none-any.whl

Total release size: 18.3 kB

Release files / mooship-1.2.0.tar.gz

Download URL mooship-1.2.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bdfbe3d97b7b0c108744e56eebc0fcf37f85e5cb6cd4e91f7aa99eecde13c2cd
BLAKE2b-256 checksum
How to use checksums
e33c49b3cb15ba815ffcf5d4a7239fe0438d2ea4b5cc1e7fcceabb1712785d50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / mooship-1.2.0-py3-none-any.whl

Download URL mooship-1.2.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1e06e8dc9c83d5753e6aa1112297b9afe0ba597753b503937f4528636aee777
BLAKE2b-256 checksum
How to use checksums
eb96c919dab886b58322b5a425127d9bd037ae15a92bc5c777401d006f57ad14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Security for mooship 1.2.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mooship-1.2.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 Oct 28, 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.

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files Full provenance

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