Skip to content
Conduit

skill

mi-note-export

以 Skill 友好的形式从小米云服务笔记批量导出 Markdown 文件

ceynri/mi-note-exportcommunitylistedunreviewed

Set up

Skills are installed by placing their folder where your agent loads skills.

The download comes from github.com/ceynri/mi-note-export itself, not from our server, so what you get is exactly what its author published.

Install instructions come from the README

Skills do not use an MCP config. Follow the steps in the README below.

README

synced Oct 21, 2026

English | 简体中文

mi-note-export

⚠️ This project is no longer maintained. Consider switching to mi-note-cli, which supports full read/write, two-way sync, folder management, image upload, and more. See the migration guide.

Batch export all notes from Xiaomi Cloud Notes (i.mi.com) as Markdown files.

Features

  • Automatically fetch all notes and convert to Markdown
  • Preserve headings, lists, checkboxes, blockquotes, horizontal rules, etc.
  • Download attachments (images, audio, video)
  • Content-hash-based incremental sync (only fetch notes with content changes; won't re-export even if local file was moved)
  • Automatically clean up notes deleted from the cloud
  • Delete specific cloud notes (move to trash)
  • Organize notes by folder
  • Cookie caching + browser identity persistence to reduce repeated logins

AI Skill

This project provides an AI coding assistant Skill definition file that enables AI assistants to perform note export operations for you:

npx skills add ceynri/mi-note-export

You can also manually copy skills/mi-note-export/SKILL.md to your project's Skill directory.

Installation

Global installation:

npm install -g mi-note-export

Or install as a project dev dependency:

npm install -D mi-note-export

Playwright Chromium (~200+ MB) will be automatically downloaded during installation. If auto-installation fails, run npx playwright install chromium manually.

Usage

mi-note              # Incremental sync
mi-note --force      # Full re-sync
mi-note -o ./notes   # Specify output directory

Or run directly via npx without installing:

npx mi-note-export

Options

OptionDescription
-h, --helpShow help
-f, --forceFull re-sync (ignore incremental state)
-o, --output <dir>Specify output directory (default: reads from .mi-note-export.json, otherwise output)
--loginForce re-login (ignore cached Cookie)
--delete-id <id>Delete a cloud note by ID (moves to trash, recoverable within 30 days)
--clear-cacheClear system cache directory (Cookie and browser data)
-y, --yesSkip confirmation prompts
-v, --versionShow version

Authentication Flow

  1. First run: Opens a Chromium browser via Playwright → user manually logs in to Xiaomi account → Cookie is automatically extracted and cached
  2. Subsequent runs: Reads cached Cookie → validates it → uses it if valid, otherwise opens browser for re-login

Browser identity data is persisted in the system cache directory (see "Data Directory" below). Xiaomi will recognize it as the same device on subsequent logins, usually without requiring SMS verification.

Output Structure

output/
├── assets/                    # Attachments (images, audio, etc.)
├── folder-name/               # Note folder (if any)
│   └── note-title.md
├── note-title.md              # Notes with titles
└── 2025-01-01_12-00-00.md     # Untitled notes, named by creation time

Configuration File

You can create a .mi-note-export.json file in the current working directory to avoid specifying -o every time:

{ "output": "./my-notes" }

Output directory priority: -o CLI argument > .mi-note-export.json > default output.

Data Directory

System Cache Directory

Cookie and Playwright browser persistence data are stored in the system cache directory:

  • macOS: ~/Library/Caches/mi-note-export/
  • Linux: $XDG_CACHE_HOME/mi-note-export/ or ~/.cache/mi-note-export/
  • Windows: %LOCALAPPDATA%/mi-note-export/cache/

Contents:

  • cookie — Cached login Cookie
  • browser-data/ — Playwright browser persistence data (device identity preserved to reduce re-verification)

Output Directory

The incremental sync state file is stored inside the output directory:

  • <output>/.sync-state.json — Tracks synced notes, modification dates, and content hashes (used to detect content changes)

Known Limitations

  • Private notes, todos, and mind maps are not supported
  • Cookie has a limited lifespan (typically a few days); re-login is required after expiration
  • Empty notes (no title and no content) are automatically skipped

Development

pnpm install       # Install dependencies
pnpm build         # Compile TypeScript
pnpm dev           # Watch mode compilation
pnpm start         # Run

Project Structure

mi-note-export/
├── src/
│   ├── cli.ts        # CLI entry point
│   ├── auth.ts       # Cookie retrieval, caching, validation
│   ├── api.ts        # Xiaomi Cloud Notes API wrapper
│   ├── converter.ts  # Note content parsing & Markdown conversion
│   ├── sync.ts       # Incremental sync logic & state management
│   ├── types.ts      # Type definitions
│   └── utils.ts      # Utility functions
├── .agents/          # AI assistant configuration (rules/agents)
├── skills/           # AI Skill source (for npx skills add)
├── dist/             # Build output (git ignored)
├── tsconfig.json
└── package.json

License

MIT

↑↓ navigate openesc close