remarkable_execute
Run custom JavaScript against the reMarkable API to list, browse, search, read, download, upload, move, rename, remove, create notebooks, add/remove pages, write ink or text, draw Mermaid diagrams, manage tags, and refresh the tablet UI.
Instructions
Run JavaScript against the reMarkable API (SSH tablet or rmfakecloud).
declare const rme: { list(args): Promise; // List notebooks, PDFs, EPUBs, and folders. Trash is hidden unless includeTrash is true. browse(args): Promise; // Browse one folder path (default /). Opening a notebook returns that item. search(args): Promise; // Search by notebook name or path, optionally filtered by tag. info(args): Promise; // Notebook/folder/PDF info. Notebooks include pages[].title from the first typed line. read(args): Promise; // Read a notebook page (native paragraphs + checkbox state). Omit page to read every page. PDFs/EPUBs return extracted text. download(args): Promise; // Download the raw PDF or EPUB as base64. exportPage(args): Promise; // Render ink on a notebook page to PNG or SVG (base64). Does not render typed text. upload(args): Promise; // Upload a PDF or EPUB (base64) into a folder. mkdir(args): Promise; // Create a folder. move(args): Promise; // Move a notebook or folder into another folder (folder: "/" for root). rename(args): Promise; // Rename a notebook or folder. remove(args): Promise; // Move a notebook or folder to trash. createNotebook(args): Promise; // Create a blank notebook with one page. addPage(args): Promise; // Append (or insert after N) a blank notebook page. Returns the new 1-based page number. removePage(args): Promise; // Delete a 1-based notebook page. writeInk(args): Promise; // Append pen/highlighter strokes to a page. Points are [x,y] in 0–1 from the top-left. writeMermaid(args): Promise; // Draw a Mermaid diagram as ink (flowchart, sequence, state, class, ER, xychart). Renders to SVG then strokes. pie/gantt/etc. error. writeText(args): Promise; // Append native Type Folio text to a notebook page (default: last page). style: title (big), heading, body (small), bullet, checkbox. checked:true ticks a checkbox. blocks: mixed styles in one call. replace:true overwrites typed text (ink stays). newPage:true adds a blank page first. Repeated calls stack as new paragraphs. tag(args): Promise; // Add or remove a notebook tag (or a page tag when page is set). tags(args): Promise; // List every tag used on the tablet. refresh(args): Promise; // Restart xochitl so the tablet UI reloads the library. };
Write an async arrow function. No TypeScript syntax. Example: async () => { const docs = await rme.list({}); return docs; }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript async arrow function to execute |