CLI and Python toolkit for exploring Erdős problems
Project description
erdospy
erdospy is a Python package and CLI for analyzing Erdős problems, tracking latest progress, and surfacing relevant discussions directly from the terminal.
Documentation:
- Chinese quick start:
docs/quick-start.zh.md - MkDocs config:
mkdocs.yml - Reusable workflow skill:
skills/erdospy-workflow/SKILL.md
Current Phase 1 scope:
- standard
srclayout package - reusable SQLite query layer
typer + richCLI for core read workflows- pure CLI workspace flow for local build, incremental update, daily progress, and per-problem history
- full forum extraction via CLI, including thread metadata, problem descriptions, posts, replies, and reaction summaries
- analysis-oriented CLI access to the latest progress and related discussion history
- simple
servedashboard for local viewing and GitHub Pages publishing
Install
pip install -e .
Quick Start
This is the shortest real workflow today.
1. Create a writable local workspace database
erdospy build
By default this creates:
~/.erdospy/erdos_problems.db
~/.erdospy/history.jsonl
~/.erdospy/snapshot.json
Path overrides for automation and testing:
ERDOSPY_HOME: override the workspace root directoryERDOSPY_DB_PATH: override the exact database file path
2. Query the local workspace snapshot
erdospy stats --db ~/.erdospy/erdos_problems.db
erdospy get 42 --db ~/.erdospy/erdos_problems.db --comments
erdospy search "Sidon set" --db ~/.erdospy/erdos_problems.db --limit 5
erdospy list --db ~/.erdospy/erdos_problems.db --status open --tag primes --limit 10
3. Run an incremental refresh
erdospy update updates the local workspace changelog from the tracked forum index.
erdospy update --db ~/.erdospy/erdos_problems.db --quick
erdospy update --db ~/.erdospy/erdos_problems.db --pull
erdospy update --db ~/.erdospy/erdos_problems.db --comments-only
4. Run a full forum extraction
To capture full forum structure, including thread pages, posts, replies, and reaction summaries:
erdospy forum sync --db ~/.erdospy/erdos_problems.db
For a partial full sync while iterating on the scraper:
erdospy forum sync --db ~/.erdospy/erdos_problems.db --limit 20 --show-top 5
Stored forum stats can be inspected directly from CLI:
erdospy forum stats --db ~/.erdospy/erdos_problems.db
erdospy forum thread 12 --db ~/.erdospy/erdos_problems.db --show-posts 3
erdospy forum latest --db ~/.erdospy/erdos_problems.db --limit 10
erdospy forum related 12 --db ~/.erdospy/erdos_problems.db
erdospy forum search "Lean proofs" --db ~/.erdospy/erdos_problems.db
5. Check daily progress and specific records
erdospy daily --db ~/.erdospy/erdos_problems.db
erdospy daily --db ~/.erdospy/erdos_problems.db --date 2026-04-07
erdospy record 42 --db ~/.erdospy/erdos_problems.db
6. Reusable Skill
The reusable workflow description lives in:
skills/erdospy-workflow/SKILL.md
It documents the intended end-to-end usage pattern without adding extra CLI surface.
End-to-end CLI flow
# install once
pip install -e .
# create a writable local DB
erdospy build
# inspect local state
erdospy stats --db ~/.erdospy/erdos_problems.db
erdospy get 42 --db ~/.erdospy/erdos_problems.db --comments
# capture forum data once in full
erdospy forum sync --db ~/.erdospy/erdos_problems.db
# then run daily incremental refreshes
erdospy update --db ~/.erdospy/erdos_problems.db
# inspect what changed today
erdospy daily --db ~/.erdospy/erdos_problems.db
# drill into one problem's local history
erdospy record 42 --db ~/.erdospy/erdos_problems.db
# inspect full stored forum data for a thread
erdospy forum thread 12 --db ~/.erdospy/erdos_problems.db --show-posts 3
# inspect latest progress and related discussion
erdospy forum latest --db ~/.erdospy/erdos_problems.db --limit 10
erdospy forum related 12 --db ~/.erdospy/erdos_problems.db
erdospy forum search "formalised" --db ~/.erdospy/erdos_problems.db
# inspect one problem as a whole
erdospy progress 12 --db ~/.erdospy/erdos_problems.db
# get a compact digest of latest movement
erdospy digest --db ~/.erdospy/erdos_problems.db --limit 10
# serve a local dashboard
erdospy serve dashboard --db ~/.erdospy/erdos_problems.db --port 8000
Forum Capture Status
The current CLI supports a full forum extraction pass that stores:
- thread index metadata from
/forum/ - problem descriptions attached to thread pages
- full thread pages for stored entries
- posts and nested replies
- reaction summaries for posts
- problem-level forum reactions where present
Recent real CLI run against the local workspace database produced:
- indexed problem threads:
735 - stored thread details:
79 - stored forum posts:
1745 - distinct post authors:
85
Top stored problem threads in the current local snapshot:
#1038with134comments#848with48comments#1045with47comments#1041with41comments#423with38comments
Command Reference
erdospy stats
erdospy get 42
erdospy get 42 --json
erdospy get 42 --comments
erdospy search "Sidon set"
erdospy list --status open --tag primes --has-prize
erdospy progress 12
erdospy digest
erdospy build
erdospy update --quick
erdospy daily
erdospy record 42
erdospy forum sync
erdospy forum stats
erdospy forum thread 12
erdospy forum latest
erdospy forum related 12
erdospy forum search "formalised"
erdospy serve dashboard
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file erdospy-0.1.1.tar.gz.
File metadata
- Download URL: erdospy-0.1.1.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6d5f2b738349c6d489b339ad7b3e5d9ef42719309abe5e769d72b58876f3cb4
|
|
| MD5 |
f84a9e84df5ab20d988c0188ac2bf8df
|
|
| BLAKE2b-256 |
c1d6407bc269f9cb228b81628e8e597118aac14de313cec4843501425d92d19b
|
File details
Details for the file erdospy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: erdospy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 31.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be0a6f728cb13c74bd61c6cee266a0395b6a7c62366deaecffea0688bd0bb020
|
|
| MD5 |
b4e6924117af04e678d537387ad2cfdf
|
|
| BLAKE2b-256 |
cb5d573269c576f40508430138e08cb4a124ee943aa7ecd1e7c66358af7373e7
|