Skip to content

Features & Commands ​

Language: 中文 · English

Use pixivflow download --url for a link, or pixivflow download to collect works with configured filters. The modes and commands are listed below; see the configuration reference for fields.

Choose a download method ​

ModeUsageOne-liner
URL directdownload --url <link>Paste and download; work type auto-detected
Tag searchtargets config mode: "search" (default)Batch collection by tag + filters
Rankingtargets config mode: "ranking"Pull from daily/weekly/monthly rankings, then filter
Topic discoverytargets config mode: "topic" and topicDerive related tags from a topic, then filter works
Randomrandom command or target random: trueRandomly pick from results
Single workURL / illustId / novelIdPrecisely download one illustration or one novel
Whole userUser profile URL / userIdCollect all illustrations or novels of a user

URL direct download ​

--url uses the linked target for this run and leaves the configured targets unchanged. Replace this example with a real link:

bash
pixivflow download --url "https://www.pixiv.net/artworks/123456789"

All 10 address shapes are supported:

FormatExample
Illustration page (standard)https://www.pixiv.net/artworks/{id}
With language prefixhttps://www.pixiv.net/en/artworks/{id}
Short linkhttps://www.pixiv.net/i/{id}
Legacy illustration pagehttps://www.pixiv.net/member_illust.php?illust_id={id}
Novelhttps://www.pixiv.net/novel/show.php?id={id}
Novel serieshttps://www.pixiv.net/novel/series/{id}
User profilehttps://www.pixiv.net/users/{id}
User's illustrationhttps://www.pixiv.net/users/{uid}/artworks/{id}
User's novelhttps://www.pixiv.net/users/{uid}/novels/{id}
Bare ID123456789 (treated as illustration)

You can also express a target ad hoc as JSON without writing it into the config file:

bash
pixivflow download --targets '[{"type":"novel","tag":"アークナイツ","limit":5}]'

Novel export (Markdown / EPUB / PDF) ​

Add --formats to a download to produce local exports alongside the TXT; --merge-series binds a whole novel series into one book in Pixiv chapter order:

bash
pixivflow download --url "https://www.pixiv.net/novel/show.php?id=26132156" --formats md
pixivflow download --url "https://www.pixiv.net/novel/show.php?id=26132156" --formats md,epub,pdf
pixivflow download --url "https://www.pixiv.net/novel/series/12345678" --formats md --merge-series

Already-downloaded novels can be re-exported offline without re-fetching the body or logging in again:

bash
pixivflow novel-export --input "downloads/novels/26132156_Title.txt.novel.json" --formats md
pixivflow novel-export --input "downloads/novels/series-12345678.series.json" --formats md --merge-series
  • Markdown (md) is the reader-facing export: it writes <novel file name>.novel.md next to the TXT and references the sibling images/ directory for inline illustrations — copy the .novel.md plus images/ pair anywhere (another machine included) and it reads offline. Pure-text novels export too; no illustration required.
    • [chapter:] becomes a heading, [newpage] a page separator, [[jumpuri:]] a link, [[rb:]] a ruby annotation with plain-text fallback, and [jump:n] an in-page anchor jump; Markdown metacharacters are escaped. Unconvertible markers and missing resources stay as literal text with a warning in the result — the body is never dropped.
    • It is a different file with different semantics from the rich-media sidecar (<novel file name>.md, consumed by TelePress for online reading); the sidecar and TelePress behavior are unchanged, and the Markdown export is never attached to a Telegram delivery.
    • Series: without --merge-series each chapter exports individually; with it you additionally get a series-<id>.novel.md omnibus (with a table of contents and chapter anchors that stay unique even for duplicate chapter titles).
  • Chapters, [newpage] pagination, ruby annotations, inline illustrations, the cover and metadata are all preserved; the EPUB is fully offline with images packed from local bytes and no Pixiv CDN access.
  • The TXT is always retained with an unchanged path; export failures only log a warning and never affect the download result or the delivery queue.
  • PDF depends on an optional Chrome/Chromium that is never auto-installed: --browser <chrome path> (or the PIXIVFLOW_PDF_BROWSER environment variable); on servers/Docker without CJK fonts, embed one via --font <font file>. Without a browser, PDF reports PDF_BROWSER_MISSING explicitly while everything else keeps working.
  • The corresponding target field in the config file is novelExport; see the "Novel export" section in CONFIG for semantics and limits.

Tag search mode ​

The default mode. Only four core fields:

json
{
  "type": "illustration",
  "tag": "風景",
  "limit": 20,
  "minBookmarks": 500
}

Advanced capabilities:

  • Multi-tag combination: "tag": "水彩 厚涂" with "tagRelation": "or" means any hit counts (default AND — all tags required);
  • Sorting: sort is one of date_desc / date_asc / popular_desc;
  • Match mode: searchTarget is one of partial_match_for_tags / exact_match_for_tags / title_and_caption;
  • Date window: startDate / endDate, supporting the YESTERDAY and TODAY placeholders — daily scheduled runs automatically roll to "yesterday";
  • Novel language filter: languageFilter: "chinese" collects only Chinese novels, non-chinese the reverse; languageCandidateLimit controls how many candidates are backfilled for popularity-ordered checking (default 20); strictLanguageFilter: true rejects works that cannot be judged, e.g. bodies too short;
  • Exclude AI illustrations: excludeAI: true excludes works explicitly marked by Pixiv as AI-generated (illust_ai_type=2) before the popularity Top-N selection.

Ranking mode ​

With mode: "ranking" and no filterTag, the Pixiv ranking is pulled directly; with filterTag set, works of that tag published on rankingDate are fetched and sorted locally by popularity:

json
{
  "type": "illustration",
  "mode": "ranking",
  "rankingMode": "day",
  "rankingDate": "YESTERDAY",
  "filterTag": "風景",
  "limit": 10
}

rankingMode supports day / week / month / day_male / day_female / day_ai / week_original / week_rookie and the corresponding R18 rankings; full values in CONFIG · targets.

Dedup & resume ​

Download records are stored in SQLite. Use pixivflow dirs to find the actual database location:

  • Works with an existing record are skipped — repeated runs are safe;
  • When the file exists but the record is missing, reconciliation back-fills it — deleting the database does not destroy files;
  • After an interruption, rerunning skips completed works and continues with unfinished ones.

Use normalize to tidy existing files: it puts files back in place per the current directory organization rules.

Scheduled tasks ​

Set scheduler.enabled: true and check the cron expression and time zone before running:

bash
pixivflow config validate
pixivflow scheduler

Keep the process running and the computer on. Common settings:

  • Cron defaults to 0 3 * * *, timezone Asia/Shanghai;
  • maxExecutions caps total executions; minInterval prevents overly dense triggering;
  • A single task can set a timeout; maxConsecutiveFailures stops after the threshold, and failureRetryDelay controls the retry interval after failures;
  • Running bare pixivflow with no subcommand: if scheduler.enabled is true in config, it is equivalent to starting the scheduler; otherwise it runs one download.

For long-running servers, hand it to Docker Compose.

WebUI ​

bash
pixivflow web     # listens on port 3000; open http://localhost:3000 in a browser

The interface includes download statistics, URL downloads, task management, file previews, history, logs and configuration editing. For REST and WebSocket details, see API. The frontend source is in pixivflow-webui. In Docker, enable the pixivflow-webui service in Compose.

For the interactive component map and the realtime pipeline description, see the frontend repository's development guide and component guide.

Full command cheat sheet ​

Grouped by the categories of pixivflow help (commands evolve with releases — the full list follows pixivflow help output):

Authentication ​

CommandDescription
login [-u -p]Interactive login (browser authorization; account params also accepted)
login-headless -u -pLogin for headless environments; --password-stdin passes the password via stdin
refresh <token>Inject an existing refresh token (aliases login-token / set-token); pass - to read from stdin

Download ​

CommandDescription
download [--url | --targets | --config]Run one download (alias d)
novel-export --input <file>Re-export a downloaded novel/series offline to Markdown/EPUB/PDF without re-fetching
randomRandomly download one from popular tags
schedulerStart the resident scheduled-task process

Configuration ​

CommandDescription
configView / edit / backup / restore config
setupInteractive setup wizard, recommended for first use
migrate-configMigrate legacy config paths (absolute to relative)

Monitoring & status ​

CommandDescription
statusDownload stats and recent records
healthHealth check: config, directory writability, connectivity
logsView recent logs
monitorRealtime monitoring of process state and performance metrics

Maintenance ​

CommandDescription
backupAuto-backup config and data
maintainAuto-maintenance: clean logs, optimize database, etc.
normalizeNormalize the directory structure of downloaded files
dirsShow the actual save locations of each file kind

Utility ​

CommandDescription
help [command]General help or per-command help
versionShow the version number
webStart the WebUI server

Scheduler & delivery plane ​

CommandDescription
run-onceRun all enabled schedules once immediately, then exit
execute-slotExecute one canonical occurrence once (batch/CI execution plane)
runsList scheduler runs and show one execution summary
outboxList / inspect / retry / cancel durable delivery intents
gatewayList configured messaging gateways, their delivery state and reachability
deliveryInspect delivery status, preview retries or retry unfinished deliveries
tagsDiscover related Pixiv tags, then explicitly apply selected tags
topicResolve a semantic topic into related tags (resolve) or dry-run a day selection (test)

Diagnostics & reconciliation ​

CommandDescription
doctorDiagnose and (with --repair) converge slots, deliveries and outbox
diagnoseMinimal Pixiv data-plane egress probe (usage: diagnose egress)
reconcileReconcile a downstream-confirmed historical duplicate (dry-run unless --repair)

  • CONFIG — detailed semantics of every target field
  • API — WebUI backend interface reference
  • DOCKER — run the scheduler and WebUI long-term on a server
  • SCRIPTS (Chinese) — helper scripts in scripts/