Moodle Core CLI

Works with Moodle's standard web services without installing a plugin.

Command-line and Node clientPublished npm package

An educator planning a course with lesson notes and a laptop in a bright learning space
AI that supports the way you already teach

Here for one clear job.

A friendly client and command-line interface for Moodle 5.0 and later core web services. It turns complex REST details into stable operations without requiring the MoodlIA plugin.

Open the npm package

01

What it helps with

  • Uses Moodle core web services only
  • Handles nested parameters, version checks, and response normalisation
  • Exposes friendly operations instead of arbitrary remote calls

02

A good fit for

  • Moodle sites that cannot install an additional plugin
  • Developers who want a typed client for core services
  • Controlled automation using standard Moodle capabilities

03

What you need

  • Node.js 22 or later
  • Moodle 5.0 or later with REST web services enabled
  • A token whose service exposes each required Moodle function

How installation and use work.

This option is useful when your Moodle site cannot install the MoodlIA plugin. It still needs a Moodle administrator to prepare access safely.

Set it up once

  1. Ask your Moodle administrator to enable the standard REST services needed for your task.
  2. Ask a colleague who uses command-line tools to install Moodle Core CLI on your computer.
  3. Use a dedicated token with only the Moodle functions you need.

Try one small thing

  1. First confirm that the tool can read your Moodle site.
  2. Try a small task in a test course before changing a live course.
  3. Review the Moodle result after every new workflow.
Get help to start this tool

CONCRETE STEPS

Install and run Moodle Core CLI

This is the plugin-free option. It uses Moodle's standard REST web services and needs a token prepared by your Moodle administrator.
  1. Prepare standard Moodle access

    Ask your Moodle administrator to enable REST web services and give you a dedicated token with only the Moodle functions you need.

  2. Set your connection

    In PowerShell, replace the two sample values with the Moodle address and token you were given.

    $env:MOODLE_BASE_URL = "https://your-moodle.example"
    $env:MOODLE_TOKEN = "your-token"
  3. Run the first check

    npx downloads and runs the package without a separate global installation.

    npx moodle-core-cli get-courses
    Open Moodle Core CLI on npm
  4. Make changes deliberately

    Reading is the default. Any write operation must explicitly include --allow-write, so start by checking courses first.

Want help with Moodle Core 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