Skip to content

dipu01-code/STUDY_LOCK

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—    โ–ˆโ–ˆโ•—      โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•—
  โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•    โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•
  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•     โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•
  โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘  โ•šโ–ˆโ–ˆโ•”โ•      โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•—
  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘   โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•   โ–ˆโ–ˆโ•‘       โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•—
  โ•šโ•โ•โ•โ•โ•โ•โ•   โ•šโ•โ•    โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•    โ•šโ•โ•       โ•šโ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•  โ•šโ•โ•โ•โ•โ•โ•โ•šโ•โ•  โ•šโ•โ•

The AI study agent that locks you in, teaches you properly, and won't let you leave until you actually understand it. Runs 100% locally. No cloud. No subscription. No excuses.


What even is this?

You know that feeling where you open a YouTube tutorial, watch 4 minutes, think "wait let me just check one thing", and then 45 minutes later you're watching a video about why cats hate water?

That's not a willpower problem. That's a missing accountability loop.

Study Lock is a terminal app that:

  1. Takes any learning resource โ€” a YouTube video, a PDF, a website, raw notes
  2. Reads it completely and chunks it into digestible topic sections
  3. Locks your terminal into fullscreen (you can't Ctrl+C your way out)
  4. Assigns you one of 4 AI teacher personas who teach each chunk their way
  5. Won't let you advance until you score 70+ on a comprehension question
  6. Tracks exactly which concepts you're weak on and hammers those specifically
  7. Unlocks you when the session is done โ€” with a full breakdown of what you know and what needs work

The timer is a soft deadline. If it runs out mid-chunk, you still have to clear that chunk. The material wins. Always.


The 4 Teachers

      _                  _____             __________          * . * . *
   __/ \__              [=o=o=]           [##########]        .  (     )  .
  / o   o \            / \___/ \          | >      < |       *  ( o . o )  *
 |    w    |          | ' ___ ' |         |   ____   |        .  \ ___ /  .
  \_______/           |  (   )  |         |  ( __ )  |         * .     . *
    |   |              \_______/          |__________|           * * * * *
  ~~|   |~~              |   |                | |                  |     |
   /     \              _|___|_              _|_|_

  Sensei Sam            Prof. Maya        Drill Sgt. Rex        The Oracle
  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€            โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€        โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€        โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  Gentle                Rigorous          Demanding             Adaptive
  Calm analogies,       Socratic method,  Dense. Direct.        Watches your
  walks you through     expects you to    No fluff. Calls       answers and
  it like a friend      reason, not       out vague answers     adjusts the
  over coffee           just recall       immediately           whole session

Pick one at the start. Your choice sets the entire tone of the session โ€” how concepts are explained, how questions are framed, how feedback lands.


What it does to your brain (the actual flow)

  You paste a resource
         โ”‚
         โ–ผ
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  INGEST                                                     โ”‚
  โ”‚  YouTube โ†’ transcript API                                   โ”‚
  โ”‚  Website โ†’ article extraction (strips nav, ads, footer)     โ”‚
  โ”‚  PDF     โ†’ full text via PyMuPDF                            โ”‚
  โ”‚  DOCX    โ†’ paragraph extraction                             โ”‚
  โ”‚  Text    โ†’ used directly                                    โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
                        โ–ผ
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  SMART CHUNKER                                              โ”‚
  โ”‚  Strips filler words, timestamps, transcript noise          โ”‚
  โ”‚  Detects topic transitions ("now let's look at...",         โ”‚
  โ”‚  "the next thing...", "in other words...")                  โ”‚
  โ”‚  Groups into ~700-word topic chunks with 80-word overlap    โ”‚
  โ”‚  Labels each chunk with a topic hint                        โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
                        โ–ผ
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  SESSION LOCK                                               โ”‚
  โ”‚  Terminal goes fullscreen via AppleScript                   โ”‚
  โ”‚  Ctrl+C blocked with a reminder message                     โ”‚
  โ”‚  Background timer thread starts countdown                   โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
                   โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”
                   โ”‚  CHUNK  โ”‚ โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                   โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜                                 โ”‚
                        โ”‚                                      โ”‚
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                         โ”‚
            โ”‚  TEACH                โ”‚                         โ”‚
            โ”‚  Persona reads chunk  โ”‚                         โ”‚
            โ”‚  Teaches from OWN     โ”‚                         โ”‚
            โ”‚  knowledge (material  โ”‚                         โ”‚
            โ”‚  is a reference, not  โ”‚                         โ”‚
            โ”‚  a script)            โ”‚                         โ”‚
            โ”‚  Streams token-by-    โ”‚                         โ”‚
            โ”‚  token live           โ”‚                         โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                         โ”‚
                        โ”‚                                      โ”‚
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                         โ”‚
            โ”‚  QUESTION             โ”‚                         โ”‚
            โ”‚  Generated based on   โ”‚                         โ”‚
            โ”‚  concept + your known โ”‚                         โ”‚
            โ”‚  weak areas           โ”‚                         โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                         โ”‚
                        โ”‚                                      โ”‚
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                         โ”‚
            โ”‚  YOUR ANSWER          โ”‚                         โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                         โ”‚
                        โ”‚                                      โ”‚
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      score < 70         โ”‚
            โ”‚  EVALUATE             โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
            โ”‚  Score 0โ€“100          โ”‚  rephrase question       โ”‚
            โ”‚  Specific feedback    โ”‚  every 3 fails           โ”‚
            โ”‚  Records weak areas   โ”‚                         โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                         โ”‚
                        โ”‚ score โ‰ฅ 70                           โ”‚
                        โ–ผ                                      โ”‚
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    more chunks?          โ”‚
            โ”‚  CHUNK CLEARED โœ“      โ”œโ”€โ”€โ”€โ”€ yes โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚ no more chunks
                        โ–ผ
              SESSION SUMMARY + UNLOCK

Prerequisites

  • macOS (fullscreen lock uses AppleScript โ€” on other OS the session still works, just no forced fullscreen)
  • Python 3.11+
  • Ollama (runs Gemma locally โ€” no internet needed after initial setup)
  • ~10GB disk space for the Gemma model

Setup & Run

Step 1 โ€” Install Ollama and pull the model

# Install Ollama (macOS)
brew install ollama

# Start the Ollama server in the background
ollama serve &

# Pull Gemma 4 (~10GB, one-time download โ€” go make a coffee)
ollama pull gemma4

Why Gemma? It's Google's open-weights model that runs well on consumer hardware. If you have a different model already pulled, you can use that instead โ€” see the Model Options section below.


Step 2 โ€” Set up Python environment

# Navigate into the project folder
cd study-lock-v2-improved

# Create a virtual environment (keeps your system Python clean)
python3 -m venv venv

# Activate it
source venv/bin/activate

# Install all dependencies
pip install -r requirements.txt

You'll see (venv) appear in your terminal prompt. That means you're inside the virtual environment. Every time you open a new terminal to use Study Lock, run source venv/bin/activate again first.


Step 3 โ€” Run it

python main.py

That's it. The app takes over from here.


Step 4 โ€” Use it

What's your name?  โ†’ Ray

Source?  โ†’ https://youtu.be/lfmg-EJ8gm4
         โ†’ /Users/ray/notes.pdf
         โ†’ https://docs.python.org/3/tutorial/
         โ†’ (paste raw text directly)

Duration?  โ†’ 30   (minutes)

Teacher?   โ†’ 1 (Sensei Sam)
           โ†’ 2 (Prof. Maya)
           โ†’ 3 (Drill Sgt. Rex)
           โ†’ 4 (The Oracle)

Then you're locked in.


Using a Different Model

By default the app uses gemma4. You can swap any Ollama model in:

# Use Gemma 3 (smaller, faster)
STUDY_MODEL=gemma3 python main.py

# Use Llama 3.2
STUDY_MODEL=llama3.2 python main.py

# Use Mistral
STUDY_MODEL=mistral python main.py

Or change the default permanently โ€” open main.py and find this line near the top:

MODEL = os.environ.get("STUDY_MODEL", "gemma4")

Replace "gemma4" with whatever model you want.

To see what models you have pulled:

ollama list

The Fullscreen Lock

When a session starts, the app fires an AppleScript that sets AXFullScreen = true on whatever terminal window is active. This works with Terminal.app and iTerm2.

For this to work, you need to grant Accessibility access once:

System Settings โ†’ Privacy & Security โ†’ Accessibility โ†’ enable Terminal (or iTerm2)

If you skip this, the session still runs โ€” it just won't force fullscreen. You'd be on the honour system.

During the session, Ctrl+C is intercepted. Instead of killing the process, it prints:

โšก Ctrl+C blocked during study session.
   To exit early, type: "i commit to finishing"

Yes, the exit phrase is ironic on purpose.


Supported Sources

Type Example
YouTube https://youtu.be/dQw4w9WgXcQ ยท https://youtube.com/watch?v=...
Website https://docs.python.org/3/tutorial/ ยท any article URL
PDF /Users/ray/Downloads/lecture.pdf
Word doc /Users/ray/notes.docx
Plain text Just paste it directly at the source prompt

YouTube note: The video needs English captions enabled (auto-generated is fine). If a video has no captions at all, you'll get an error โ€” paste the transcript manually instead.


Project Structure

study-lock-v2-improved/
โ”‚
โ”œโ”€โ”€ main.py                  โ† Entry point. Onboarding, persona picker, session loop
โ”‚
โ”œโ”€โ”€ requirements.txt         โ† All Python dependencies
โ”‚
โ”œโ”€โ”€ content/
โ”‚   โ”œโ”€โ”€ ingester.py          โ† Pulls text from YouTube / websites / PDFs / DOCX / text
โ”‚   โ””โ”€โ”€ chunker.py           โ† Cleans transcript noise, detects topic boundaries,
โ”‚                               groups into ~700-word chunks with topic labels
โ”‚
โ”œโ”€โ”€ agents/
โ”‚   โ”œโ”€โ”€ personas.py          โ† 4 persona definitions: prompts, ASCII art, difficulty
โ”‚   โ””โ”€โ”€ study_agent.py       โ† Core loop: teach โ†’ question โ†’ evaluate โ†’ gate
โ”‚                               Also contains WeaknessTracker
โ”‚
โ””โ”€โ”€ session/
    โ””โ”€โ”€ manager.py           โ† Timer thread, fullscreen AppleScript,
                                Ctrl+C signal trap, session state

The Weakness Tracker

This is the part that makes Study Lock actually adaptive rather than just a fancy flashcard app.

Every time you answer a question, the app:

  1. Extracts a "concept label" from the question (strips stop words, keeps the 5 most meaningful words)
  2. Records your score against that concept
  3. On every subsequent teach and question call, if you have weak concepts (score < 65), that context is injected into the prompt:
Student has struggled with: 'recursion base case' (score: 32),
'stack frame allocation' (score: 45). Address these proactively.

The Oracle persona responds to this most aggressively โ€” it'll pivot the entire explanation toward your gaps. Drill Sergeant Rex will specifically target your weak spots in the question. At the end of the session, your weak areas are listed in the summary so you know exactly what to review.


The Session Summary

When you're done, you get a breakdown:

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Session Summary โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                        โ”‚
โ”‚  Ray โ€” session complete!                               โ”‚
โ”‚                                                        โ”‚
โ”‚  Material:   Python Tutorial for Beginners             โ”‚
โ”‚  Teacher:    ๐Ÿง˜ Sensei Sam                             โ”‚
โ”‚  Time:       28.4 min                                  โ”‚
โ”‚  Chunks:     4 / 6                                     โ”‚
โ”‚  Questions:  3 cleared / 4 asked                       โ”‚
โ”‚  Score:      75% โ€” Good                                โ”‚
โ”‚                                                        โ”‚
โ”‚  Solid session. Keep the momentum.                     โ”‚
โ”‚                                                        โ”‚
โ”‚  Watch out for: 'variable scope closures' (score 41)   โ”‚
โ”‚                                                        โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Dependencies

Package What it does
ollama Talks to your local Ollama server
rich All the terminal UI โ€” panels, spinners, score bars, colour
youtube-transcript-api Pulls captions from YouTube videos
requests + beautifulsoup4 Fetches and parses websites
readability-lxml Extracts the article content from a webpage (strips nav, ads, sidebars)
PyMuPDF Extracts text from PDFs page by page
python-docx Reads Word documents

Everything runs locally. After the initial pip install and model pull, this works fully offline.


Troubleshooting

Could not connect to Ollama

# Ollama isn't running. Start it:
ollama serve
# (run this in a separate terminal tab, or add & to background it)

Model 'gemma4' not found

ollama pull gemma4
# or check what you have:
ollama list
# then run with a model you actually have:
STUDY_MODEL=gemma3 python main.py

No English transcript available The video doesn't have English captions. Either find a video that does, or copy-paste the transcript manually at the source prompt.

Fullscreen doesn't work Go to System Settings โ†’ Privacy & Security โ†’ Accessibility and enable your terminal app. Or just manually fullscreen your terminal before starting โ€” same effect.

(venv) disappeared from my prompt Your virtual environment got deactivated (new terminal tab, shell restart). Run:

source venv/bin/activate

Philosophy

Most study tools optimise for engagement. Study Lock optimises for one thing: did you actually understand it?

The comprehension gate (score 70+ to advance) means you can't passively consume. The weakness tracker means the session responds to your actual gaps, not a generic curriculum. The fullscreen lock means your phone-checking reflex has to fight the OS rather than just your willpower.

It's not supposed to be fun the way scrolling is fun. It's supposed to feel like the good kind of hard โ€” the kind where you close the terminal and actually know something you didn't know before.


License

MIT โ€” do whatever you want with it.


Built with Ollama + Gemma + Rich. Runs entirely on your machine.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%