
Moodle-DL
CLI批量下载你在 Moodle 课程里的讲义、作业与提交记录、论坛帖子、测验等资料;再次运行时只下载新增内容,方便 agent 帮你整理复习材料或归档课程。学校的 Moodle 必须允许手机 App 访问,并用你自己的账号登录。
Moodle-DL
Because manually downloading all the course files every few days is justBuilt with ❤︎
moodle-dl is a console application that can download all the files from your Moodle courses that are necessary for your daily study routine. Furthermore, moodle-dl can notify you about various activities on your Moodle server. Notifications can be sent to Telegram, Discord, XMPP and Mail. The current implementation includes:
- Download files, assignments including submissions, books, calendar events, forums, workshops, lessons, quizzes, descriptions, as well as external links (OpenCast, Youtube, Sciebo, Owncloud, Kaltura, Helixmedia, Google drive,... videos/files).
- Notifications about all downloaded files
- Text from your Moodle courses (like pages, descriptions or forum posts) will be directly attached to the notifications, so you can read them directly in your messaging app.
- A configuration wizard is also included, allowing all settings to be made very easily.
- Running moodle-dl again will only download files that have not been downloaded yet. Do not miss any files, if files are deleted online, they are still available offline.
- It is possible to download Moodle courses you are enrolled in, as well as courses that are publicly visible to you.
Discussions about the development take place mainly on Github, but also on Discord.
🚀 Setup
- Install Python >=3.8
- Install ffmpeg
- Run
pip install moodle-dlas administrator.
(To upgrade from an older Version usepip install -U moodle-dlinstead) - [Windows only]
If step 3 failed, you may need to do additional steps. Click here to see the additional Instructions
You may need to install Visual C++ compiler for Python to build all the dependencies successfully:
- Download and Install Microsoft Build Tools for Visual Studio 2019 from here
- In Build tools, install C++ build tools and ensure the latest versions of MSVCv142 - VS 2019 C++ x64/x86 build tools and Windows 10 SDK are checked.
- In some very edge cases, you may also need Visual C++ 14.0 Redistrubution Packages
If you run the program on Windows, please use Powershell or CMD. Please do not use a mintty like MINGW or similar.
- Run
moodle-dl --helpto see all available options.
GUI (optional)
A graphical interface is available for login, course configuration, download management, and settings — no command line needed.
- Install the GUI dependency:
pip install "moodle-dl[gui]" - Launch with:
moodle-dl --gui
Requires PySide6 >= 6.5.0. If PySide6 is not installed, the command prints a helpful error and exits.
Usage
Moodle-dl uses the Moodle mobile API. If your Moodle does not allow access via the Moodle app, Moodle-dl will not be able to connect to your Moodle.
If you don't want moodle-dl to use the current working directory, then you should set the --path option on all commands.
-
moodle-dl --init- Create an initial configuration. A CLI configuration wizard will lead you through the initial configuration.
- If you have to log in with Single Sign On (SSO, something like Shibboleth or OAuth2), you can set the option
--ssoadditionally. - If at any point in time, the saved token gets rejected by Moodle use
moodle-dl --new-tokeninstead - To automate the login you can use the additional options
--usernameand--passwordor--token.
-
moodle-dl- After configuring moodle-dl, this command is sufficient to download all files from your Moodle account and notify you about the result.
-
moodle-dl --config- A CLI configuration wizard will lead you through the additional configuration of moodle-dl.
- You can start the wizard after the initial configuration if you want to change any of the settings.
- The wizard allows you to change nearly all settings of moodle-dl
- select the courses that will be downloaded
- rename each course individually
- decide if subfolders should be created inside a course folder
- set whether submissions (files uploaded to assignments by yourself or a teacher), descriptions, links inside descriptions, databases, quizzes, lessons, workshops and forum discussions should be downloaded
- set if external files should be downloaded (files like Youtube videos)
- set if files on moodle that require a cookie should be downloaded
- to add extra courses to your download list which you can see but you are not enrolled in, check out this wiki entry
- Not all moodle-dl settings are available in the CLI configuration wizard for configuration, see the wiki for more available options.
By default a private token is stored in the initial configuration, this is only needed for special Moodle modules that cannot be queried via the Moodle API. If no such module is available in your Moodle you are welcome to delete this token.
If you need help configuring telegram notifications click here
Notes
- Use a separate E-Mail/XMPP - Account for sending out the notifications, as its login data is saved in cleartext.
- The Login-Information for your Moodle-Account is secure, it isn't saved in any way. Only a Login-Token is saved.
- Your Moodle token is stored in the configuration file (
config.json). Be careful that no unauthorized person reads this file, especially the token must not be given to an unauthorized person, this can cause a lot of trouble. - The
privatetokencan be used to create a cookie for your Moodle account. A Cookie is what is used to tell Moodle that you are logged in. Thecookie.txtalways keeps a valid cookie for you, take great care of this file, if it falls into the wrong hands someone can take over your entire Moodle account. This feature is only important for Moodles with plugins installed that are not supported by the Moodle app. If you do not want to generate cookies, remove theprivatetokenfrom theconfig.json.
Alternativ downloader
- Written with node.js
- Has a nice GUI that allows you to sync your courses easily
- Is only built for the moodle of the Polytechnic University of Milan
- Has pretty much the same goals as moodle-dl
- Is only built for the moodle of the Rhenish-Westphalian Technical University (RWTH) Aachen
- Is built in Rust and therefore quite fast
- Uses a web scraper instead of the moodle mobile API
- It has some interesting commands implemented to download only specific content
- Is only built for the moodle of the Munich University of Technology (TUM)
- Plugin for Firefox and Chrome
- Mass file download and notification functionality for the Moodle
- A chrome extension for batch downloading Moodle resources
- Utilizes moodle-dl to send moodle files via Discord
- Discord Notification Service for your moodle courses
If someone wants to link another downloader here, which offers e.g. functions that moodle-dl does not offer, feel free to open an issue.
🏆 Contributing
You would like to become a maintainer of this project? Then contact me!
Do you have a great new feature idea or just want to be part of the project? Awesome! Every contribution is welcome! If you want to find out more about how to contribute to the project, please check out our CONTRIBUTING.md!
⚖️ License
This project is licensed under the GPL-3.0 License - see the LICENSE file for details
相關資源

YouTube Notetaker
PluginDAIR.AI 出品的学习插件:把 YouTube 讲座或演讲整理成本地学习资料,抽取幻灯片画面、生成带时间戳的字幕文稿,可写笔记并在自带的网页查看器里复习。需安装 Python、yt-dlp 和 ffmpeg。
dair-ai/dair-academy-plugins619
YouTube MCP Server
MCP用 yt-dlp 抓取 YouTube 视频字幕交给 agent,直接说「总结这个视频」就能得到要点,适合老师备课时整理教学视频、研究者和创作者快速了解视频内容。无需 API Key,但本机要先装 yt-dlp(Homebrew 或 WinGet 均可)和 Node.js,并能正常访问 YouTube。
anaisbetts/mcp-youtube552
Moodle MCP Server
MCP让 agent 读取 Moodle 某门课程的学生名单、作业和测验,查看学生提交与答题记录,并直接给作业打分、写评语、给测验写反馈,适合教师辅助批改。需要 Moodle 管理员开通 Web 服务令牌;本机装 Node.js,从源码构建,每次配置只对应一门课程。
peancor/moodle-mcp-server45
aria2
CLI轻量的多协议命令行下载工具,可从多个来源分段并行下载,支持 HTTP(S)、FTP、SFTP、BitTorrent 与 Metalink,能断点续传、从文本文件批量读取链接,并提供 JSON-RPC 接口供脚本或 agent 远程管理下载任务。
aria2/aria243.5k
AI Hedge Fund
CLI模拟对冲基金的多 Agent 系统:巴菲特、芒格等投资风格 Agent 与量化、风控模块共同分析个股并可回测,适合金融课堂演示与学习投资框架。首次运行时填入 Financial Datasets 与模型 API Key;不做真实交易,结论需专业人员复核。
virattt/ai-hedge-fund64.6k
CLI-Anything MuseScore
CLICLI-Anything 里的 MuseScore 4 命令行封装:让 agent 给乐谱转调、提取分谱、增删乐器、查看乐谱信息,并导出 PDF、MIDI、MusicXML、MP3、盲文谱等格式,适合音乐老师批量准备教学乐谱。需先安装 MuseScore 4 桌面软件与 Python 3.10+。
HKUDS/CLI-Anything58.7k
