--- name: module-management description: How to view, edit, test, reload modules and manage startup configuration tags: [modules, editing, code, self-improvement] category: dev --- ## Steps 1. **View module source:** - view_module(name) — fetches original source or reads from _mods/ if edited - Supports all loaded modules: SystemModule, FileSystemModule, SearXNGModule, etc. 2. **Edit a module:** - edit_module(name) — copies source to _mods/.js and opens code editor - Editor shows the full source in a textarea - Click "Save & Test" to save and auto-load the edited version 3. **Test and reload:** - test_module(name) — loads edited module from _mods/ for live testing - reload_module(name) — discards edits and reloads from original URL - list_modified_modules — shows all modules with pending edits 4. **Check for updates:** - check_updates — HEAD-requests all loaded module URLs to verify reachability 5. **Manage startup:** - startup-modules — opens the Startup Modules UI to select which modules load - load-local — load a module from VFS or URL without editing 6. **When to use:** - User reports a bug in a module → view_module, edit_module, test_module - User asks "can you add X feature?" → same workflow - Always save edits before testing. If test fails, the original module stays loaded.