White Wii U console and GamePad displaying the GameTDB plugin settings
body:has(#uf-plugin-doc) #header.site-header{background:#092635} body:has(#uf-plugin-doc) #header.header–not-sticked{position:relative} body:has(#uf-plugin-doc) #content.site-content{padding:0;background:#fff} body:has(#uf-plugin-doc) #content>.container{padding:0;width:100%;max-width:none} body:has(#uf-plugin-doc) #content>.container>.row{margin:0} body:has(#uf-plugin-doc) #content>.container>.row>.col-md-12{width:100%;padding:0;float:none} body:has(#uf-plugin-doc) .itemBody>.zn_page_image{display:none} #uf-plugin-doc{–night:#092635;–ink:#163441;–accent:#08737c;–line:#dbe5e6;margin:0;color:var(–ink);background:#fff;font-family:Roboto,”Segoe UI”,Arial,sans-serif;font-size:17px;line-height:1.67} #uf-plugin-doc *,#uf-plugin-doc *::before,#uf-plugin-doc *::after{box-sizing:border-box} #uf-plugin-doc a{color:#006474;text-decoration:underline;text-underline-offset:.18em} #uf-plugin-doc a:focus-visible{outline:3px solid #28a3b5;outline-offset:4px} #uf-plugin-doc .ufp-cover{background:var(–night);color:white;border-bottom:4px solid #5fd0c4;overflow:hidden} #uf-plugin-doc .ufp-cover-inner{max-width:1380px;padding:0 clamp(24px,5.2vw,78px);margin:auto;display:grid;align-items:center;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr)} #uf-plugin-doc .ufp-head{position:relative;z-index:1;padding:42px 0 50px} #uf-plugin-doc .ufp-path{display:flex;align-items:center;gap:12px;margin:0 0 25px;color:#a8c4c9;font:600 12px/1.4 Roboto,Arial,sans-serif;letter-spacing:.07em;text-transform:uppercase} #uf-plugin-doc .ufp-path a{color:#bceddf;text-decoration:none} #uf-plugin-doc .ufp-path a:hover{text-decoration:underline} #uf-plugin-doc .ufp-path span[aria-hidden]{color:#65848d} #uf-plugin-doc h1,#uf-plugin-doc h2{font-family:Roboto,”Segoe UI”,Arial,sans-serif;text-transform:none} #uf-plugin-doc h1{margin:0 0 18px;color:#fff;font-size:clamp(43px,4.6vw,74px);line-height:1.025;font-weight:700;letter-spacing:-.046em} #uf-plugin-doc h1 span{color:#8ee7db;display:block} #uf-plugin-doc .ufp-summary{max-width:43ch;margin:0;color:#d4e7eb;font-size:clamp(17px,1.3vw,20px);line-height:1.5} #uf-plugin-doc .ufp-art{min-width:0;align-self:stretch;position:relative;margin:0 -4% 0 0;display:flex;align-items:center} #uf-plugin-doc .ufp-art::after{content:””;position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,var(–night),transparent 13%,transparent 95%,var(–night))} #uf-plugin-doc .ufp-art img{width:100%;height:auto;display:block;margin:0} #uf-plugin-doc .ufp-reading{max-width:1220px;margin:0 auto;display:grid;grid-template-columns:205px minmax(0,790px);justify-content:space-between;gap:clamp(35px,5vw,84px);padding:52px clamp(24px,5vw,76px) 68px} #uf-plugin-doc .ufp-toc{align-self:start;position:sticky;top:105px;min-width:0;font-size:15px} #uf-plugin-doc .ufp-toc h2{margin:0 0 16px;font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#49626a} #uf-plugin-doc .ufp-toc a{display:block;padding:8px 0 8px 14px;border-left:2px solid #cededd;color:#345762;line-height:1.4;text-decoration:none} #uf-plugin-doc .ufp-toc a:hover,#uf-plugin-doc .ufp-toc a:focus-visible{color:#006474;border-color:#13988b;background:#f1f8f7} #uf-plugin-doc .ufp-body{min-width:0} #uf-plugin-doc .ufp-body p{margin:0 0 1.05em} #uf-plugin-doc .ufp-body h2{color:#0c303f;font-weight:700;letter-spacing:-.033em;line-height:1.13;font-size:clamp(26px,2.5vw,36px);margin:40px 0 16px;scroll-margin-top:105px} #uf-plugin-doc .ufp-note{background:#eef7f6;border-left:3px solid #2a9c91;padding:13px 17px;font-size:15px;line-height:1.55} #uf-plugin-doc code{font-family:Consolas,”Liberation Mono”,monospace;font-size:.89em;background:#edf4f4;border:0;border-radius:3px;padding:.09em .3em;color:#144d58;overflow-wrap:anywhere} #uf-plugin-doc .ufp-file{margin:20px 0 28px;border-radius:9px;overflow:hidden;background:#102935} #uf-plugin-doc .ufp-file-head{padding:11px 18px;display:flex;align-items:center;justify-content:space-between;gap:1rem;background:#193844;border-bottom:1px solid #3b5660;color:#d7eeee;font:600 13px/1.5 Consolas,monospace} #uf-plugin-doc .ufp-file-head span{color:#a2c5c9;font-weight:400} #uf-plugin-doc pre{margin:0;padding:19px 18px 22px;border:0;background:transparent;color:#e6f1f4;overflow:auto;tab-size:4} #uf-plugin-doc pre code{font-size:14px;line-height:1.55;padding:0;border:0;display:block;background:transparent;color:inherit;white-space:pre;overflow-wrap:normal} #uf-plugin-doc pre .ps-k,#uf-plugin-doc pre .ps-kd,#uf-plugin-doc pre .ps-kr,#uf-plugin-doc pre .ps-kc{color:#8fe5ee} #uf-plugin-doc pre .ps-s,#uf-plugin-doc pre .ps-s1,#uf-plugin-doc pre .ps-s2{color:#b6e6b4} #uf-plugin-doc pre .ps-c,#uf-plugin-doc pre .ps-c1{color:#9ab3bd} #uf-plugin-doc pre .ps-mi,#uf-plugin-doc pre .ps-mf{color:#ffd393} #uf-plugin-doc .ufp-body ol{padding-left:1.5em;margin:0 0 20px} #uf-plugin-doc .ufp-body ol li{padding-left:4px;margin:8px 0} #uf-plugin-doc .ufp-body li::marker{color:#00746e;font-weight:700} #uf-plugin-doc table{border-collapse:collapse;width:100%;margin:20px 0 28px;font-size:15px;line-height:1.6;text-align:left} #uf-plugin-doc th,#uf-plugin-doc td{text-align:left;vertical-align:top;padding:12px;border:0;border-bottom:1px solid var(–line);overflow-wrap:anywhere} #uf-plugin-doc th{background:#edf4f4;color:#274952} #uf-plugin-doc .ufp-credit{font-size:13px;border-top:1px solid var(–line);margin-top:32px;padding-top:16px;color:#48616a} @media(max-width:820px){ #uf-plugin-doc .ufp-reading{display:block;padding-top:27px} #uf-plugin-doc .ufp-toc{position:static;margin:0 0 24px;padding-bottom:15px;border-bottom:1px solid var(–line)} #uf-plugin-doc .ufp-toc div{display:flex;flex-wrap:wrap;gap:6px 18px} #uf-plugin-doc .ufp-toc h2{margin-bottom:9px} #uf-plugin-doc .ufp-toc a{border:0;padding:2px 0;text-decoration:underline} } @media(max-width:650px){ body:has(#uf-plugin-doc) #header .site-header-top,body:has(#uf-plugin-doc) #header .site-header-separator{display:none} body:has(#uf-plugin-doc) #header .siteheader-container>.fxb-row{flex-direction:row;align-items:center;min-height:68px} body:has(#uf-plugin-doc) #header #logo{margin:0} body:has(#uf-plugin-doc) #header .logo-img{width:110px;height:auto} #uf-plugin-doc .ufp-cover-inner{display:block;padding:0} #uf-plugin-doc .ufp-head{padding:30px 23px 0} #uf-plugin-doc .ufp-path{margin:0 0 15px} #uf-plugin-doc h1{margin-bottom:11px;font-size:clamp(35px,10.4vw,50px)} #uf-plugin-doc .ufp-art{width:min(100%,480px);margin:0 auto} #uf-plugin-doc .ufp-art img{aspect-ratio:2.36;object-fit:cover;object-position:center 54%} #uf-plugin-doc .ufp-art::after{background:linear-gradient(180deg,var(–night),transparent 17%,transparent)} #uf-plugin-doc .ufp-reading{padding:24px 20px 42px} #uf-plugin-doc table{table-layout:fixed} #uf-plugin-doc th:first-child{width:32%} #uf-plugin-doc td,#uf-plugin-doc th{padding:9px 6px} #uf-plugin-doc .ufp-body h2{margin-top:30px} } @media print{ #uf-plugin-doc .ufp-toc,#uf-plugin-doc .ufp-path{display:none} #uf-plugin-doc .ufp-cover-inner,#uf-plugin-doc .ufp-reading{display:block} #uf-plugin-doc .ufp-art{max-width:420px} #uf-plugin-doc pre code{white-space:pre-wrap} }

uFlow guidesPlugin API 1

Develop a uFlow plugin

The uFlow plugin API lets you extend the game browser, register content types, and run tools in the background.

A white Wii U console and GamePad with uFlow’s GameTDB plugin settings on screen

Plugins can also add menu commands, native dialogs and settings, save data between sessions, and supply media. Players install a single .ufplugin file and find its commands and settings under Settings → General → Plugins.

Availability. Plugin API 1 is available in stable uFlow 2026.12.4. Open Settings → General → Plugins to install a plugin and configure its settings. Earlier preview builds support only a subset of these features. GameTDB also works on the earlier media-provider preview.

Write your first plugin

Library Bookmark adds two commands. One remembers the selected game. The other selects that game again when it is in the current view. Save the following as LibraryBookmark.ufplugin in UTF-8 without a BOM. You can also download the installable example.

LibraryBookmark.ufplugin Lua 5.4
-- uFlow plugin 1
return {
    api = 1,
    id = "library-bookmark",
    name = "Library Bookmark",
    version = "1.1",
    settings = {
        { id = "show-name", label = "Show game name", enabled = true }
    },
    actions = {
        { id = "remember", label = "Bookmark current game" },
        { id = "recall", label = "Go to bookmarked game" }
    },

    run = function(action, view, state)
        if action == "remember" then
            local game = view.game(view.selected)
            if not game then return "Select a game first." end
            if game.entryKey == "" then return "This entry has no persistent identity." end
            state.key = game.entryKey
            state.title, state.library = nil, nil
            if isEnabled("show-name") and #game.name <= 160 then
                return "Bookmarked: " .. game.name
            end
            return "Bookmark saved."
        end

        if not state.key and not state.title then return "Save a bookmark first." end
        local index
        if state.key then index = view.findKey(state.key)
        else index = view.find(state.title, state.library) end
        if index then
            return { select = index, message = "Bookmarked game selected." }
        end
        return "The bookmarked game is outside the current library view."
    end
}

Install and test

  1. Copy LibraryBookmark.ufplugin to SD:/wiiu/apps/uFlow/plugin-inbox/. Create the folder if needed.
  2. Select a game in your library. Open Settings → General → Plugins → Install plugin from SD and choose the file.
  3. Open Library Bookmark → Bookmark current game. Back out, browse to another title, then open Library Bookmark → Go to bookmarked game. Return to the library to see the selection.
  4. Under Library Bookmark → Settings, turn Show game name off and try bookmarking again. The confirmation now reads “Bookmark saved.”
  5. To update a plugin, replace its inbox file and install it again. Keeping the same plugin ID and setting IDs preserves user data. Uninstalling unregisters the commands. Preferences, the plugin’s saved state, and any media it downloaded stay on the SD.

For host regression tests on Linux, install a C++20 compiler, a C compiler, and the development packages for libcurl, libpng, libturbojpeg and zlib. From the source checkout run sh tools/test-plugin-api.sh /path/to/GameTDB.ufplugin. Append live to also test real GameTDB transfers. The test uses a temporary library and both bundled examples.

Try the browser and launcher features

Install LibraryTools.ufplugin from the same inbox. Open Find / Sort in the game browser. Select Developer, then title, Filter: With publisher, or Subtitle: Publisher and year. Each selection applies independently. Choose Filter: All games or Subtitle: Off to clear it. Longer menus scroll with the D-pad.

Under Settings → Library, add a content directory and select DS homebrew, point it at a directory containing your own .nds files, and scan. Library Tools declares the existing noods launcher as its default. Configure that launcher under Settings → Launchers before playing. Users can choose a different launcher for a content type, directory or individual title.

Open General → Plugins → Library Tools → Count publishers. Press B to dismiss the confirmation or choose Start count. You can leave the menu while it runs. Reopen the plugin to see progress or cancel an active count. Last publisher count reads the most recent successful result.

API 1 reference

A .ufplugin is a Lua 5.4 text program of up to 256 KiB. Its first line is -- uFlow plugin 1. Return a descriptor table with the fields below. Declare the capabilities your plugin uses. At least one of actions, filters, sorts, subtitles, jobs, contentTypes or media is required.

Field Contract
api, id Integer 1 and a unique stable ID of 1–64 lowercase ASCII letters, digits, or hyphens.
name, version User-facing strings of up to 80 and 32 bytes respectively.
settings Optional list of up to 16 switches with unique id, label, and boolean enabled default. Read the saved value with isEnabled(id).
actions Up to 16 commands, in display order. Each has a unique id (1–48 lowercase letters, digits, or hyphens) and a nonempty label (up to 96 bytes).
run(actionId, view, state, choice) Required when declaring actions. uFlow calls it when the user activates a command.
filters, sorts, subtitles Up to 16 named entries per list, each with an id, a label, and the callback described below.
contentTypes Up to 16 file-based library definitions. Each has an id, name, extensions and an existing launcher ID.
jobs Up to 16 user-started background utilities. Each has an id, label and run callback. Jobs and actions share a command ID namespace.
media Optional provider table. Registering it adds a download action to Settings → Media and the plugin’s own menu.

Library and selection

Field or function Result
view.count, view.selected Number of games in the current filtered and sorted view, and the one-based selected position. An empty view has count and selection zero.
view.game(i) A table with entryKey, name, titleId, libraryId, publisher, developer, genre, region, year, players, favorite and installed. An out-of-range index returns nil. Game data is read-only from the host’s perspective.
view.find(titleId, libraryId) One-based position of the first matching game in this view, or nil. Store identifiers to remember a game across sessions because positions can change.
view.findKey(entryKey) Find a saved entry in the current view, including file-based ROMs with no title ID. Save the opaque game.entryKey returned by uFlow. It identifies the library and installed title or file location. Moving a ROM or assigning it to another library gives it a new key.
view.language Console language tag, such as en or fr.

Return a short string to display a message, or a table such as { message = "Game selected.", select = 2 } to also change the dashboard selection. Both table fields are optional. Messages can contain up to 256 bytes. Returning nil completes the command silently.

Filters, sorts and subtitles

Entry Callback and result
filters match(game) returns a boolean. The filter applies after the selected library, search and A–Z filter.
sorts key(game) returns an integer or a string up to 256 bytes. Use one type for every game. uFlow evaluates each key once for the view and sorts ascending, retaining title order for ties.
subtitles text(game) returns up to 160 bytes of text for the selected game. Return an empty string to hide the caption.

These callbacks receive the same game fields as view.game(i). Use isEnabled(id) to read plugin options. Selections are saved using the package and rule IDs. Keep each callback short. An invalid return or execution error discards a partially evaluated rule. The current library and both adjacent tabs share an 80 ms plugin deadline for each refresh. If the deadline expires, uFlow keeps the last completed ordering for that view and reports the timeout.

Content types and launchers

For example, { id="ds", name="DS homebrew", extensions={".nds"}, launcher="noods" } registers a file-based type. Type IDs use lowercase letters, digits and hyphens. Their library ID is plugin.<package-id>.<type-id>. List 1–32 lowercase filename extensions, each starting with a dot. The launcher ID refers to a launcher already known to uFlow. The normal launcher settings and per-game overrides apply. A plugin neither bundles an emulator nor assigns a directory on the user’s behalf.

Package updates supply new names, file extensions and launcher defaults to fields that still match the preceding package defaults. Values edited in the Content Type Editor are retained.

Removing a plugin removes its types from browsing and scanning. Configured directories and saved type customizations remain available for reinstall under the same ID.

Native dialogs and background jobs

An action or job can declare prompt = { title="…", text="…", choices={{id="start", label="Start"}} }. Supply one to six choices. uFlow presents the dialog before running the command. The final callback argument is the selected choice ID, or nil for commands without a dialog. Back dismisses the dialog without executing the callback.

A job’s run(view, state, report, choice) receives a snapshot of the visible library and the selected game at the moment it starts. Call report(percent, message) with an integer from 0 to 100 and a status message up to 160 bytes. Long jobs must report at least once a minute. Return a short completion message or nil. The host supports one utility job at a time. Leaving Settings keeps it running. HOME, game launch and exit request cancellation of both utility and media workers. A utility discards uncommitted state. Once publication to SD has begun, uFlow waits for that write to finish before handing off. If the process stops between FAT renames, the next command recovers a complete staged state record or reads the preceding backup. Completed media files stay available. Run the media action again to fill remaining gaps. Other plugins’ ordinary commands remain available during the job.

Plugin state and execution

state is a private table of string keys and string values. Set a key to nil to delete it. uFlow commits the changes after a successful action and validates the result first. A failing action keeps the previous state and selection. Each plugin may store up to 48 keys, 2 KiB per value, and 16 KiB total for keys and values. Keys use the same format as action IDs.

Actions are short, user-invoked callbacks. The runtime provides restricted base, string, table, and math functions, with limits on execution and memory. uFlow owns file access and network transfers. Callbacks are fixed when the package descriptor is validated. A callback or result error is reported to the player. A short call has an 80 ms deadline and a 200,000-instruction allowance. Per-game library rules have a 4,096-instruction allowance. Utility jobs use progress and cancellation checks instead of the short-call deadline.

The string library provides len, sub, lower, upper, reverse, byte, char, find, match, gsub and rep. Pattern operations accept subjects up to 4,096 bytes and patterns up to 128 bytes. Repetition produces at most 32 KiB. The table library provides pack, unpack, insert, remove, sort and concat. Operations that traverse a table accept up to 1,024 array entries. For long utilities, process records in small batches and report progress between batches.

Optional media provider

Place action, domains, record, key, and the four callbacks below inside media. The host runs downloads in the background, respects the user’s media folders, and validates complete PNG and JPEG images before saving them. A later scan can repair an incomplete cover at its configured destination. A title in two libraries uses each library’s configured folders. The original -- uFlow media plugin 1 format with top-level provider fields is supported for released plugins such as GameTDB 1.0.0.

Callback Result
identify(platform, titleId, productCode, companyCode) Return a provider lookup ID or an empty string to skip. Media scanning supplies Wii U, Wii and GameCube titles.
artwork(platform, lookupId, kind, language) For front or sleeve, return up to 12 JPEG/PNG HTTPS URLs in preference order, or an empty list to skip. URLs must use one of the declared hosts.
database(platform) Return a direct ZIP URL whose first entry is XML, or an empty string to skip metadata.
metadata(language) Return the supported metadata fields for the current XML record. Read child text, attributes or localized fields with xmlText, xmlAttr and xmlLocalized.

Working examples

API 1 reference on GitHub