{"id":50547715,"url":"https://github.com/ibbybuilds/mvd","last_synced_at":"2026-06-04T00:04:03.006Z","repository":{"id":359886797,"uuid":"1247874923","full_name":"ibbybuilds/mvd","owner":"ibbybuilds","description":"Movie discovery + watchlist CLI. Built for humans and AI agents.","archived":false,"fork":false,"pushed_at":"2026-05-23T23:20:33.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T01:11:08.696Z","etag":null,"topics":["agent-tools","cli","movies","tmdb","typescript","watchlist"],"latest_commit_sha":null,"homepage":"https://github.com/ibbybuilds/mvd","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibbybuilds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-23T22:37:56.000Z","updated_at":"2026-05-23T23:20:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ibbybuilds/mvd","commit_stats":null,"previous_names":["ibbybuilds/mvd"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ibbybuilds/mvd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibbybuilds%2Fmvd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibbybuilds%2Fmvd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibbybuilds%2Fmvd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibbybuilds%2Fmvd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibbybuilds","download_url":"https://codeload.github.com/ibbybuilds/mvd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibbybuilds%2Fmvd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33884774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-tools","cli","movies","tmdb","typescript","watchlist"],"created_at":"2026-06-04T00:04:02.192Z","updated_at":"2026-06-04T00:04:02.991Z","avatar_url":"https://github.com/ibbybuilds.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mvd\n\nMovie discovery + watchlist CLI. Built for humans and AI agents.\n\nDiscover movies by year, genre, rating, votes. Maintain a watchlist. Mark watched + rate. All local — no cloud sync, no telemetry.\n\n```\n$ mvd discover --year 2024 --min-rating 8 --top 5\n  ID      TITLE                    YEAR  TMDB  VOTES  GENRES\n  ──────  ───────────────────────  ────  ────  ─────  ────────────────────\n  1184918 The Wild Robot           2024  8.4   3500   Animation, Family\n  933260  The Substance            2024  8.2   2800   Horror, Drama\n  ...\n```\n\n## Install\n\n```bash\nnpm install -g @ibbybuilds/mvd\nmvd init                # prompts for TMDB + OMDb keys\n```\n\nGet a free TMDB v4 token at \u003chttps://www.themoviedb.org/settings/api\u003e. OMDb key (optional, for IMDB/RT/Metacritic enrichment) at \u003chttps://www.omdbapi.com/apikey.aspx\u003e.\n\n## Quick start\n\n```bash\nmvd discover --year 2024 --min-rating 7 --top 10\nmvd search \"fight club\"\nmvd add 550                          # add Fight Club (TMDB id) to watchlist\nmvd add \"fight club\" --no-prompt     # agent-friendly: top match, no interactive disambiguation\nmvd list --sort rating\nmvd watched mark 550 --rating 9\nmvd watched list\nmvd unwatch 550                      # back to watchlist, preserves history\n```\n\n## Commands\n\n| Command | What it does |\n|---|---|\n| `mvd init` | Save TMDB + OMDb API keys |\n| `mvd discover` | Filter by year, genre, rating, votes |\n| `mvd search \u003cquery\u003e` | Search by title |\n| `mvd info \u003cid\u003e` | Full details for one TMDB id |\n| `mvd add \u003cid\\|title\u003e` | Add to watchlist |\n| `mvd remove \u003cid\u003e` | Remove from watchlist |\n| `mvd list` | Show watchlist |\n| `mvd watched list` | Show watched movies |\n| `mvd watched mark \u003cid\u003e` | Mark as watched |\n| `mvd unwatch \u003cid\u003e` | Move from watched back to watchlist |\n| `mvd export` | Dump full state (JSON or SQL) |\n| `mvd import \u003cfile\u003e` | Restore from export (merge or --replace) |\n\nEvery command supports `--help`.\n\n### Global flags\n\n- `--format \u003cfmt\u003e` — `json` \\| `yaml` \\| `table` \\| `auto` (default). `auto` = yaml when piped, table in TTY.\n\n### `discover` options\n\n```\n--year \u003cint\u003e            Primary release year\n--genre \u003cname\u003e          Genre name(s). Comma = AND, pipe = OR. Examples:\n                        --genre Action          (single)\n                        --genre \"Action,Drama\"  (both)\n                        --genre \"Action|Comedy\" (either) — quote to avoid shell pipe\n--min-rating \u003cfloat\u003e    TMDB vote average ≥ (default 0)\n--min-votes \u003cint\u003e       TMDB vote count ≥ (default 300)\n--top \u003cint\u003e             Limit results (default 10)\n--sort \u003cfield\u003e          tmdb | imdb | popularity | release | title (default tmdb)\n--enrich                Fetch OMDb (IMDB/RT/Metacritic) per result\n```\n\n`--sort imdb` and `--enrich` use OMDb (free tier: 1000/day). Each enriched result = 2 API calls (TMDB details + OMDb lookup). Cap `--top` accordingly.\n\n### `add \u003cid-or-title\u003e` options\n\n```\n--id                    Force numeric arg as TMDB id (use for movies titled \"1984\", \"300\", etc.)\n--no-prompt             Auto-pick top result on multi-match (agent mode)\n```\n\nNumeric heuristic: bare digits \u003e 999 treated as TMDB id. Use `--id` to override for low-id or numeric titles.\n\n## Config\n\nState lives in `~/.mvd/`:\n\n- `config.json` — defaults (min_votes, top, sort, min_rating)\n- `.env` — API keys (`TMDB_API_KEY`, `OMDB_API_KEY`)\n- `movies.db` — SQLite cache + watchlist + watched + history\n\nOverride config dir with `MVD_HOME=/path/to/dir`.\n\nEnv vars override `.env` file: `TMDB_API_KEY`, `OMDB_API_KEY`.\n\n## Exit codes\n\n| Code | Meaning |\n|---|---|\n| 0 | Success |\n| 1 | User error (bad args, no match, validation fail) |\n| 2 | API error (TMDB/OMDb HTTP failure) |\n| 3 | Config / setup error (missing key, no init) |\n\n## For AI agents\n\n`mvd` is built for programmatic use. See [AGENTS.md](AGENTS.md). Key points:\n\n- `--format auto` emits YAML when piped, JSON parses cleanly via `--format json`\n- All commands deterministic — same input, same output\n- No spinners, no progress bars, no TTY tricks in piped output\n- `mvd add --no-prompt` for headless disambiguation\n- Re-adding same id is a no-op\n\n## Sync across devices\n\n`mvd` is local-only by design — no cloud account, no telemetry. To sync state across machines, export + ship the snapshot anywhere you want:\n\n```bash\nmvd export --out ~/mvd-snap.json          # dump full state\nmvd import ~/mvd-snap.json                # merge into local db (idempotent)\nmvd import ~/mvd-snap.json --replace      # wipe local + restore from file\n```\n\n### Pattern 1: Syncthing / Dropbox / iCloud (zero-infra)\n\nPut the export in a synced folder. Run on a timer:\n\n```bash\n# crontab -e\n*/30 * * * * /usr/local/bin/mvd export --out ~/Dropbox/mvd/snap.json\n@reboot       /usr/local/bin/mvd import  ~/Dropbox/mvd/snap.json\n```\n\n### Pattern 2: Git (versioned, free)\n\n```bash\ncd ~/mvd-sync \u0026\u0026 git init\nmvd export --out ./snap.json\ngit add snap.json \u0026\u0026 git commit -m \"snap $(date -I)\" \u0026\u0026 git push\n```\n\nJSON diffs cleanly. Use `git log -p snap.json` to see when you added each movie.\n\n### Pattern 3: Litestream (continuous, advanced)\n\nStream the SQLite WAL to S3/B2/SFTP. No code changes:\n\n```bash\nlitestream replicate ~/.mvd/movies.db s3://my-bucket/mvd.db\n# on restore:\nlitestream restore -o ~/.mvd/movies.db s3://my-bucket/mvd.db\n```\n\nSee [litestream.io](https://litestream.io).\n\n### Merge semantics\n\n`mvd import \u003cfile\u003e` (default = merge):\n\n- **movies**: upsert by `tmdb_id` (newest wins, COALESCE preserves enriched fields)\n- **watchlist**: idempotent (re-add same id = no-op)\n- **watched**: upsert by `tmdb_id` (latest record replaces previous)\n- **watched_history**: dedupe by `(tmdb_id, watched_date, archived_at)` triple\n- **genres_cache**: replaced wholesale (newest export wins)\n\nNo multi-writer conflict resolution. If two devices edit between syncs, last-export-wins on the conflicting row. For true multi-master, use [Turso/libsql](https://turso.tech) (vendor) or [PouchDB-style CRDTs](https://pouchdb.com) (heavy).\n\n## Database schema\n\nSee [SCHEMA.md](SCHEMA.md).\n\n## Contributing\n\n```bash\ngit clone https://github.com/ibbybuilds/mvd\ncd mvd\nnpm install\nnpm run build\nnpm test\nnpm link    # makes `mvd` available globally\n```\n\nConventional Commits. Strict TypeScript, no `any` without reason.\n\n## License\n\nMIT © ibbybuilds\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibbybuilds%2Fmvd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibbybuilds%2Fmvd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibbybuilds%2Fmvd/lists"}