MoodlIA CLI

Runs Moodle tasks from a terminal or repeatable workflow.

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.

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 package

01

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

  1. Ask a colleague who is comfortable with command-line tools to install MoodlIA CLI on the computer you will use.
  2. Give them the Moodle address and a dedicated MoodlIA REST token supplied by your Moodle administrator.
  3. Keep that token private and use a test course for your first connection.

Try one small thing

  1. Open the command tool and check that it can read your Moodle site.
  2. Try one small, reversible task, such as listing a course or creating a draft item.
  3. Check the result in Moodle before repeating the workflow.
Get help to start this tool

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.
  1. Install it

    Install Node.js 22.13 or later, then run this once in PowerShell or Terminal.

    npm install -g moodlia
    Open MoodlIA CLI on npm
  2. Add 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"
  3. Check the connection

    This read-only command confirms that the CLI can reach Moodle with your account.

    moodlia get-current-user
  4. Try 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