// ZSH-LEARN — MYSQL-BACKED LEARNING COLLECTION // SAVE / QUERY / QUIZ

zsh plugin · persistent flashcard / snippet store backed by MySQL/MariaDB · fzf fuzzy search · randomized recall · in-place $EDITOR

GitHub Issues
// Color scheme

>_ZSH-LEARN

Turn your terminal into a persistent knowledge base. Save snippets, one-liners, notes. Search with filters, fzf fuzzy matching, or random sampling. Drill yourself with randomized quizzes for spaced recall. Edit in-place with $EDITOR. Backed by MySQL/MariaDB.

Install

# Zinit
zinit ice lucid nocompile
zinit load MenkeTechnologies/zsh-learn

# Oh My Zsh
git clone https://github.com/MenkeTechnologies/zsh-learn \
    "$HOME/.oh-my-zsh/custom/plugins/zsh-learn"
# then: plugins+=(zsh-learn)

# Manual
git clone https://github.com/MenkeTechnologies/zsh-learn
source zsh-learn/zsh-learn.plugin.zsh

After install: zsh-learn-CreateLearningCollection generates the DDL and creates the table.

Configuration

ZPWR_LEARN_COMMANDdefault mysql — database command to execute queries
ZPWR_SCHEMA_NAMEdefault root — schema name for the learning table
ZPWR_TABLE_NAMEdefault LearningCollection — table name for stored entries

Command matrix

le LEARNINGinsert a new entry
editl IDopen entry by ID in $EDITOR
del [N] / delid IDdelete last N (default 1) / delete by ID
se [FILTER...]search the learning column with optional filters
see / seeealso show category / category + date
sefsearch all via fzf (most recent first)
ser [N] / seraN random (default 100) / all random
qu [N] / quaN random into fzf / all randomized into fzf
re / rsqlprint SQL update statements / open in vim

Key bindings

^k (viins + vicmd)zsh-learn-Learn — insert the current buffer as a learning entry

Sibling plugins

Part of the MenkeTechnologies zsh plugin family — the MenkeTechnologiesMeta umbrella: