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

Mooship 1.2.1 enforces the mandatory PHP/Moodle security policy. Upgrade both the CLI and native toolkit from 1.2.0. The CLI rejects deployment, activation and restore using pre-policy toolkits while retaining backup/diagnostic access.

Get version 1.2.1 from PyPI. A reviewed checkout can also be installed with pipx install . or python -m pip install . in a virtual environment. For the published CLI:

pipx install mooship==1.2.1
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.1 --directory /opt/mooship-1.2.1 --dry-run
MOOSHIP_CLI="$(command -v mooship)"
sudo "$MOOSHIP_CLI" install --version 1.2.1 --directory /opt/mooship-1.2.1
mooship toolkit-version --directory /opt/mooship-1.2.1
sudo "$MOOSHIP_CLI" deploy --directory /opt/mooship-1.2.1 -- \
  --slug lms --domain lms.example.com --db-type postgres --ssl-email admin@example.com
sudo "$MOOSHIP_CLI" doctor --directory /opt/mooship-1.2.1 -- --slug lms
sudo "$MOOSHIP_CLI" backup --directory /opt/mooship-1.2.1 -- --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.1

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.1
File Size Uploaded Provenance Actions
mooship-1.2.1.tar.gz 9.1 kB With provenance Details for mooship-1.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 18.9 kB

Release files / mooship-1.2.1.tar.gz

Download URL mooship-1.2.1.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bb3f0f576faae916e0afff57a274b16be61202480fd40386855397498383c969
BLAKE2b-256 checksum
How to use checksums
54f1dc6ecf1c2cb276d287f59640d7afc8ada1b5956955cf1db73cb9b23fa201
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.1-py3-none-any.whl

Download URL mooship-1.2.1-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36c55cc6ed639299d1dcfb36b13d90456476797a63a47c3066759c2314f1663e
BLAKE2b-256 checksum
How to use checksums
7241d092e6b186a63ed583c4590b00a299df38c4ddc6aa010441a1629250df00
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.1

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 mooship-1.2.1.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.1 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