A CLI tool for managing Obsidian vault documents and generating flashcards with AI.
- ๐ด Interactive Flashcard Generation: Generate flashcards from markdown documents using AI
- ๐ฏ Smart Selection: Visual interface to select which flashcards to keep
- ๐ Live Preview: See exactly what changes will be made before applying them
- โ Document Management: Mark documents as complete after processing
- โก Fast: Built with Bun for optimal performance
# Install dependencies
bun install
# Compile and install globally
bun run install-globalAfter installation, you can use obsidian-manager from anywhere in your terminal.
# Install dependencies
bun install
# Run directly with bun
bun index.ts [command] [options]
# Or compile first
bun run compile
./dist/index.js [command] [options]# Interactive flashcard generation
obsidian-manager generate-flashcard path/to/document.md
# Or use the short alias
obsidian-manager gfc path/to/document.mdThis command will:
- ๐ Read your markdown document
- ๐ค Generate new flashcards using AI
- ๐ Show both new and existing flashcards
- ๐ฏ Let you select which ones to keep
- ๐ Preview changes before applying
- โ Optionally mark the document as complete
# Placeholder for future functionality
obsidian-manager path/to/document.mdWhen using generate-flashcard, you'll see an interactive interface:
- โโ: Navigate between flashcards
- Space: Toggle flashcard selection
- M: Toggle "mark document as complete"
- Enter: Proceed to diff preview
- Y/N: Confirm or cancel actions
- Q: Quit at any time
Make sure you have your AWS credentials set up for the AI flashcard generation:
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_keybun run build- Build the CLIbun run compile- Build and make executablebun run install-global- Compile and install globallybun run uninstall- Remove global installationbun run dev- Run in development mode with hot reload
To remove the global installation:
bun run uninstall# Install dependencies
bun install
# Run in development mode
bun run dev
# Run tests
bun testsrc/
โโโ cli.ts # Main CLI command logic
โโโ flashcard-cli.tsx # Interactive UI components
โโโ document-parser.ts # Markdown document parsing
โโโ document-updater.ts # Document writing utilities
โโโ flashcard.ts # AI flashcard generation
โโโ bedrock.ts # AWS Bedrock configuration
โโโ types.ts # TypeScript type definitions