hashcards: Content-addressed plain-text spaced-repetition tool
hashcards is a spaced-repetition system centered on plain-text files and content-addressable cards; it emphasizes auditability, edit-driven progress reset, and low-friction card creation—suitable for users who manage flashcards with VCS and custom scripts.
GitHub eudoxia0/hashcards Updated 2025-12-17 Branch main Stars 692 Forks 31
Rust CLI tool Spaced Repetition (SRS) Plain-text cards Content-addressable KaTeX Local web UI

💡 Deep Analysis

6
In which scenarios would you recommend adopting hashcards, and what clear limitations indicate when to avoid it?

Core Analysis

Problem Focus: Determine when to choose hashcards and which use cases it is not suited for.

  • Technical users: You manage cards in Markdown within your editor and want learning integrated into a code-like workflow (Makefile, scripts).
  • Data ownership & audit: You need diffs, traceability, and local-only data storage—no cloud lock-in.
  • Scriptable workflows: You want to automate card generation, validation, and export in CI or hooks.

Scenarios to avoid

  • Need built-in cloud/mobile: hashcards has no official cloud sync or mobile client; cross-device sync is manual.
  • Complex templates/multi-field notes: Only front-back and cloze types are supported—unsuitable if you rely on Anki-style templates.
  • Multi-user/high-concurrency: SQLite/local design assumes single-user usage; concurrent writes introduce consistency/lock issues.

Alternatives (brief)

  • Anki/AnkiConnect: Better for rich templates and mobile/plug-in ecosystems, but sacrifices plain-text auditability.
  • Server-backed SRS: Use when you need centralized sync/collaboration; requires hosting and more complexity.

Important: Weigh your priority between “auditability/scriptability” vs “mobile/sync/template richness”; hashcards favors the former.

Summary: Choose hashcards if you are a single-user, tech-oriented person who prioritizes control and automation. For cross-device sync or complex card types, prefer a more feature-rich GUI/service solution.

89.0%
What core problem does hashcards solve, and how does it implement spaced repetition (SRS) within a plain-text workflow?

Core Analysis

Project Positioning: hashcards addresses the need to run spaced repetition (SRS) in a plain-text-first, auditable, and scriptable way, avoiding lock-in to closed GUIs or proprietary storage.

Technical Features

  • Plain-text storage: Flashcards are authored as Markdown/plain-text files, editable in any editor and trackable with VCS.
  • Content-addressable IDs: Each card ID is the hash of its text; editing a card explicitly resets its progress and preserves traceability.
  • Local state store: Uses a local SQLite database (hashcards.db) for performance and history; no cloud dependency.
  • Modern scheduling: Uses FSRS algorithm for more nuanced review scheduling than SM-2.

Usage Recommendations

  1. Getting started: Put cards under git, author Markdown cards, run hashcards drill <DIR> to open the local review UI (default http://localhost:8000).
  2. Organization: Use TOML frontmatter for deck names and keep consistent file/directory layout for discoverability.

Caveats

  • Edit resets progress: Any text change changes the hash and resets progress—export or backup hashcards.db before bulk edits.
  • Session persistence: Progress is saved only at session end; browser crashes or premature close can lose progress.

Important: Targeted at users comfortable with CLI and VCS; non-technical users will face a higher onboarding cost.

Summary: hashcards provides a traceable, scriptable, and efficient local SRS suited for users who prioritize data control and plain-text workflows.

88.0%
For a new user, what is the learning curve for hashcards? What common issues arise and what is the recommended onboarding flow?

Core Analysis

Problem Focus: New users mainly struggle with build/runtime setup, the session save semantics, and resource path management. Users comfortable with CLI and text tools will ramp up faster.

Technical Analysis

  • Getting started essentials:
  • Requires Rust cargo or a prebuilt binary to build/install (make, sudo make install).
  • Run reviews with hashcards drill <DIR>, which serves a local web UI at http://localhost:8000.
  • Common issues:
  • Session not saved immediately: Progress is saved only when the session ends—browser crashes lose unsaved grades.
  • Resource path mistakes: Images/audio are relative to the deck; use @/ or maintain consistent directory layout.
  • Edit resets progress: Frequent tweaks change the hash and reset progress.
  1. Prep environment: Install rustup/cargo or obtain a binary; confirm hashcards --help works.
  2. Use example repo: Clone the author’s example to observe drill behavior.
  3. Version control: Put your card directory under git and commit before big changes.
  4. Backup: Back up hashcards.db or export JSON before bulk edits (hashcards export).
  5. Path conventions: Standardize image/audio paths or adopt the @/ convention.

Important: Always back up DB before major edits and close sessions properly to ensure progress is saved.

Summary: For technical users, the learning cost centers on environment setup and workflow conventions; example repos, VCS, and backup practices reduce early mistakes and stabilize usage.

87.0%
What advantages and challenges does content-addressing (card text hash) bring in practice, and how should users manage its side effects during editing?

Core Analysis

Problem Focus: Content-addressing (card ID = text hash) improves traceability and determinism but makes edits directly affect learning progress, introducing practical friction.

Technical Analysis

  • Advantages:
  • Determinism: Any change alters the hash, avoiding hidden inconsistencies.
  • Auditability: With VCS, you can trace exactly when text and thus progress changed.
  • Challenges:
  • Frequent resets: Minor formatting or auto-wraps trigger progress resets and disrupt review continuity.
  • DB churn: Deletions/renames create orphan DB entries that require cleanup.

Practical Recommendations

  1. Adopt editing conventions: Standardize whitespace, line breaks, and Markdown style to avoid meaningless hash changes.
  2. Prepare before bulk edits: git commit and backup hashcards.db or export JSON before large rewrites.
  3. Scripted migrations: For bulk changes, compute old->new hash mappings and either migrate SQLite records or keep an external mapping for restoring progress.
  4. Regular cleanup: Use hashcards orphans list/delete to reconcile DB and source.

Important: If you frequently tweak cards but want to preserve progress, prefer appending new cards or export history before rewriting to enable re-association.

Summary: Content-addressing gives auditability and determinism at the cost of edit friction; conventions, backups, and scripted migrations make it practical in day-to-day use.

86.0%
How can hashcards be effectively integrated into a git + Makefile based automation workflow?

Core Analysis

Problem Focus: How to integrate hashcards into a git + Makefile automation workflow to enable repeatable maintenance, backups, and deployments?

Technical Analysis

  • Available building blocks: hashcards exposes CLI commands (drill, check, orphans, export) that Makefile/CI scripts can call; cards are plain-text and work with standard Unix tools.
  • Common automation tasks: validation, backup/export, starting drill sessions, cleaning orphans.
  1. Basic targets:
    - make checkhashcards check cards/
    - make exporthashcards export cards/ > exports/$(date).json
    - make orphans-cleanhashcards orphans delete cards/
  2. Backup strategy: Stop active drill sessions or detect port usage before make export to ensure consistent exports; store JSON export alongside hashcards.db backups off-repo.
  3. Git integration: Run make check in a pre-commit hook to avoid committing malformed cards.
  4. Templates/new-card flow: Provide make new to create standard Markdown templates and optionally git add to enforce consistency.

Caveats

  • Session conflicts: Simultaneous drill sessions and automated scripts writing to SQLite can cause locks—handle mutual exclusion in scripts.
  • Bulk edits: Before bulk changes, make export and verify orphans after edits.

Important: Treat the text directory as the single source of truth and orchestrate validation/export steps in Makefile to reduce manual errors and improve auditability.

Summary: hashcards’ CLI is naturally composable with git + Makefile. Encapsulate checks, exports, and cleanups into Make targets to build a reliable, auditable automation pipeline.

86.0%
How should one manage database consistency, orphan entries, and maintenance strategies for large card collections?

Core Analysis

Problem Focus: How to keep hashcards.db consistent with the plain-text source, manage orphan entries, and maintain large collections?

Technical Analysis

  • Built-in tools: hashcards check, hashcards orphans list/delete, and hashcards export are the main primitives for maintenance.
  • Common issues: DB retains deleted-card history (orphans); bulk edits produce many new hashes; concurrent writes can cause SQLite lock contention.
  1. Before/after edits:
    - git commit the text changes;
    - hashcards export to a timestamped JSON as a hot backup;
  2. Consistency checks: Run hashcards check in CI or scheduled tasks to surface syntax/parse issues early;
  3. Orphan management: Periodically run hashcards orphans list, review results, and use orphans delete to clean up;
  4. Bulk edit strategy: Backup hashcards.db and compute old->new hash mappings to migrate performance records if needed;
  5. Large collections: Partition by deck/topic and archive older history (store archived DBs read-only) to limit growth.

Concurrency & automation caveats

  • Avoid concurrent writes: Implement file locks or check for active drill sessions before performing exports or DB writes.
  • Backup-first: Always export JSON and back up DB before migrations or bulk operations.

Important: Orphan entries are not inherently erroneous but require policy—delete or migrate—so the DB and source remain meaningful.

Summary: Use the built-in CLI plus git and scripted processes to keep single-user and mid-sized collections consistent. For high-scale or concurrent use, add partitioning, archiving, or a centralized state service.

85.0%

✨ Highlights

  • Plain-text + content-hash enables trackable cards
  • Uses FSRS to improve learning efficiency and reduce review time
  • Supports KaTeX and a simple local web interface
  • Few contributors and no releases — limited maintenance and support
  • No explicit open-source license — legal and enterprise adoption limited

🔧 Engineering

  • Plain-text cards with content-addressing: editing a card resets its progress
  • Only front-back and cloze card types supported; simple and explicit design
  • Provides CLI and local web UI; supports KaTeX and JSON export

⚠️ Risks

  • Very few contributors and commits; long-term maintenance is uncertain
  • No license declared — may block commercial use and corporate compliance
  • No official releases or packages; deployment and integration require building from source

👥 For who?

  • Individuals who prefer text workflows and managing cards with editors and VCS
  • Developers or power users willing to extend workflows via Makefile/scripts
  • Researchers, small teams, and educators focused on local storage and privacy