Terminal-first CLI for Moodle LMS
Project description
moodle-cli
Terminal-first CLI for Moodle LMS that reuses an authenticated browser session.
Repository: https://github.com/bunizao/moodle-cli
Features
- No API token setup required
- Reads
MoodleSessionfrom your browser orMOODLE_SESSION - Works with Moodle AJAX APIs and falls back to authenticated page scraping when needed
- Terminal output plus
--jsonand--yaml
Requirements
- Python 3.10+
uv- An active Moodle browser session, or a
MOODLE_SESSIONenvironment variable
Install
uv sync
Usage
uv run moodle --help
uv run moodle user
uv run moodle courses
uv run moodle activities 34637
Configuration
On first run, the CLI will ask for your Moodle base URL and save it to config.yaml.
Safety checks during setup:
- Requires a full root URL such as
https://school.example.edu - Rejects paths, query strings, and fragments
- Probes the site before saving
- Requires explicit confirmation if the target does not look like Moodle
If you prefer to configure it manually, create config.yaml in the project directory or in ~/.config/moodle-cli/:
base_url: https://school.example.edu
You can copy from config.example.yaml.
Environment overrides:
MOODLE_BASE_URLMOODLE_SESSION
Development
uv run python -m compileall moodle_cli
uv build
CI
GitHub Actions runs the following checks on pushes and pull requests:
- Dependency lock sync with
uv - Bytecode compilation
- CLI smoke check
- Package build
Project details
Release history Release notifications | RSS feed
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 moodle_cli-0.1.0b0.tar.gz.
File metadata
- Download URL: moodle_cli-0.1.0b0.tar.gz
- Upload date:
- Size: 43.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1efafe6b97b24dbe0b7fb0a5bb5a1d242b7d143061a2b533911556924ddba76b
|
|
| MD5 |
91627d483f1602f564f6b399ddd3253e
|
|
| BLAKE2b-256 |
744abe7164e39faa2a65ffcde576829fbd2be6e4c50432667edcd2c454549067
|
Provenance
The following attestation bundles were made for moodle_cli-0.1.0b0.tar.gz:
Publisher:
publish.yml on bunizao/moodle-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
moodle_cli-0.1.0b0.tar.gz -
Subject digest:
1efafe6b97b24dbe0b7fb0a5bb5a1d242b7d143061a2b533911556924ddba76b - Sigstore transparency entry: 1076776342
- Sigstore integration time:
-
Permalink:
bunizao/moodle-cli@5ff3804844f92488bc5fcef5bfd74a28af08762d -
Branch / Tag:
refs/tags/v0.1.0b0 - Owner: https://github.com/bunizao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5ff3804844f92488bc5fcef5bfd74a28af08762d -
Trigger Event:
push
-
Statement type:
File details
Details for the file moodle_cli-0.1.0b0-py3-none-any.whl.
File metadata
- Download URL: moodle_cli-0.1.0b0-py3-none-any.whl
- Upload date:
- Size: 16.0 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 |
9f13fafbf2cf3f5a192c8a5045452b7ff8cbef9ede08d9bc5fccbb7b91fa3e24
|
|
| MD5 |
3b1e7b1885c0463d26ce5386c3680388
|
|
| BLAKE2b-256 |
307d637e295aa4efb203a96cb3924d399177937f2cd0d212af5241d287c50b2b
|
Provenance
The following attestation bundles were made for moodle_cli-0.1.0b0-py3-none-any.whl:
Publisher:
publish.yml on bunizao/moodle-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
moodle_cli-0.1.0b0-py3-none-any.whl -
Subject digest:
9f13fafbf2cf3f5a192c8a5045452b7ff8cbef9ede08d9bc5fccbb7b91fa3e24 - Sigstore transparency entry: 1076776346
- Sigstore integration time:
-
Permalink:
bunizao/moodle-cli@5ff3804844f92488bc5fcef5bfd74a28af08762d -
Branch / Tag:
refs/tags/v0.1.0b0 - Owner: https://github.com/bunizao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5ff3804844f92488bc5fcef5bfd74a28af08762d -
Trigger Event:
push
-
Statement type: