Skip to main content
NoteWise stores two categories of persistent state on disk: a SQLite cache that tracks processed videos and transcripts, and structured log files that record each session. Both live inside the state directory at ~/.notewise/ by default.
Override the state directory for all state (cache, logs, config) by setting the NOTEWISE_HOME environment variable:
export NOTEWISE_HOME=/data/notewise

Cache

Location

The cache database is a single SQLite file:
~/.notewise/.notewise_cache.db
It stores video metadata, transcript text, run statistics (tokens, cost, duration), and export records. When you rerun process on a URL that’s already cached, NoteWise skips fetching the transcript and jumps straight to note generation — or skips the whole video if notes already exist.

Inspecting the cache

Show cache summary

notewise cache
Displays the database location, file size, and counts of videos, transcripts, runs, and exports, along with the oldest and newest cached timestamps.

Show a specific cached video

notewise cache --show VIDEO_ID
Replace VIDEO_ID with the YouTube video ID (the v= value from the URL). Shows the video title, duration, transcript status, run count, latest model used, and latest cost.

Clearing and pruning

Delete the entire cache

notewise cache --clear
Prompts for confirmation before deleting the database file (and any SQLite WAL/SHM sidecar files). Pass --yes to skip the prompt:
notewise cache --clear --yes
Clearing the cache is irreversible. After clearing, all previously processed videos will be treated as new and reprocessed on the next run.

Prune stale entries by age

Remove cache entries that were last accessed more than a given number of days ago:
notewise cache --prune 30
This keeps your cache lean without discarding everything. Only records older than the specified number of days are removed; recent entries are preserved.

Viewing processing history and statistics

Two additional commands read from the cache database:
# Show recently processed videos (default: last 10)
notewise history

# Show more entries
notewise history --limit 25

# Show aggregate processing statistics
notewise stats

# Filter stats to a specific model
notewise stats --model gpt-4o

# Filter stats to the last 7 days
notewise stats --since 7
notewise stats shows totals for videos processed, LLM tokens used, estimated cost, transcript fetch time, and generation time — broken down by model.

Logs

Location

Each NoteWise session writes a structured log file to:
~/.notewise/logs/
Log files are named with a notewise prefix and a timestamp, for example notewise-2024-01-15T14-32-00.log. The current session’s log file is created when configure_logging() is called at the start of a process run.

Listing recent logs

notewise logs
Lists up to 5 recent log files with their size and last-modified timestamp, and prints the total size of all log files in the directory.

Tailing the latest log

notewise logs --tail 50
Prints the last 50 lines of the most recent log file directly in the terminal. Useful for quickly checking what happened in the last run without opening a file.
# Show only the last 20 lines
notewise logs --tail 20

Opening the log directory

notewise logs --open
Opens the log directory in your system’s file manager (Finder on macOS, your default file manager on Linux, Explorer on Windows).

Cleaning up old logs

Remove logs older than N days

notewise logs clean --older-than 7
Removes all inactive log files that were last modified more than the specified number of days ago. The currently active session log is never deleted.

Remove all inactive logs

notewise logs clean --all
Removes every log file except the currently active session log.

Health check

The doctor command gives a quick overview of all persistent state in one place — config file, API key, output directory, cache database, and log directory:
notewise doctor
It checks whether each item is present and functional, and prints a summary with OK, WARN, or FAIL status for each check. Run this first if something seems wrong.

Build docs developers (and LLMs) love