md2anki is an open-source web app that uses AI to generate Anki flashcards from Markdown files, making it easier to turn your notes into study materials.
Built with the Vercel AI SDK, GPT-4o-mini, Next.js, Langfuse, and Seline.so.
- Upload a Markdown file containing the content you want to convert into flashcards.
- Click the "Generate flashcards" button to start the AI-powered generation process.
- Review and edit the generated flashcards as needed.
- Download the flashcards as an Anki-compatible
.apkg
file. - Import the
.apkg
file into Anki to start studying!
- Node.js (v14 or later)
- npm or yarn
- OpenAI API key
- (Optional) Seline.so and Langfuse accounts for analytics
-
Clone the repository:
git clone https://github.com/yourusername/md2anki.git cd md2anki
-
Install dependencies:
npm install
or
yarn install
-
Set up environment variables: Create a
.env.local
file in the root directory and add the following:OPENAI_API_KEY=your_openai_api_key OPENAI_MODEL=your_openai_model (optional, defaults to `gpt-4o-mini-2024-07-18`) LANGFUSE_PUBLIC_KEY=your_langfuse_public_key (optional) LANGFUSE_SECRET_KEY=your_langfuse_secret_key (optional) LANGFUSE_HOST=your_langfuse_host (optional)
-
Run the development server:
npm run dev
or
yarn dev
-
Open http://localhost:3000 in your browser to see the application.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.