Skip to main content
mochimochi

mochimochi

🍡 Local-first CLI for curating Mochi flashcard decks with AI-powered deduplication and quality grading ✨

mochimochi is a Python CLI for managing Mochi flashcards from local markdown files. Pull a deck from Mochi, edit it in your own folder, review changes with git, then push or sync the result back to Mochi.

It also includes optional AI workflows for finding semantic duplicates and improving card quality before you sync.

Install

uv tool install git+https://github.com/tsilva/mochimochi.git
mochimochi decks

The first command installs the CLI. The second lists your Mochi decks and prompts for a Mochi API key if one has not been saved yet.

For local development:

git clone https://github.com/tsilva/mochimochi.git
cd mochimochi
uv sync --extra dev
uv run mochimochi decks

Commands

mochimochi decks                         # list available Mochi decks
mochimochi pull <deck_id>                # download a deck to deck-<name>-<deck_id>.md
mochimochi push deck-python-abc123.md    # push local markdown changes to Mochi
mochimochi sync deck-python-abc123.md    # sync local changes and handle remote deletions
mochimochi push                          # push every deck-*.md file in the current directory
mochimochi sync                          # sync every deck-*.md file in the current directory
mochimochi dedupe deck-python-abc123.md  # find and remove semantic duplicates
mochimochi curate deck-python-abc123.md  # grade and improve low-quality cards

Useful options:

mochimochi push deck-python-abc123.md --force       # skip duplicate detection
mochimochi sync deck-python-abc123.md --force       # skip duplicate detection
mochimochi dedupe deck-python-abc123.md --threshold 0.9
mochimochi curate deck-python-abc123.md --threshold 9

Card Format

Deck files are markdown. Existing cards keep their Mochi card_id; new cards use null.

---
card_id: abc123
tags: ["python", "basics"]
---
What is a list comprehension?
---
A concise way to create lists: [x for x in iterable]
---
card_id: null
---
New card question
---
New card answer

Notes

  • Requires Python 3.10 or newer.
  • Config is stored in ~/.mochimochi/config.
  • MOCHI_API_KEY is required for all commands and is prompted on first use.
  • OPENROUTER_API_KEY is required for dedupe and curate.
  • AI caches are stored in ~/.mochimochi/cache.
  • New local decks can be created as deck-<name>.md; the first push creates the Mochi deck and renames the file to include the deck ID.
  • Run unit tests with uv run pytest -m "not integration". Live API tests require TEST_DECK_ID.

Architecture

mochimochi architecture diagram

License

MIT

Metadata

Release files for mochimochi 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mochimochi 0.1.1
File Size Uploaded Provenance Actions
mochimochi-0.1.1.tar.gz 28.4 kB With provenance Details for mochimochi-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mochimochi 0.1.1
File Interpreter ABI Platform Actions
mochimochi-0.1.1-py3-none-any.whl Python 3 none any Details for mochimochi-0.1.1-py3-none-any.whl

Total release size: 51.1 kB

Release files / mochimochi-0.1.1.tar.gz

Download URL mochimochi-0.1.1.tar.gz
Size 28.4 kB
Tags Source
SHA-256 checksum
How to use checksums
138d90191f36ca4d955d2768932bcf35a71fc6292f4d4f420525612a9563f73f
BLAKE2b-256 checksum
How to use checksums
2232cd8c221aedc38a0f5344a663f6f4c161467a4ed6ee02ca9754b3e3c39774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release files / mochimochi-0.1.1-py3-none-any.whl

Download URL mochimochi-0.1.1-py3-none-any.whl
Size 22.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea94b162b5721e3ff1c1fb2bbf4fcf9bacc6d37decfd892f757950e938eb2033
BLAKE2b-256 checksum
How to use checksums
e3ffb1732c4c55668e25c6cf04a91d8165285d3263e87ca4d250b52a272db5b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Security for mochimochi 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mochimochi-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page