Skip to content

[FEATURE] add create flashcard and support Remnote markdown import to create note/flashcard#1

Open
Twb06 wants to merge 6 commits intorobert7:mainfrom
Twb06:feature/add-create-flashcard
Open

[FEATURE] add create flashcard and support Remnote markdown import to create note/flashcard#1
Twb06 wants to merge 6 commits intorobert7:mainfrom
Twb06:feature/add-create-flashcard

Conversation

@Twb06
Copy link

@Twb06 Twb06 commented Mar 11, 2026

Summary 🎯

This PR enhances remnote-cli by introducing Hierarchical Markdown Import and Enhanced Flashcard support.
These updates allow users to generate complex knowledge structures from single indented markdown strings and precisely define flashcard types (Concept/Descriptor) and their back-side content directly from the command line.

Changes 🔁

🆕 Features & Enhancements

  • New create-md command: Added a dedicated command to create a tree structure in RemNote from an indented markdown string.
    • Support for --content and --content-file (including stdin).
    • Support for optional --title to nest the tree under a new parent Rem.
    • Automatically leverages RemNote's native markdown parsing for flashcards (>>, ::, ;;, {{cloze}}, etc.).
  • Enhanced create command:
    • Added --back-text option: Allows defining the back of a flashcard during creation.
    • Added --concept and --descriptor flags: Enables explicit control over the created Rem type.
  • Improved Content Resolution: Utilized shared utilities to handle large text inputs via files or standard input.

🛠️ Testing Improvements

  • Unit Tests:
    • Updated cli.test.ts to verify the registration of the new create-md command.
    • Added comprehensive mapping tests in command-action-mapping.test.ts to ensure CLI options are correctly translated to bridge actions (create_note and create_note_md).
  • Integration Tests:
    • Expanded the 03-create-search.ts workflow to include verification for flashcards created with back-text.
    • Added a complex markdown tree test case covering a wide range of RemNote flashcard syntaxes.

📖 Documentation

  • Updated docs/guides/command-reference.md with detailed usage, option tables, and examples for both create and create-md.
  • Updated AGENTS.md to reflect the expanded CLI surface for AI agents.
  • Updated CHANGELOG.md to track these new capabilities.

Demo

  • For card/flashcard created from markdown text

    • Input: remnote-cli create-md --title "Test markdown with flashcard by cli" --parent-id <id> --content-file ./test.local.md --text

    • test.local.md:

      image
    • Remnote result:

      image
  • For card creation

    • Input: remnote-cli create "Test flashcard by cli" --parent-id <id> --back-text "success with concept card" --concept --text

    • Remnote result: Created note: Test flashcard by cli (ID: <id>)

      image

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant