{"id":50840994,"url":"https://github.com/moontaiworks/fanbox-dl","last_synced_at":"2026-06-14T06:34:51.024Z","repository":{"id":362449528,"uuid":"1257778333","full_name":"moontaiworks/fanbox-dl","owner":"moontaiworks","description":"a pixivFANBOX downloader and sdk","archived":false,"fork":false,"pushed_at":"2026-06-04T08:51:14.000Z","size":698,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-04T09:22:22.034Z","etag":null,"topics":["ai-generated","downloader","pixiv","pixivfanbox"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@moontaiworks/fanbox-dl","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/moontaiworks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":null,"dco":null,"cla":null}},"created_at":"2026-06-03T02:10:03.000Z","updated_at":"2026-06-04T08:49:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/moontaiworks/fanbox-dl","commit_stats":null,"previous_names":["moontaiworks/fanbox-dl"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/moontaiworks/fanbox-dl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontaiworks%2Ffanbox-dl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontaiworks%2Ffanbox-dl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontaiworks%2Ffanbox-dl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontaiworks%2Ffanbox-dl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moontaiworks","download_url":"https://codeload.github.com/moontaiworks/fanbox-dl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontaiworks%2Ffanbox-dl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34312072,"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-14T02:00:07.365Z","response_time":62,"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":["ai-generated","downloader","pixiv","pixivfanbox"],"created_at":"2026-06-14T06:34:50.327Z","updated_at":"2026-06-14T06:34:51.018Z","avatar_url":"https://github.com/moontaiworks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @moontaiworks/fanbox-dl\n\nA cli downloader or a read-only TypeScript SDK for building pixivFANBOX applications.\n\n[![NPM Version](https://img.shields.io/npm/v/@moontaiworks/fanbox-dl)](https://www.npmjs.com/package/@moontaiworks/fanbox-dl)\n[![NPM Downloads](https://img.shields.io/npm/d18m/@moontaiworks/fanbox-dl)](https://www.npmjs.com/package/@moontaiworks/fanbox-dl)\n[![Documentation](https://github.com/moontaiworks/fanbox-dl/actions/workflows/docs.yml/badge.svg)](https://github.com/moontaiworks/fanbox-dl/actions/workflows/docs.yml)\n[![codecov](https://codecov.io/gh/moontaiworks/fanbox-dl/branch/main/graph/badge.svg)](https://codecov.io/gh/moontaiworks/fanbox-dl)\n\n## CLI Downloader\n\nRun the downloader through your package manager, or install it globally:\n\n```bash\nnpx @moontaiworks/fanbox-dl download --creator creator-id\n```\n\n```bash\nnpm install -g @moontaiworks/fanbox-dl\nfanbox-dl download --creator creator-id\n```\n\nAuthenticated downloads read `FANBOX_SESSION_ID` by default:\n\n```bash\nFANBOX_SESSION_ID=your-session-id npx @moontaiworks/fanbox-dl download \\\n  --supporting \\\n  --output ./fanbox-downloads\n```\n\nYou can also pass a cookie file exported from your logged-in browser session:\n\n```bash\nnpx @moontaiworks/fanbox-dl download \\\n  --creator creator-id \\\n  --cookie-file ./cookies.txt\n```\n\nPreview the selected creators and posts without downloading:\n\n```bash\nnpx @moontaiworks/fanbox-dl download --creator creator-id --dry-run\n```\n\nAt least one creator selector is required: `--creator`, `--following`, or\n`--supporting`.\n\n### CLI Options\n\n| Option                      | Description                                                                                            | Example                          | Default             |\n| --------------------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------- | ------------------- |\n| `--creator \u003cid\u003e`            | Add a creator ID to download. Can be repeated.                                                         | `--creator alpha --creator beta` | None                |\n| `--following`               | Download posts from followed creators. Requires authentication.                                        | `--following`                    | `false`             |\n| `--supporting`              | Download posts from supporting creators. Requires authentication.                                      | `--supporting`                   | `false`             |\n| `--ignore-creator \u003cid\u003e`     | Exclude a creator ID from the selected creators. Can be repeated.                                      | `--ignore-creator beta`          | None                |\n| `--cookie \u003cvalue\u003e`          | Raw `FANBOXSESSID`, `FANBOXSESSID=...`, or a full Cookie header.                                       | `--cookie \"FANBOXSESSID=...\"`    | `FANBOX_SESSION_ID` |\n| `--cookie-file \u003cpath\u003e`      | Read a raw cookie value or Netscape `cookies.txt`. FANBOX cookies are selected automatically.          | `--cookie-file ./cookies.txt`    | None                |\n| `--user-agent \u003cvalue\u003e`      | Send the same User-Agent as the browser session that produced your cookie.                             | `--user-agent \"Mozilla/5.0 ...\"` | random string       |\n| `--output \u003cpath\u003e`           | Directory where downloaded creators and posts are stored.                                              | `--output ./fanbox-downloads`    | `fanbox-downloads`  |\n| `--dry-run`                 | List selected creators and discovered post summaries without writing files or requesting post details. | `--dry-run`                      | `false`             |\n| `--flat-posts`              | Store post files directly under each creator directory instead of one directory per post.              | `--flat-posts`                   | `false`             |\n| `--verify-assets`           | Verify existing asset size and SHA-256 before deciding whether to skip a file.                         | `--verify-assets`                | `false`             |\n| `--concurrency \u003cn\u003e`         | Maximum number of concurrent requests. Must be greater than `0`.                                       | `--concurrency 3`                | `3`                 |\n| `--request-interval-ms \u003cn\u003e` | Delay between request starts, in milliseconds.                                                         | `--request-interval-ms 1000`     | `0`                 |\n| `--rate-limit-pause-ms \u003cn\u003e` | Pause duration after HTTP 429 when FANBOX does not send `Retry-After`.                                 | `--rate-limit-pause-ms 60000`    | `60000`             |\n| `--max-retries \u003cn\u003e`         | Retry attempts for retryable request failures.                                                         | `--max-retries 5`                | `5`                 |\n| `--log-format json\\|pretty` | Choose JSON Lines logs or human-readable logs.                                                         | `--log-format pretty`            | `json`              |\n| `--log-level \u003clevel\u003e`       | Show logs at this level or higher. One of `debug`, `info`, `warn`, or `error`.                         | `--log-level debug`              | `info`              |\n| `--help`                    | Show CLI help.                                                                                         | `--help`                         | None                |\n\n### CLI Notes\n\nThe downloader stores each post as `metadata.json`, `content.md`, and asset\nfiles in a per-post directory. Asset file names include a two-digit sequence\nnumber, so files are easy to browse in order.\n\nIt keeps a per-creator `manifest.json`, skips unchanged posts, resumes `.part`\nfiles with HTTP Range requests when supported, and can verify existing SHA-256\nhashes with `--verify-assets`.\n\nPassing `--cookie` is convenient but may leave the session value in shell\nhistory. `--cookie-file` accepts either a raw cookie value or a Netscape\n`cookies.txt` export from your own logged-in browser session. When using\n`cookies.txt`, FANBOX cookies such as `FANBOXSESSID` and `cf_clearance` are\nselected automatically.\n\nRun `fanbox-dl --help` for the full CLI option list.\n\n## SDK\n\n### Installation\n\n```bash\nnpm install @moontaiworks/fanbox-dl\n```\n\n### Usage\n\nFANBOX uses the `FANBOXSESSID` cookie for authenticated requests. Obtain it from\nyour own browser session and keep it outside source control.\n\n```typescript\nimport { FanboxClient } from \"@moontaiworks/fanbox-dl\";\n\nconst fanbox = new FanboxClient({\n  cookie: `FANBOXSESSID=${process.env.FANBOX_SESSION_ID}`,\n});\n\nconst creators = await fanbox.listFollowingCreators();\nconst supportingPlans = await fanbox.listSupportingPlans();\n\nconst pageUrls = await fanbox.paginateCreatorPosts({\n  creatorId: creators[0].creatorId,\n  sort: \"newest\",\n});\n\nconst posts = await fanbox.listCreatorPosts({\n  creatorId: supportingPlans[0].creatorId,\n  limit: 10,\n  sort: \"newest\",\n});\n\nconst post = await fanbox.getPost({ postId: posts[0].id });\n```\n\nThe SDK also provides `listHomePosts()` and `listSupportingPosts()` for\nauthenticated timelines. It intentionally exposes read-only endpoints: it does\nnot follow creators, like posts, or create comments.\n\n### Documentation\n\nAPI documentation is automatically generated using [TypeDoc](https://typedoc.org/) and published to GitHub Pages.\n\n- **View the latest documentation**: [GitHub Pages](https://moontaiworks.github.io/fanbox-dl/)\n\n## Testing\n\nTests inject a local HTTP transport and do not require a real FANBOX session.\n\nRun:\n\n```bash\npnpm test\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoontaiworks%2Ffanbox-dl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoontaiworks%2Ffanbox-dl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoontaiworks%2Ffanbox-dl/lists"}