pixiv-cli

作者 FlanChanXwO已验证

Pixiv, in your terminal — a CLI, MCP server, and Go SDK for discovery, accounts, creators, collections, and downloads.

108
Stars
3
Forks
Go
语言
2026/8/24
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/FlanChanXwO/pixiv-cli

快速入门

使用 pixiv-cli 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

pixiv-cli

Pixiv CLI · MCP stdio server · Go SDK

English · 简体中文

Quality gate Release Go License Views

Install · Quick start · Interfaces · Documentation · Contributing

pixiv-cli brings the Pixiv ecosystem to the terminal: discover works and creators, manage accounts and collections, follow artists, bookmark artworks, and download visual works. It is an independent, unofficial third-party CLI, MCP server, and public Go SDK; it is not affiliated with or endorsed by Pixiv Inc. The CLI and MCP server both call the same public Go SDK, with the Pixiv App API as the authenticated source of truth. Use it in accordance with Pixiv's terms and applicable law.

Why pixiv-cli?

  • One capability surface — search, details, rankings, recommendations, users, bookmarks, follows, downloads, and ugoira across CLI, MCP, and SDK.
  • Read-only FANBOX access — authenticate with FANBOXSESSID, inspect creators, posts, home/supporting feeds, tags, and first-party file resources through the CLI, MCP, or sdk/fanbox.
  • Composable visual pipelines — visual lists automatically emit canonical NDJSON when piped; use --filter for typed local artwork rules and pass matching records straight to download.
  • Local account pools — enable database-backed scheduling for read workloads with pixiv auth pool status|enable|disable; selection honors Pixiv Retry-After responses without exposing credentials.
  • Guided account sign-in — complete browser OAuth with pixiv auth login, then use auth list, auth use, and auth check to manage local multi-account access.
  • Four ugoira output modes — choose GIF, APNG, lossless ZIP, or extracted frames.
  • Reliable, organized downloads — revalidate .pixiv-cache metadata, resume verified partials, retry eligible resource failures, optionally archive completed artwork IDs, write sidecars, and show exact terminal progress when available.
  • Authenticated App API discovery — read R18 details, pages, ugoira metadata, and all 16 ranking modes through the App API.
  • Useful search filters — rating, content type, AI mode, aspect ratio, resolution, and a versioned drawing-tool catalog.
  • Direct Pixiv references — paste supported artwork URLs into detail or download; authenticated profile and artworks URLs expand to that creator's visual works.
  • Local multi-account OAuth — browser login, account selection, refresh-token rotation, and an optional cross-machine callback relay.
  • Automation-ready integration — typed SDK errors, JSON output, clean MCP stdio, signed release updates, and complete result reporting.

Install

Installer scripts (Windows, Linux, and macOS)

Linux/macOS (sh):

curl -fsSLo /tmp/pixiv-install.sh https://github.com/FlanChanXwO/pixiv-cli/releases/latest/download/install.sh && sh /tmp/pixiv-install.sh --add-to-path

Windows Command Prompt (cmd.exe, no PowerShell):

curl.exe -fsSLo "%TEMP%\pixiv-install.cmd" https://raw.githubusercontent.com/FlanChanXwO/pixiv-cli/main/scripts/install.cmd && call "%TEMP%\pixiv-install.cmd" --add-to-path

Both scripts detect AMD64/ARM64, select the latest stable official Release archive, verify its published SHA-256, preflight the staged binary, and install per-user before changing PATH. Use --no-path to leave PATH untouched or --install-dir DIR to choose another destination. You can inspect the downloaded script before running it.

Versioned installers keep checksums.txt on the official GitHub HTTPS path. Embedded free source candidates are probed only for the platform archive, must return the same checksum content, and the downloaded archive still has to pass SHA-256 verification. This changes transport availability, never Release identity or integrity.

Install with an AI agent

Copy this single prompt into Codex, Claude Code, Cursor, or another local AI agent with terminal access:

Install the latest stable pixiv-cli from https://github.com/FlanChanXwO/pixiv-cli for this machine: inspect the repository's scripts/install.sh or scripts/install.cmd first, choose the script matching the detected OS and architecture (the Windows path must use cmd.exe and must not invoke PowerShell), download only official GitHub Release assets, require the published SHA-256 check to pass before replacing anything, install per-user without administrator or root privileges, add only the chosen install directory to the user PATH, ask before installing any missing prerequisite, never read or output Pixiv credentials, verify with pixiv --version, and report the installed version plus every file and PATH change.

Also install the `pixiv-cli` Skill that matches the same stable release tag (not main): download the full skills/pixiv-cli/ directory from that tag into the agent skills directory the user confirms. Do not guess the skills path and do not follow the main branch for skill content.

Install the pixiv-cli Skill from SkillHub

Agents with SkillHub support can install the published pixiv-cli Skill directly from SkillHub. Each Skill version matches the CLI release it teaches; always use pixiv <cmd> --help as the final source of command syntax.

Install the pixiv-cli Skill from ClawHub

Agents using ClawHub can install the published pixiv-cli Skill with clawhub install pixiv-cli; pin the installed skill to the matching published release version rather than following an unversioned latest tag.

Homebrew (recommended on macOS and Linux)

brew install FlanChanXwO/tap/pixiv-cli

Upgrade later with:

brew update
brew upgrade pixiv-cli

Go

Use an exact published tag. A source install requires Go, cgo, a C linker, and the committed Rust static library for your target.

go install github.com/FlanChanXwO/pixiv-cli/cmd/pixiv@vX.Y.Z

Release archive or source build

Download a supported archive from GitHub Releases, or build the checkout:

sh scripts/build.sh

Direct downloads include checksums and a signed manifest. See the CLI reference for platform and trust details.

60-second quick start

# Save a Pixiv account through browser OAuth.
pixiv auth login

# Save a FANBOX session through hidden input, then inspect FANBOX content.
pixiv fanbox auth import
pixiv fanbox post 123456

# Search with App-side filters.
pixiv search "初音ミク" --type illust --ai-mode exclude --resolution high
pixiv novel search "初音ミク" --rating sfw --min-text-length 1000

# Follow creators and build your collection.
pixiv follow add 12345678
pixiv bookmark add 123456

# Inspect, discover recommendations, and download.
pixiv detail https://www.pixiv.net/artworks/123456
pixiv recommended all --limit 10
pixiv timeline latest --type illust --limit 20
pixiv download https://www.pixiv.net/artworks/123456 --pages 1,3-5 --quality regular
pixiv download 123456 https://i.pximg.net/img-original/example.jpg --concurrency 8

# Batch-download every visual work from a creator.
pixiv download https://www.pixiv.net/users/12345678/artworks

Run pixiv --help or open the complete CLI reference for every command, flag, configuration key, environment variable, fallback rule, and update behavior.

Choose your interface

CLI

Use the default text output interactively and --json where the command supports machine output:

pixiv ranking --mode day --json
pixiv user search "miku" --limit 10 --json
pixiv user detail 12345678
pixiv timeline latest --type illust --limit 10 --json

MCP

Start the stdio server explicitly. stdout remains reserved for JSON-RPC; tool failures are returned as structured results with isError=true. No project-level or daily log files are created by default.

pixiv mcp
# FANBOX tools use their own runtime credential selection.
pixiv fanbox mcp

See the MCP tool contract for tools, parameters, structured output, and authentication behavior. Fixed MCP status, error, and display text is English; Pixiv metadata and user-supplied text are preserved verbatim.

Go SDK

The public SDK receives credentials explicitly and does not read the CLI's local account store or process environment. Obtain the credential from your application's secret store and persist the rotated credentials returned by Open:

package main

import (
	"context"
	"fmt"
	"log"

	pixiv "github.com/FlanChanXwO/pixiv-cli/sdk/pixiv"
)

func main() {
	ctx := context.Background()
	refreshToken := "replace-with-a-refresh-token-from-your-secret-store"
	client, _, err := pixiv.Open(ctx, refreshToken)
	if err != nil {
		log.Fatal(err)
	}

	result, err := client.SearchArtworks(ctx, pixiv.SearchArtworksRequest{Word: "初音ミク"})
	if err != nil {
		log.Fatal(err)
	}
	for _, artwork := range result.Items {
		fmt.Printf("%d %s\\n", artwork.ID, artwork.URL)
	}
}

The import path is github.com/FlanChanXwO/pixiv-cli/sdk/pixiv. sdk/fanbox accepts a FANBOXSESSID explicitly and supports native Chrome 146 TLS routing with the built-in Firefox 148 HTTP User-Agent baseline, with optional service-scoped proxy, user-agent, and challenge-only FlareSolverr options. Download/DownloadAll use documented beginner defaults; DownloadWith/DownloadAllWith expose paths, naming, pages, quality, and concurrency. The SDK guide documents models, cursors, resources, errors, caller responsibilities, and the explicit DTO boundary used by CLI/MCP JSON output; media resources cross those boundaries only as opaque references.

Authentication and token safety

pixiv auth login is the recommended setup. It saves raw Pixiv App OAuth refresh tokens by UID in the local account store.

Account information disclaimer

Account names, IDs, membership signals, and the active local-account selection are convenience information from the local store and Pixiv responses. Treat them as convenience data rather than proof of account ownership, entitlement, or current Pixiv status. Verify important account details in Pixiv and use only accounts you are authorized to manage.

On macOS, Windows, and desktop Linux, pixiv prepares the current-user pixiv:// callback handler for the installed binary. When a server has login_relay_public_url and login_relay_listen_addr, pixiv auth login prints a one-time remote hand-off URL. Opening it transfers the session directly to the installed desktop handler, which starts OAuth and returns its callback to the server. Remote login therefore uses a desktop with pixiv-cli installed; it has no project confirmation page or callback-copy form. See the CLI reference.

pixiv auth list
pixiv auth pool status
pixiv auth use 12345678
pixiv auth check

Documentation

GuideUse it for
CLI referenceCommands, flags, auth, configuration, fallback, downloads, and updates
Go SDKPublic client, models, pagination, resources, and typed errors
MCP toolsTool schemas and output semantics
ArchitecturePackage boundaries and runtime flow
DevelopmentToolchain, tests, builds, and releases
ChangelogUser-visible changes

Contributing

Bug reports, documentation fixes, tests, and focused features are welcome. Read CONTRIBUTING.md before opening a pull request; discuss large or public-interface changes first.

License

MIT © FlanChanXwO

常见问题

What is pixiv-cli?

pixiv-cli is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by FlanChanXwO. Pixiv, in your terminal — a CLI, MCP server, and Go SDK for discovery, accounts, creators, collections, and downloads. It has 108 GitHub stars.

Is pixiv-cli safe to use?

Yes. pixiv-cli passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install pixiv-cli?

Clone the repository with "git clone https://github.com/FlanChanXwO/pixiv-cli" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is pixiv-cli written in?

pixiv-cli is primarily written in Go. It is open-source under FlanChanXwO on GitHub, so you can review or fork the full source.

Are there alternatives to pixiv-cli?

Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh pixiv-cli against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

Scrapling

by D4Vinci

🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!

75,9137,581Python
MCP 服务器
查看详情

TrendRadar

by sansan0

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。

61,65224,883Python
MCP 服务器
查看详情

context7

by upstash

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

61,0602,938TypeScript
MCP 服务器
查看详情

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

39,9393,219C
MCP 服务器
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情