MoodlIA CLI
Runs Moodle tasks from a terminal or repeatable workflow.

Here for one clear job.
The adaptive command-line tool and reusable Node client for Moodle 4.5 and later. It uses verified MoodlIA capabilities when the plugin is available and falls back to exact Moodle Core services when it is not.
Open the npm package01
What it helps with
- Adapts per capability across MoodlIA and Moodle Core
- Offers explicit Core and plugin namespaces and machine-readable outcome codes
- Reads long HTML from UTF-8 files for every text field and streams large files
- Available as a global command or project dependency
- Includes a reusable client and generated TypeScript declarations
02
A good fit for
- People who prefer a terminal for repeatable Moodle work
- Scripts that build, inspect, or audit course content
- Automation workers that need the public MoodlIA client
03
What you need
- Node.js 22.13 or later
- Moodle 4.5 or later with REST web services enabled
- A limited Core or MoodlIA REST token for each configured site
How installation and use work.
This is a terminal tool. You do not need to learn it alone: your Moodle or IT colleague can complete the one-time setup with you.
Set it up once
- Ask a colleague who is comfortable with command-line tools to install MoodlIA CLI on the computer you will use.
- Give them the Moodle address and a dedicated MoodlIA REST token supplied by your Moodle administrator.
- Keep that token private and use a test course for your first connection.
Try one small thing
- Open the command tool and check that it can read your Moodle site.
- Try one small, reversible task, such as listing a course or creating a draft item.
- Check the result in Moodle before repeating the workflow.
CONCRETE STEPS
Install and run MoodlIA CLI
Use this when you want repeatable Moodle tasks from a terminal. It connects through REST only; there is no MCP setting in the CLI.Install it
Install Node.js 22.13 or later, then run this once in PowerShell or Terminal.
Open MoodlIA CLI on npmnpm install -g moodliaAdd your Moodle connection
Your Moodle administrator provides a limited MoodlIA REST token. Paste these values into the same PowerShell window; replace the example values.
$env:MOODLE_BASE_URL = "https://your-moodle.example" $env:MOODLE_REST_TOKEN = "your-token"Check the connection
This read-only command confirms that the CLI can reach Moodle with your account.
moodlia get-current-userTry a small task
Ask the command for its options, then begin in a test course. Check every result in Moodle.
moodlia --help moodlia get-courses --limit 10
Want help with MoodlIA CLI?
Tell us what you are trying to achieve. We can help you choose, start, configure, or troubleshoot the right MoodlIA project.
Write to contact@moodlia.com