Releases: tamnd/facebook-cli
v0.1.2
fb reads public Facebook groups in full.
Highlights
fb groupnow returns a group's name, description, cover image, privacy, and URL, read from the same server-rendered page everything else uses.- A group feed lists its posts, and each post carries its id, author, date, reaction and comment counts, media, permalink, and text.
- Comments on a group post come back through the normal post read, so a public group can be walked end to end.
fb group python -o json
fb group python --posts -n 20 -o jsonl
fb post <group-post-url> --comments -o jsonlMember count is not part of the crawler surface, so it is only filled in when the group description spells it out. Private groups exit 4.
Install
brew install tamnd/tap/fb
scoop install fb
docker pull ghcr.io/tamnd/fb:0.1.2Linux packages (deb/rpm/apk), prebuilt binaries for linux/macOS/windows/freebsd, CycloneDX SBOMs, and cosign signatures are attached below. Verify with the checksums.txt, .sig, and .pem assets.
v0.1.1
This release changes how fb reaches Facebook and adds a command for mirroring a Page to disk.
Reading without a cookie
fb now reads Facebook as an anonymous web crawler. It presents a crawler user agent and reads the same server-rendered pages Facebook serves to search engines, so a public Page, profile, group, or post comes back as HTML with the text, counts, media, and a few preview comments baked in. There is no login, no cookie, and no browser to drive.
- The cookie layer is gone: the
--cookieand--cookie-fileflags, theFACEBOOK_COOKIEenvironment variables, and the cookie request header. fb whoaminow reports the access mode and user agent instead of a session.- The trade-off is depth: a feed exposes the most recent posts rather than the full history, and a post carries a handful of preview comments rather than its whole thread. Private targets still exit
4.
Archiving
fb archive <page>mirrors a Page's recent feed to a browsable tree of Markdown: one file per post under<out>/<page>/YYYY/MM/, plus a generatedREADME.mdindexed by year and month with a stats table.- Re-running is incremental. A small
index.jsonrecords what is on disk, so a second run fetches only new posts;--forceoverwrites. The index and each post are written as the crawl proceeds, so an interrupted run resumes cleanly. - Post slugs are transliterated to ASCII, Vietnamese diacritics included, so accented titles produce clean file names.
Fixes
- Group post permalinks (
groups/<id>/posts/<id>) are now recognized when walking a feed.
Install
Homebrew
brew install tamnd/tap/fbScoop (Windows)
scoop bucket add tamnd https://github.com/tamnd/scoop-bucket
scoop install fbContainer
docker run --rm ghcr.io/tamnd/fb:0.1.1 versionDebian / Ubuntu, Fedora / RHEL, Alpine
Download the .deb, .rpm, or .apk for your architecture from the assets below and install it with your package manager.
Binary
Download the archive for your platform from the assets below, extract, and put fb on your PATH.
Notes
- Every archive ships a CycloneDX SBOM, and
checksums.txtis signed with keyless cosign (checksums.txt.sig+checksums.txt.pem).
Documentation: https://facebook-cli.tamnd.com
v0.1.0
The first release of fb, a delightful, scriptable command line for Facebook. It turns facebook.com into typed, structured data from a single pure-Go binary with no runtime dependencies and no browser.
Highlights
- Entities. Resolve any Page, profile, or group to a rich record, and stream its feed with
--posts, bounded by--limitor by date. - Posts in depth. Pull a post with its full comment thread (
--comments,--replies, withparent_idon every reply) and its reaction breakdown (--reactions,--list). Pagination walks to the end, so-n 0takes everything. - Media. Stream photos, videos, and reels; resolve a single photo or video including playable sources with
--streams; list public events. - Discovery.
searchacross Facebook's surfaces by type, andfb idto classify any handle, id, or URL with no network call. - Datasets.
seeda root into URLs,crawlthem into records, anddb querya local SQLite store with SQL. - Output. One formatter for every command:
table,jsonl,json,csv,tsv,yaml,url, andraw, with--fieldsand--template.
Install
Homebrew
brew install tamnd/tap/fbScoop (Windows)
scoop bucket add tamnd https://github.com/tamnd/scoop-bucket
scoop install fbContainer
docker run --rm ghcr.io/tamnd/fb:0.1.0 versionDebian / Ubuntu, Fedora / RHEL, Alpine
Download the .deb, .rpm, or .apk for your architecture from the assets below and install it with your package manager.
Binary
Download the archive for your platform from the assets below, extract, and put fb on your PATH.
Notes
- Facebook gates most reads behind a login. fb reads the no-JavaScript surface and is explicit about the wall: commands that need a session exit
4with a hint. Supply a cookie with--cookie,--cookie-file, orFACEBOOK_COOKIEto unlock full data. - Every archive ships a CycloneDX SBOM, and
checksums.txtis signed with keyless cosign (checksums.txt.sig+checksums.txt.pem).
Documentation: https://facebook-cli.tamnd.com