Skip to main content

Aesthetic inspiration for your shell

Project description

Zen Prompt

Aesthetic inspiration for your shell.

Features

  • Shell Inspiration First: Instantly generate aesthetic quote prompts with zen-prompt random, using quotes collected from Goodreads and optional photo layouts for a more atmospheric terminal experience.
  • Resumable Crawling: Collect more quotes from Goodreads over time and resume from the last processed page for each tag.
  • Quote Statistics: Explore the collection later with database statistics and exports once your cache grows.

Tech Stack

  • Python 3.13+
  • uv: Dependency management and project isolation.
  • Scrapy: High-level crawling and scraping.
  • SQLite: Local persistence and state management.
  • Typer: CLI command parsing.
  • textual-image: Terminal image rendering for photo-backed quote output.
  • Pydantic: Data validation.

Setup

Install the package directly from PyPI (or your internal index):

pip install zen-prompt

This will install the zen-prompt command-line tool globally (or in your virtual environment).

Usage

After installation, you can use the zen-prompt command directly.

Random Inspiration

Start with the main experience: generate quotes collected from Goodreads directly in your shell.

Tip: add zen-prompt random to your shell startup file so each new terminal session opens with a fresh quote.

# zsh
echo 'zen-prompt random' >> ~/.zshrc

# bash
echo 'zen-prompt random' >> ~/.bashrc
# Get a random quote with the default monochrome photo
zen-prompt random

# Disable the default photo
zen-prompt random --no-photo

# Pick only shorter quotes
zen-prompt random --quote-max-words 20 --quote-max-chars 140

# Pick a random hero photo from a topic
zen-prompt random --photo topic@monochrome

# Control image size in the terminal
zen-prompt random --photo topic@monochrome --photo-max-height 10 --photo-max-width 80

# Render photo and quote side by side
zen-prompt random --photo topic@monochrome --photo-layout table

# Wrap long quotes to a fixed width
zen-prompt random --quote-width 60

# Reuse a fixed image for every quote
zen-prompt random --photo file@./cover.png

Crawling Later

Start crawling quotes for specific tags. The default tags are inspirational,motivational,buddhism.

# Basic crawl
zen-prompt crawl --tags inspirational,life

# Crawl from a specific Goodreads URL (author, book, etc.)
zen-prompt crawl --url https://www.goodreads.com/author/zen-prompt/123.Author_Name

# Configurable download delay (default 1s)
zen-prompt crawl --download-delay 2.0

The crawler will save quotes to docs/data/sqlite/quotes.db by default and display real-time progress.

Quote Statistics Later

Once you have a local cache, inspect the quote database with summary statistics.

# Print statistics in the terminal
zen-prompt stat

# Save statistics as Markdown
zen-prompt stat --output stats.md

Exporting

Export your collection as optimized web and CLI assets.

# Export optimized SQLite and JSON files to ./docs
zen-prompt export --output-dir ./docs --small-limit 500

This command creates:

  • docs/data/sqlite/quotes.db: Complete optimized database with FTS5 search.
  • docs/data/sqlite/quotes-small.db: Small subset (tag: buddhism) for instant availability.
  • docs/data/json/quotes.json & docs/data/json/quotes-small.json: JSON versions of the databases.
  • docs/data/csv/quotes.csv & docs/data/csv/quotes-small.csv: CSV versions of the databases.

Sync and Search

# Sync data files (SQLite, CSV, JSON) from the remote static website
zen-prompt sync https://anhldbk.github.io/zen-prompt/data/

# Lightning-fast keyword search using FTS5
zen-prompt search "success and happiness" --limit 3

Testing

Run the full suite of unit and integration tests:

export PYTHONPATH=$PYTHONPATH:. 
uv run pytest

Project Structure

  • zen-prompt/: Core package containing models, spider, database logic, and pipelines.
  • scripts/: Entry point bash scripts.
  • docs/: Design documents, implementation plans, and exported web assets (docs/data/).
  • tests/: Comprehensive test suite.

Vibe coded via Codex.

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

zen_prompt-0.1.0.tar.gz (4.2 MB view details)

Uploaded Source

Built Distribution

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

zen_prompt-0.1.0-py3-none-any.whl (3.4 MB view details)

Uploaded Python 3

File details

Details for the file zen_prompt-0.1.0.tar.gz.

File metadata

  • Download URL: zen_prompt-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zen_prompt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3ccd1c22e77bf2ce98b1222c151a8755679b7d8f66c0384449da0326b62a784e
MD5 dabfe61658a0623198f05b6ac02b4ba3
BLAKE2b-256 89bcde1f3a53823e5d06a0b7962b7a9e8cd37b21a2e2a9cf8760d27efcce83cc

See more details on using hashes here.

File details

Details for the file zen_prompt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zen_prompt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zen_prompt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44822b857626345ef2e2ebffc76c492b0763b3ac37cc032266cfa8342008113d
MD5 1e9485373fec95cc11338fdce1d6ca88
BLAKE2b-256 7793fe2700534e4999a17fad162d3717bc969c84539451009cddc32edf421621

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