Skip to content

MenkeTechnologies/zsh-learn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

111 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

███████╗███████╗██╗  ██╗       ██╗     ███████╗ █████╗ ██████╗ ███╗   ██╗
╚══███╔╝██╔════╝██║  ██║       ██║     ██╔════╝██╔══██╗██╔══██╗████╗  ██║
  ███╔╝ ███████╗███████║ █████╗██║     █████╗  ███████║██████╔╝██╔██╗ ██║
 ███╔╝  ╚════██║██╔══██║ ╚════╝██║     ██╔══╝  ██╔══██║██╔══██╗██║╚██╗██║
███████╗███████║██║  ██║       ███████╗███████╗██║  ██║██║  ██║██║ ╚████║
╚══════╝╚══════╝╚═╝  ╚═╝       ╚══════╝╚══════╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝

CI License Shell DB Plugin

[ NEURAL KNOWLEDGE INTERFACE // ZSH MODULE ]

A terminal-native learning engine backed by MySQL/MariaDB. Save, query, and quiz yourself on everything you learn — code snippets, technical notes, command references — directly from your shell.


> SYSTEM.INIT

This plugin turns your terminal into a persistent knowledge base. Store what you learn, search it instantly, and drill yourself with randomized quizzes — all without leaving the command line.

  • Save code snippets, one-liners, notes, anything
  • Search with filters, fzf fuzzy matching, or random sampling
  • Quiz yourself for spaced recall and permanent retention
  • Edit entries in-place with your $EDITOR
  • Manage with delete, redo, and full SQL access

> INSTALL.EXEC

Zinit

Add to ~/.zshrc:

source "$HOME/.zinit/bin/zinit.zsh"
zinit ice lucid nocompile
zinit load MenkeTechnologies/zsh-learn

> CONFIG.ENV

Variable Default Description
ZPWR_LEARN_COMMAND mysql Database command to execute queries
ZPWR_SCHEMA_NAME root Schema name for the learning table
ZPWR_TABLE_NAME LearningCollection Table name for stored entries
# Example: MariaDB with unix auth
export ZPWR_LEARN_COMMAND='sudo mysql'

# Custom schema.table (set before CreateLearningCollection)
export ZPWR_SCHEMA_NAME="root"
export ZPWR_TABLE_NAME="LearningCollection"

> COMMAND.MATRIX

Write Operations

Command Args Description
le LEARNING Insert a new learning entry
editl ID Open entry by ID in $EDITOR for editing
del [N] Delete last N entries (default: 1)
delid ID Delete a specific entry by ID

Search Operations

Command Args Description
se [FILTER...] Search learning column with optional filters
see [FILTER] Search with learning + category columns
seee Search with learning + category + date columns
sef Search all entries via fzf (most recent first)

Randomized Recall

Command Args Description
ser [N] N random entries (default: 100)
sera All entries in random order
qu [N] N random entries piped to fzf (default: 100)
qua All entries randomized in fzf

SQL & Redo

Command Args Description
re [ID|FILTER] Print matching entries with SQL update statements
rsql [ID|FILTER] Same as re but opens in vim

Admin

Command Description
zsh-learn-CreateLearningCollection Generate DDL and create the learning table
zsh-learn-DropLearningCollection Drop the learning table

> KEYBIND.MAP

┌─────────────────────────────────────────────┐
│  MODE          BINDING     ACTION            │
│  ─────────────────────────────────────────── │
│  vim insert    Ctrl+K      zsh-learn-Learn   │
│  vim normal    Ctrl+K      zsh-learn-Learn   │
└─────────────────────────────────────────────┘
bindkey -M viins '^k' zsh-learn-Learn
bindkey -M vicmd '^k' zsh-learn-Learn

> WORKFLOW.EXAMPLE

# 1. Initialize the database
zsh-learn-CreateLearningCollection

# 2. Store a new learning
le "git rebase -i HEAD~3  # interactive rebase last 3 commits"

# 3. Search your knowledge
se rebase

# 4. Quiz yourself with 50 random entries
qu 50

# 5. Fuzzy search everything
sef

> PROJECT.STRUCT

zsh-learn/
├── zsh-learn.plugin.zsh     # Main plugin entry point
├── autoload/                 # Lazy-loaded functions
│   ├── zsh-learn-Learn       # Core insert function
│   ├── zsh-learn-Searchl     # Search engine
│   ├── zsh-learn-Get         # Query interface
│   ├── del / delid           # Delete operations
│   ├── qu / qua              # Quiz functions
│   ├── se / see / seee / sef # Search variants
│   ├── ser / sera            # Random recall
│   └── ...                   # Additional utilities
├── src/                      # Completions
│   └── _se                   # Tab completion for se
└── tests/                    # Test suite
    ├── t-syntax.zsh          # Syntax validation
    └── t-unit.zsh            # Unit tests

┌──────────────────────────────────────────────────┐
│  created by MenkeTechnologies                     │
│  >> KNOWLEDGE IS THE ONLY CURRENCY THAT COMPOUNDS │
└──────────────────────────────────────────────────┘

About

learning collection in MySQL/MariaDB to save, query and quiz everything you learn

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages