Skip to main content

hipda

Local-first CLI for the 4D4Y/HiPDA Discovery channel (fid=2). Threads and posts are mirrored into a local SQLite store with FTS5 + jieba so listing, reading, and searching all work offline once the cache is warm.

Install + log in

The site uses browser/session checks, so direct unauthenticated requests may return a Cloudflare challenge. Log in once through Chrome:

uvx --from . hipda login

From PyPI:

uvx hipda login

That opens 4D4Y in Google Chrome. After you finish logging in, return to the terminal and press Enter.

The cookie is stored at ~/.config/hipda/cookie and the user agent is stored at ~/.config/hipda/user-agent, both with 0600 permissions. You can override them per command with HIPDA_COOKIE / --cookie and HIPDA_USER_AGENT / --user-agent.

Sync the local store

uvx --from . hipda sync                  # walk recent Discovery pages, stop when a page brings no changes
uvx --from . hipda sync --max-pages 10   # walk up to 10 pages
uvx --from . hipda sync --no-early-stop  # always walk the full --max-pages range

Sync writes to the SQLite database at $HIPDA_DB, or $XDG_DATA_HOME/hipda/hipda.sqlite, falling back to ~/.local/share/hipda/hipda.sqlite.

List threads (local-first)

uvx --from . hipda list --limit 20            # reads local DB; auto-syncs when cold
uvx --from . hipda list --refresh             # sync first, then print
uvx --from . hipda list --offline             # never touch the network
uvx --from . hipda list --show-pinned         # include pinned threads
uvx --from . hipda list --json                # machine-readable output

Read a thread (local-first)

uvx --from . hipda read 3446553               # reads local; auto-fetches the thread when cold
uvx --from . hipda read 3446553 --refresh     # re-sync the thread before printing
uvx --from . hipda read 3446553 --offline     # local only
uvx --from . hipda read 3446553 --json        # JSON array of posts

Search runs entirely against the local SQLite FTS5 index. Queries are segmented with jieba so CJK input works without spaces.

uvx --from . hipda search "半导体"
uvx --from . hipda search "半导体" --scope threads     # only thread titles
uvx --from . hipda search "半导体" --scope posts       # only post bodies
uvx --from . hipda search "半导体" --json --limit 50   # machine-readable

Each hit returns the matching tid (and pid for post matches), the thread title, and a snippet with [...] brackets around the matched tokens.

Exit codes

  • 0 — success
  • 1 — generic failure (e.g. parse error, thread not found upstream)
  • 2 — auth required (run hipda login)
  • 4 — --offline requested but the local store is missing the needed data

TLS

The CLI disables HTTPS certificate verification by default because 4D4Y often fails from Python environments where Chrome still works. To verify certificates, pass a trusted root certificate and --verify-tls:

uvx --from . hipda --verify-tls --ca-file /path/to/root-ca.pem sync

Legacy

hipda list previously fetched directly from the forum on every call. The behaviour is now local-first; the old hipda discovery list and hipda discovery read subcommands still resolve through the same local-first path.

Metadata

Release files for hipda 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hipda 0.2.1
File Size Uploaded Provenance
hipda-0.2.1.tar.gz 35.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hipda 0.2.1
File Interpreter ABI Platform
hipda-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 51.7 kB

Release files / hipda-0.2.1.tar.gz

Download URL hipda-0.2.1.tar.gz
Size 35.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fcae476610155ced8a89d8227cad27c8cf1f2875b83fd2219bdefb1d2f82ecc1
BLAKE2b-256 checksum
How to use checksums
6a6f39d9ef271df41bcced3f8c9dee05bc3d07a2c3c25e2d4f4aa643a2591f8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 25, 2026.

Transparency log

Release files / hipda-0.2.1-py3-none-any.whl

Download URL hipda-0.2.1-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
807b70488aee052ad171243e527f0f6ad135a0c0378a6f91cd74f37d93eeebef
BLAKE2b-256 checksum
How to use checksums
ae3f1ff69f56a71fe0f91ee6714753995e15191f082204d6772ef2904a0048a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 25, 2026.

Transparency log

Security for hipda 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hipda-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page