CLI tool for managing Mochi flashcards with local-first sync
Project description
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_KEYis required for all commands and is prompted on first use.OPENROUTER_API_KEYis required fordedupeandcurate.- 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 requireTEST_DECK_ID.
Architecture
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mochimochi-0.1.1.tar.gz.
File metadata
- Download URL: mochimochi-0.1.1.tar.gz
- Upload date:
- Size: 28.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
138d90191f36ca4d955d2768932bcf35a71fc6292f4d4f420525612a9563f73f
|
|
| MD5 |
b330203f925d5983d33e99b631e4dbfe
|
|
| BLAKE2b-256 |
2232cd8c221aedc38a0f5344a663f6f4c161467a4ed6ee02ca9754b3e3c39774
|
Provenance
The following attestation bundles were made for mochimochi-0.1.1.tar.gz:
Publisher:
release.yml on tsilva/mochimochi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mochimochi-0.1.1.tar.gz -
Subject digest:
138d90191f36ca4d955d2768932bcf35a71fc6292f4d4f420525612a9563f73f - Sigstore transparency entry: 1418227067
- Sigstore integration time:
-
Permalink:
tsilva/mochimochi@648143c8ed3549dcb7b93fe6db392d5f5d0e05ce -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tsilva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@648143c8ed3549dcb7b93fe6db392d5f5d0e05ce -
Trigger Event:
push
-
Statement type:
File details
Details for the file mochimochi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mochimochi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea94b162b5721e3ff1c1fb2bbf4fcf9bacc6d37decfd892f757950e938eb2033
|
|
| MD5 |
75d259a097d6997427bc52b495630675
|
|
| BLAKE2b-256 |
e3ffb1732c4c55668e25c6cf04a91d8165285d3263e87ca4d250b52a272db5b4
|
Provenance
The following attestation bundles were made for mochimochi-0.1.1-py3-none-any.whl:
Publisher:
release.yml on tsilva/mochimochi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mochimochi-0.1.1-py3-none-any.whl -
Subject digest:
ea94b162b5721e3ff1c1fb2bbf4fcf9bacc6d37decfd892f757950e938eb2033 - Sigstore transparency entry: 1418227109
- Sigstore integration time:
-
Permalink:
tsilva/mochimochi@648143c8ed3549dcb7b93fe6db392d5f5d0e05ce -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tsilva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@648143c8ed3549dcb7b93fe6db392d5f5d0e05ce -
Trigger Event:
push
-
Statement type: