Repository navigation
Installation
Check the Releases page before using a package manager: these commands work after the first stable release and package entries are public. If there is no published release yet, build from source.
Once the binary is installed, print a script for your shell and put it where that shell looks:
moodle shell-completion bash > /etc/bash_completion.d/moodle
moodle shell-completion zsh > "${fpath[1]}/_moodle"
moodle shell-completion fish > ~/.config/fish/completions/moodle.fish
moodle shell-completion powershell | Out-String | Invoke-ExpressionIt is not called completion: that name belongs to Moodle's own activity
completion. Site and account names complete from your configuration, so
nothing is requested from the site while you type.
Use the project's tap; this formula is not in Homebrew Core:
brew tap KoukeNeko/tap
brew install koukeneko/tap/moodle-cli
moodle versionTo upgrade later, run brew update followed by brew upgrade moodle-cli. The formula contains
release-specific SHA-256 hashes for macOS and Linux, on amd64 and arm64.
Add the project's bucket and install its manifest:
scoop bucket add koukeneko https://github.com/KoukeNeko/scoop-bucket
scoop install koukeneko/moodle-cli
moodle versionTo upgrade later, run scoop update followed by scoop update moodle-cli. The manifest supports
Windows amd64 and arm64, with a separate SHA-256 hash for each archive. Windows binaries are not
Authenticode-signed, so SmartScreen may ask for confirmation.
The Releases page lists the published
archives, checksums.txt, and its keyless workflow signature. Select the archive for your OS and
architecture, compare its SHA-256 digest against checksums.txt, then put the extracted moodle
(moodle.exe on Windows) on your PATH. Do not run an asset whose checksum does not match.
Package repositories update only after the stable release passes real-macOS signing and notarization verification. If the newest tag is not yet in the tap or bucket, use the previous stable package or wait for the release workflow to complete.
An interactive moodle run says on stderr when a newer release exists, checked at most once a day.
The security model lists what is sent and how to turn it off. The notice appears
when the release is published, which can be before your package manager has it.
Use Git, GNU Make, and Go 1.26 or newer:
git clone https://github.com/KoukeNeko/Moodle-CLI.git
cd Moodle-CLI
make build
./bin/moodle versionInstall to ~/.local/bin:
make installOverride PREFIX or BINDIR when another destination is needed:
make install PREFIX=/opt/moodle-cli
make install BINDIR="$HOME/bin"make build produces a pure-Go binary at bin/moodle.
make verifyThis runs unit and contract tests, the race detector, formatting and vet checks, then builds the binary. Docker-backed Moodle tests are separate because they download images and create local test sites; see Development and testing.
The CLI builds on Linux, macOS, and Windows. Automatic browser callbacks use a per-user D-Bus service
on Linux and an Apple Event handler on macOS. macOS builds its handler with the system's osacompile
on first sign-in, without requiring Xcode. Windows should use moodle auth login --method manual.
Moodle CLI
- Home · 繁中
- Installation · 安裝
- Authentication and sites · 登入與站台
- Commands · 命令
- Complete command reference · 完整命令參考
- Feature coverage · 功能覆蓋
- Roles and capabilities · 角色與 capability
- Scale test model · 規模測試模型
- Report contract · 報告契約
- JSON contract · JSON 契約
- Automation recipes · 自動化範例
- Claude connector · Claude connector
- Security model · 安全模型
- Development and testing · 開發與測試