Skip to main content

CLI tool for organizing books and PDFs with AI-powered metadata

Project description

wst — Wan Shi Tong

Wan Shi Tong

"I am Wan Shi Tong, he who knows ten thousand things."

Character from Avatar: The Last Airbender. Avatar: The Last Airbender is a trademark of Viacom International Inc. Image used for illustrative purposes only.


CLI tool for organizing books and PDFs with AI-powered metadata generation.

Named after Wan Shi Tong, the ancient spirit who collected every piece of knowledge in the world and guarded the great library in the desert. This tool aspires to do the same for your PDFs — just with less hostility toward humans.

Features

  • AI-powered metadata: Automatically extracts and completes metadata (title, author, type, year, summary, tags, etc.) using Claude CLI with web search for missing fields (year, ISBN, publisher)
  • Organized library: Files sorted by type (books/, papers/, notes/, exercises/, guides/) with consistent naming (Author - Title (Year).pdf)
  • SQLite search index: Full-text search across title, author, tags, subject, and summary via FTS5
  • Interactive browser: Fuzzy-search your library, view and edit metadata interactively
  • Cloud backup: Backup files to iCloud Drive (macOS/Windows), with extensible provider system for future S3 support
  • Extensible backends: Abstract layers for AI (Claude CLI, future API/SDK) and storage (local filesystem, future S3)

Installation

pipx (recommended, all platforms)

pipx install wst-library

pip

pip install wst-library

Homebrew (macOS/Linux)

brew tap cnexans/tap
brew install wst

Chocolatey (Windows)

choco install wst

From source

git clone https://github.com/cnexans/wst.git
cd wst
make install

Quick Start

# Ingest PDFs from a folder
wst ingest ~/Documents/papers/

# Ingest from current directory
wst ingest .

# Ingest from default inbox (~/wst/inbox/)
wst ingest

# Ingest with manual confirmation for each file
wst ingest --confirm

# Re-ingest files with fresh AI metadata (e.g. after enabling web search)
wst ingest --reprocess

# Search
wst search "machine learning"
wst search --author "Knuth"
wst search --type textbook
wst search --subject "Mathematics"

# List all documents
wst list
wst list --type paper --sort year

# Show full details
wst show 1
wst show "Design Patterns"

# Interactive browser — fuzzy search, view and edit metadata
wst browse

# Edit a specific document
wst edit 1
wst edit "Player's Handbook"

# Backup to iCloud
wst backup icloud                    # interactive: all or select file
wst backup icloud 1                  # backup specific file by ID
wst backup icloud "Player's Handbook" # backup by title
wst backup                           # interactive: choose provider

Commands

Command Description
wst ingest [PATH] [--confirm] [--reprocess] Ingest PDFs from a path or the inbox, generate metadata with AI
wst search <query> [--author] [--type] [--subject] Full-text search across the index
wst list [--type] [--sort] List all documents in the library
wst show <id-or-title> Show complete metadata for a document
wst edit <id-or-title> Interactively edit metadata for a document
wst browse Interactive TUI for browsing and editing documents
wst backup [provider] [id-or-title] Backup files to a cloud provider (iCloud, future S3)

Library Structure

~/wst/
├── inbox/           # PDFs pending ingestion
└── library/
    ├── books/       # book, novel, textbook
    ├── papers/      # paper
    ├── notes/       # class-notes
    ├── exercises/   # exercises
    ├── guides/      # guide-theory, guide-practice
    └── wst.db       # SQLite index

Documentation

See docs/README.md for architecture details and diagrams.

Requirements

  • Python 3.11+
  • claude CLI (authenticated) for AI metadata generation
  • macOS, Windows, or Linux

License

MIT with Commons Clause — free to use, modify, and distribute. Commercial sale rights reserved to the author. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wst_library-0.1.2.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wst_library-0.1.2-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file wst_library-0.1.2.tar.gz.

File metadata

  • Download URL: wst_library-0.1.2.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for wst_library-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f323cb35ea43401e26fa87b961cfe9db1b72b698d61c50e616584938e92da63e
MD5 5793166d45202c28ca9bb76285616846
BLAKE2b-256 22bd1eee948e767222bfc6fa0c99d23b6f49a3701c96417e39f3e6fa02c76b40

See more details on using hashes here.

File details

Details for the file wst_library-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: wst_library-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for wst_library-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c408935c7c40d264df5665d33c9c1e214b39bf47e125b73c3277c20456a21ea3
MD5 061fb3fa1e722876a99504faf0ed20ba
BLAKE2b-256 a89a7c447453604c73675a412f3eac520647f9da34d09b50d17facd6fce1de7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page