In a terminalAvailable · 0.4.1

MoodlIA CLI

Run every MoodlIA plugin operation from a terminal, a script, or an AI agent's shell.

The npm package moodlia provides the moodlia command and a Node.js client. Each plugin operation is a command with JSON output. Adaptive commands, such as course audits, use the plugin when it is available and Moodle's standard web services when it is not.

What it does

  • One command per plugin operation, with built-in help and parameter checks.
  • Course audit, progress, completion repair, and enrolment workflows.
  • Site profiles that keep tokens in environment variables.

What you need

  • Node.js 22.13 or newer.
  • A Moodle site with the MoodlIA plugin and a token for it.

Installation

Install and configure

  1. Install the command globally:

    npm install -g moodlia
  2. Set the Moodle address and token (bash):

    export MOODLE_BASE_URL="https://your-moodle.example"
    export MOODLE_REST_TOKEN="your-token"
  3. Or in PowerShell:

    $env:MOODLE_BASE_URL = "https://your-moodle.example"
    $env:MOODLE_REST_TOKEN = "your-token"
  4. The same two values can also go in a .env file in the working folder.

First use

  1. Start with read-only commands:

    moodlia get-current-user --format json
    moodlia get-moodlia-status --format json
    moodlia get-courses --limit 10 --format json
  2. List every command, or the parameters of one:

    moodlia --help
    moodlia create-module --help

Good to know

  • Remote Moodle addresses must use HTTPS.
  • Synchronization between sites moved to MoodlIA Sync in version 0.4.0.

Other apps

On your Moodle siteAvailable · 0.1.215

MoodlIA Moodle Plugin

Let AI assistants and scripts work with Moodle safely, within Moodle's own permissions.

In a terminalAvailable · 0.4.1

Moodle Core CLI

Automate Moodle through its standard web services, with nothing to install on Moodle.

In a terminalPreview · 0.1.1

MoodlIA Sync

Copy course content from one Moodle site to another without backups, after you approve a plan.

Need help?

Questions about installing or using any MoodlIA app, or ideas for new ones: write to us.

contact@moodlia.com