Repository navigation
feat(cli): iris peers — watch peer accounts, list what worked that you haven't covered (FL-CO-112) - #348
Open
mayoalexander wants to merge 4 commits into
Open
feat(cli): iris peers — watch peer accounts, list what worked that you haven't covered (FL-CO-112)#348mayoalexander wants to merge 4 commits into
mayoalexander wants to merge 4 commits into
Conversation
…en't covered (FL-CO-112) Adds a top-level `iris peers` command (add/remove/list/pull/gaps). The watch list and each account's posts live in ~/.iris/peers. pull lists the latest N posts per account with yt-dlp in metadata mode (no video unless --transcribe), merges into posts.json, and says plainly when Instagram needs a session (--cookies). gaps ranks posts by views relative to each account's median and marks them covered/not by keyword overlap with the --mine account. No LLM, no schedule. download.ts now exports downloadFile, metaAuthor and metaDate for reuse. Atlas #191297, epic #191300. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pty transcripts not redone Found running it against real accounts: #learnfromkhaby glued into every phrase and topped every label; an ASMR short with no speech was re-transcribed each pull. Caption words are never treated as signatures, so an account that keeps posting one topic stays on topic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
need to rename this to something other than peers - there is a naming conflict with IRIS HIVE Peers This needs to be competitive-gap-analysis or something like that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Atlas ticket: #191297 (FL-CO-112 "Watch peer artists"), epic #191300
What
A new top-level command,
iris peers. It watches peer and competitor accounts and lists the topics that did well for them that you haven't covered yet.iris peers add <handle-or-url...> [--platform instagram|tiktok|youtube] [--label scene] [--mine],remove <handle>,list [--json]. The watch list is stored in~/.iris/peers/peers.jsonand honoursIRIS_HOME(orIRIS_PEERS_HOME). Only one account can be--mine.iris peers pull [handle...] [--latest 12] [--transcribe] [--cookies <file>] [--urls <post-url...>] [--flat] [--delay 3] [--json]--skip-download --dump-json --playlist-end N --ignore-errors). No video is downloaded.~/.iris/peers/<id>/posts.json. Posts are merged by id withfirst_seen_atandseen_at. A later pull that has fewer fields never erases fields an earlier pull found.--transcribedownloads audio only for posts not transcribed yet, then runs on-device whisper.cpp (transcribeLocal). It never falls back to a server upload, and an empty transcript is not redone.--cookies <cookies.txt>and the--urlsfallback) and carries on with the other accounts.--helpshows a crontab line the user can add themselves.iris peers gaps [--top 10] [--days 30] [--threshold 0.5] [--sort relative|views] [--all] [--json]--sort views.--mineaccount's posts. No LLM; the same input always gives the same output.download.tsnow exportsdownloadFile,metaAuthorandmetaDate, which peers reuses.metadataToMarkdownuses the same two helpers. yt-dlp is called through the sharedfetchWithYtDlpin media-fetch.ts.iris hive peersis a subcommand ofhive, so the top-levelpeersname is free.command-collisions.test.tsdoesn't report a new collision.Why
A creator pulls his competitors' latest reels every two days and lists the topics that worked for them that he hasn't covered.
iris downloadonly takes one post at a time.How verified
bun test src/cli/cmd/platform-peers.test.ts: 36 pass. This covers handle/URL normalisation, yt-dlp JSON → post record (fixtures trimmed from real yt-dlp output for YouTube full and flat, TikTok and Instagram), merge/dedupe, error classification and messages, keyword extraction, signature tags, coverage, median-relative ranking and determinism. yt-dlp is mocked throughfetchWithYtDlp'srunhook, so no test touches the network.bun run typecheckis clean. The pre-push hook passed with bun 1.3.11 (typecheck, capabilities, routes, playbooks).capabilities.jsonwas regenerated to include the new subcommands.media-fetch.test.tspasses. Incommand-collisions.test.ts, two tests fail ("alias detection is alive" and "known list has no stale entries"). They fail the same way on clean origin/main, so this PR doesn't cause them.IRIS_PEERS_HOME:youtube.com/@mkbhd/shorts,tiktok.com/@khaby.lame,natgeo(Instagram), and@mrwhosetheboss --platform youtube --mine.peers pull --latest 5: YouTube and TikTok each listed 5 posts with dates, views, likes and comments, in about 40s for all four accounts. Instagram printed the login/cookies message and the other accounts carried on.peers pull natgeo --urls https://www.instagram.com/reel/DbcFYsCF8b9/saved that post. Instagram gives likes but no views without a login.peers pull mkbhd --latest 2 --transcribetranscribed one short on-device (264 words). The silent ASMR short gave an empty transcript, and the next run didn't try it again.peers gaps --days 400: mkbhd's iPhone Duo posts came out covered by mine (mrwhosetheboss posted about iPhone Duo too). "camera robot", "esim holafly" and "charlie rocket / real fans" came out not covered.Known limits
instagram:userextractor as broken ("Unable to extract data"), so listing a profile fails even with a login, and--cookiesmay not help. Adding single posts with--urlsworks. Without a login, Instagram reports likes but no views, sogapsranks Instagram posts by likes relative to that account's median.--flatis faster but YouTube returns no dates or likes in flat mode. Undated posts count as in the window by theirfirst_seen_at.--thresholdadjusts how strict it is.scaffold/.creator-os-content-planlives in the registry and will be updated separately.🤖 Generated with Claude Code