Ankiniki is an Anki companion tool specifically designed for engineers' technical learning. It provides a modern flashcard experience that seamlessly integrates with developers' workflows while leveraging Anki's powerful spaced repetition algorithm.
Eliminate Anki's biggest barrier - the manual effort of card creation - allowing engineers to focus on mastering technical knowledge.
- ❌ Manual Card Creation Labor: Time-consuming card creation process every time you learn new technology
- ❌ Limited Technical Content Support: Lack of native support for code blocks, diagrams, and markdown
- ❌ Workflow Fragmentation: Context switching between development environment and Anki
- VS Code Extension: Create flashcards directly from your IDE with smart code understanding
- CLI Tool: Quick card addition from terminal with interactive prompts
- Desktop App: Modern Electron GUI with card editor and study interface
- Keyboard Shortcuts: Instantly convert selected code to flashcards
- Code Blocks: Native syntax highlighting for all programming languages
- Smart Context: Automatic question generation based on code type
- File Tracking: Include source file paths and line numbers
- Markdown Support: Rich formatting for technical content
- Intelligent Card Generation: AI analyzes code and generates contextually relevant questions
- Multi-Format Processing: Extract learning materials from code, Markdown, PDFs, and HTML
- Question Enhancement: Improve existing questions for better learning outcomes
- Smart Content Analysis: Automatic difficulty assessment and concept extraction
- Fallback Mode: Works without OpenAI API using template-based generation
- Desktop: Electron app (Windows, Mac, Linux)
- CLI: Command-line tool (cross-platform)
- VS Code: Extension for all platforms
- Mobile: React Native (Future)
- Frontend: React, TypeScript
- Desktop: Electron
- Mobile: React Native
- Backend: Node.js
- AI/ML: Python (microservice)
- Data: AnkiConnect API (integrates with existing Anki)
Ankiniki is not a replacement for Anki but a companion tool with full compatibility with existing Anki databases. All data is managed within Anki through the AnkiConnect API.
- Backend API: Express.js server with AnkiConnect integration
- Electron Desktop App: React-based GUI with card editor and study interface
- CLI Tool: Command-line interface for quick card creation
- Shared Types: TypeScript definitions and utilities
- Monorepo Setup: Workspace-based project structure
- VS Code Extension: Create flashcards directly from your IDE
- Python ML Microservice: FastAPI-based AI service with OpenAI integration
- Automatic Card Generation: Generate flashcards from code, text, and documents
- Content Ingestion Pipeline: Process PDFs, Markdown, HTML, and code files
- Backend Integration: Seamless API integration with existing Node.js backend
- React Native mobile app
- Mermaid diagram support
- Advanced customization features
- Node.js 18+ and npm 9+
- Anki desktop application
- AnkiConnect addon installed in Anki
- Clone and setup the project:
git clone https://github.com/iray-tno/ankiniki.git
cd ankiniki
npm install-
Install AnkiConnect addon:
- Open Anki → Tools → Add-ons → Get Add-ons
- Enter code:
2055492159 - Restart Anki
-
Build all packages:
npm run buildankiniki/
├── packages/
│ ├── shared/ # Shared types and utilities
│ └── backend/ # Express.js API server
├── apps/
│ ├── desktop/ # Electron desktop app
│ ├── cli/ # Command-line tool
│ └── vscode-extension/# VS Code extension
├── docs/ # Documentation
└── tools/ # Build and development tools
npm run build # Build all packages and apps
npm run dev # Start all development servers
npm run test # Run all tests
npm run lint # Lint all code
npm run clean # Clean all build artifactscd packages/backend
npm run dev # Start development server with hot reload
npm run build # Build TypeScript to JavaScript
npm run start # Start production servercd apps/desktop
npm run dev # Start Electron in development mode
npm run build # Build renderer and main process
npm run dist # Create distributable packagescd apps/cli
npm run build # Build CLI executable
npm link # Link globally for development
ankiniki --help # Test CLI commandscd apps/vscode-extension
npm run compile # Compile TypeScript
npm run watch # Watch mode for development
npm run package # Create .vsix package
# Press F5 in VS Code to launch Extension Development Host- Start the backend server:
cd packages/backend
npm run dev- Start the desktop app (in another terminal):
cd apps/desktop
npm run dev- Test the CLI (after building):
cd apps/cli
npm run build
npm link
ankiniki config --show# Configure AnkiConnect connection
ankiniki config --edit
# Add a quick flashcard
ankiniki add "What is React?" "A JavaScript library for building user interfaces"
# Interactive card creation
ankiniki add --interactive
# Study cards from terminal
ankiniki study "JavaScript Fundamentals" --count 5
# List all decks
ankiniki list# Install the extension (when published)
# Or press F5 for development
# Keyboard shortcuts:
# Ctrl+Shift+A - Add selected text as flashcard
# Ctrl+Shift+C - Add code block as flashcard
# Ctrl+Shift+Q - Quick add flashcard
# Available via Command Palette (Ctrl+Shift+P):
# "Ankiniki: Add Selected Text as Flashcard"
# "Ankiniki: Add Code Block as Flashcard"
# "Ankiniki: Quick Add Flashcard"- Launch the desktop app
- Configure AnkiConnect URL in Settings
- Create or select a deck
- Use the card editor to create flashcards with syntax highlighting
- Study cards with the built-in review interface
# Start the backend server
cd packages/backend
npm run dev
# Test API endpoints
curl http://localhost:3001/health
curl http://localhost:3001/api/decks# Start the ML microservice (Python)
npm run ml-service:install # Install Python dependencies
npm run ml-service:dev # Start the service
# Or using Docker
npm run ml-service:docker
npm run ml-service:docker-run
# Generate cards via API
curl -X POST http://localhost:3001/api/cards/generate-and-create \
-H "Content-Type: application/json" \
-d '{
"content": "const factorial = (n) => n <= 1 ? 1 : n * factorial(n - 1);",
"content_type": "code",
"deckName": "Programming",
"programming_language": "javascript",
"max_cards": 3
}'Ensure AnkiConnect is properly configured in Anki:
- Install the addon (code: 2055492159)
- Configure CORS (if needed):
- Anki → Tools → Add-ons → AnkiConnect → Config
- Add your domain to webCorsOriginList
Create a .env file in packages/backend/:
PORT=3001
ANKI_CONNECT_URL=http://localhost:8765
ML_SERVICE_URL=http://localhost:8000
NODE_ENV=development
CORS_ORIGIN=http://localhost:3000For enhanced AI features, configure the ML service in services/ml-service/:
# Optional: OpenAI API key for enhanced AI features
OPENAI_API_KEY=your_openai_api_key_here
# Service configuration
PORT=8000
LOG_LEVEL=INFONote: The ML service works without OpenAI API key using fallback template-based generation.
# Run all tests
npm run test
# Test specific package
cd packages/backend && npm test
cd packages/shared && npm test-
"Cannot connect to Anki":
- Make sure Anki is running
- Verify AnkiConnect addon is installed
- Check if Anki is listening on port 8765
-
"Permission denied" errors:
- Check AnkiConnect CORS configuration
- Ensure firewall isn't blocking connections
-
Build errors:
- Delete
node_modulesand reinstall:npm run clean && npm install - Ensure you're using Node.js 18+
- Delete
Enable debug logging:
# CLI
ankiniki config --set debugMode=true
# Backend
NODE_ENV=development npm run devWe welcome contributions to the project! Please see CONTRIBUTING.md for details.
This project is released under the MIT License.
For detailed design philosophy and market analysis, please refer to the strategy document.
Made with ❤️ for engineers who want to learn efficiently