{"_id":"@dawnswwwww/zhihu-cli","_rev":"6-c3423e6058e9643373388d6f968a69ad","name":"@dawnswwwww/zhihu-cli","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.1":{"name":"@dawnswwwww/zhihu-cli","version":"0.1.1","license":"MIT","_id":"@dawnswwwww/zhihu-cli@0.1.1","maintainers":[{"name":"dawnswwwww","email":"wxn_em@163.com"}],"homepage":"https://github.com/dawnswwwww/zhihu-cli#readme","bugs":{"url":"https://github.com/dawnswwwww/zhihu-cli/issues"},"os":["darwin","linux","win32"],"bin":{"zhihu":"bin/zhihu.js"},"cpu":["x64","arm64"],"dist":{"shasum":"5bfb072edf33e06d46b4ab7a30eec27c3bd4e45a","tarball":"https://registry.npmjs.org/@dawnswwwww/zhihu-cli/-/zhihu-cli-0.1.1.tgz","fileCount":3,"integrity":"sha512-YwM5vw+DsMQH7KK2qmgxsQ8OkiVfAAqEc9InBAZViw5UcBfjxp8XQVPhA+hIiRFhZ97H4HTfKZxrFsl+Wapl9Q==","signatures":[{"sig":"MEQCIBA8oKXg8Szh6E+ZNj5yPpij/f1ZMv8ro8XNvqH6ukfqAiAkxhfkVeQhhk3wag2ykwRIEdNAJAS1Brp1evOcVnp1gg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3701},"gitHead":"23d223ccebda2f05f3d6f55eef9e4ea84f8fc355","_npmUser":{"name":"dawnswwwww","email":"wxn_em@163.com"},"repository":{"url":"git+https://github.com/dawnswwwww/zhihu-cli.git","type":"git"},"_npmVersion":"10.8.2","description":"CLI for the Zhihu Open Platform API","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"optionalDependencies":{"@dawnswwwww/zhihu-cli-linux-x64":"0.1.1","@dawnswwwww/zhihu-cli-win32-x64":"0.1.1","@dawnswwwww/zhihu-cli-darwin-x64":"0.1.1","@dawnswwwww/zhihu-cli-linux-arm64":"0.1.1","@dawnswwwww/zhihu-cli-darwin-arm64":"0.1.1"},"_npmOperationalInternal":{"tmp":"tmp/zhihu-cli_0.1.1_1782705603235_0.5103811652864807","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@dawnswwwww/zhihu-cli","version":"0.1.2","license":"MIT","_id":"@dawnswwwww/zhihu-cli@0.1.2","maintainers":[{"name":"dawnswwwww","email":"wxn_em@163.com"}],"homepage":"https://github.com/dawnswwwww/zhihu-cli#readme","bugs":{"url":"https://github.com/dawnswwwww/zhihu-cli/issues"},"os":["darwin","linux","win32"],"bin":{"zhihu":"bin/zhihu.js"},"cpu":["x64","arm64"],"dist":{"shasum":"86b9ef1cfc032f02b7c66cffac40ba09aad69fd7","tarball":"https://registry.npmjs.org/@dawnswwwww/zhihu-cli/-/zhihu-cli-0.1.2.tgz","fileCount":3,"integrity":"sha512-Ixp2EnLprTx+evR93j1FhVavTiBJ7X4lLk0tjsHBhgIIVnKWGDMwvJqUJvehEK/65j862aYIgRwZrL/Y63dYKw==","signatures":[{"sig":"MEUCIQDzC8P0WlX6v/IUfSX6yf2lA6c8ZJn1YloOlJ0M8ei+WQIgY1qHp37qwA7d4Ha/LbLTCX4pmWLVRoM/9MsbV+Adn+I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3701},"gitHead":"c3d12ea2552009194487f4e035a9cc2f97881955","_npmUser":{"name":"dawnswwwww","email":"wxn_em@163.com"},"repository":{"url":"git+https://github.com/dawnswwwww/zhihu-cli.git","type":"git"},"_npmVersion":"10.8.2","description":"CLI for the Zhihu Open Platform API","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"optionalDependencies":{"@dawnswwwww/zhihu-cli-linux-x64":"0.1.2","@dawnswwwww/zhihu-cli-win32-x64":"0.1.2","@dawnswwwww/zhihu-cli-darwin-x64":"0.1.2","@dawnswwwww/zhihu-cli-linux-arm64":"0.1.2","@dawnswwwww/zhihu-cli-darwin-arm64":"0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/zhihu-cli_0.1.2_1782705843806_0.017446761740274486","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@dawnswwwww/zhihu-cli","version":"0.1.3","license":"MIT","_id":"@dawnswwwww/zhihu-cli@0.1.3","maintainers":[{"name":"dawnswwwww","email":"wxn_em@163.com"}],"homepage":"https://github.com/dawnswwwww/zhihu-cli#readme","bugs":{"url":"https://github.com/dawnswwwww/zhihu-cli/issues"},"os":["darwin","linux","win32"],"bin":{"zhihu":"bin/zhihu.js"},"cpu":["x64","arm64"],"dist":{"shasum":"10916adc8920cd8840a86363173da869a7e61c4f","tarball":"https://registry.npmjs.org/@dawnswwwww/zhihu-cli/-/zhihu-cli-0.1.3.tgz","fileCount":3,"integrity":"sha512-AqGTTqGUEBlnxlI/RZVIJ+1Usz2BdkUl0wC9SO1/tcLiXrTNEb51KvNpY4CbEtpyyG+Hb3Ly1/lYx2GFpv4MaA==","signatures":[{"sig":"MEYCIQDgGNQFtpYurOW58Kjix3DSe3AduLs5RWTcl9/Jvt0ncQIhAPAAmsYIGDBOLih/AbCtsFaDDlJyyBeiwIbKs8B6CGIu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3701},"gitHead":"ec3759b10aac9bd59358645d22dcd71bcfd45866","_npmUser":{"name":"dawnswwwww","email":"wxn_em@163.com"},"repository":{"url":"git+https://github.com/dawnswwwww/zhihu-cli.git","type":"git"},"_npmVersion":"10.8.2","description":"CLI for the Zhihu Open Platform API","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"optionalDependencies":{"@dawnswwwww/zhihu-cli-linux-x64":"0.1.3","@dawnswwwww/zhihu-cli-win32-x64":"0.1.3","@dawnswwwww/zhihu-cli-darwin-x64":"0.1.3","@dawnswwwww/zhihu-cli-linux-arm64":"0.1.3","@dawnswwwww/zhihu-cli-darwin-arm64":"0.1.3"},"_npmOperationalInternal":{"tmp":"tmp/zhihu-cli_0.1.3_1782713353321_0.1429361372396889","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@dawnswwwww/zhihu-cli","version":"0.1.4","license":"MIT","_id":"@dawnswwwww/zhihu-cli@0.1.4","maintainers":[{"name":"dawnswwwww","email":"wxn_em@163.com"}],"homepage":"https://github.com/dawnswwwww/zhihu-cli#readme","bugs":{"url":"https://github.com/dawnswwwww/zhihu-cli/issues"},"os":["darwin","linux","win32"],"bin":{"zhihu":"bin/zhihu.js"},"cpu":["x64","arm64"],"dist":{"shasum":"43d60dd330281c2ee2b7d0836940facf7f803301","tarball":"https://registry.npmjs.org/@dawnswwwww/zhihu-cli/-/zhihu-cli-0.1.4.tgz","fileCount":3,"integrity":"sha512-MTLoS0yaXK8GIc9+ZbwGqejwO9gKlOZH87Ubyw7OjBBQF/vWVbc/pyRJIMUjhttwEUTGbzPbPDLEN0v2Kabvlw==","signatures":[{"sig":"MEYCIQDbsMkwQ3hM/YIoRLlW1aRy8dcdLTsA3p3Hi6FPGx+GTwIhAKn3oRLEIZ3GmuiSTSOwEVgXBcfv5IqBWENKGZM3LBqO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4152},"gitHead":"21684659faa296b93dd84d7f5b1bc54ab4d37392","_npmUser":{"name":"dawnswwwww","email":"wxn_em@163.com"},"repository":{"url":"git+https://github.com/dawnswwwww/zhihu-cli.git","type":"git"},"_npmVersion":"10.8.2","description":"CLI for the Zhihu Open Platform API","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"optionalDependencies":{"@dawnswwwww/zhihu-cli-linux-x64":"0.1.4","@dawnswwwww/zhihu-cli-win32-x64":"0.1.4","@dawnswwwww/zhihu-cli-darwin-x64":"0.1.4","@dawnswwwww/zhihu-cli-linux-arm64":"0.1.4","@dawnswwwww/zhihu-cli-darwin-arm64":"0.1.4"},"_npmOperationalInternal":{"tmp":"tmp/zhihu-cli_0.1.4_1782725921850_0.9481178731694606","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@dawnswwwww/zhihu-cli","version":"0.2.0","license":"MIT","_id":"@dawnswwwww/zhihu-cli@0.2.0","maintainers":[{"name":"dawnswwwww","email":"wxn_em@163.com"}],"homepage":"https://github.com/dawnswwwww/zhihu-cli#readme","bugs":{"url":"https://github.com/dawnswwwww/zhihu-cli/issues"},"os":["darwin","linux","win32"],"bin":{"zhihu":"bin/zhihu.js"},"cpu":["x64","arm64"],"dist":{"shasum":"34d01d400e587c41ee4337fed0ab511d13ecdaaf","tarball":"https://registry.npmjs.org/@dawnswwwww/zhihu-cli/-/zhihu-cli-0.2.0.tgz","fileCount":3,"integrity":"sha512-xKQHYFRHi3AMAipYVFoKlmZZ4a0jalzmP553phovpfTIVvKcSnFsswPYkYDJ+b8nfpIpYTk93L1bWyIAFH+jLA==","signatures":[{"sig":"MEQCIELATihcTAq4tC00GgzI63zO3H08Uavda+RxsP35qEYBAiBlf3QFa7yWHfyxLtN2//DurdaJCoog/Y5EJIQhR1vkdw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6450},"gitHead":"22778261287403a9937ef4259c007b19ab343436","_npmUser":{"name":"dawnswwwww","email":"wxn_em@163.com"},"repository":{"url":"git+https://github.com/dawnswwwww/zhihu-cli.git","type":"git"},"_npmVersion":"10.8.2","description":"CLI for the Zhihu Open Platform API","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"optionalDependencies":{"@dawnswwwww/zhihu-cli-linux-x64":"0.2.0","@dawnswwwww/zhihu-cli-win32-x64":"0.2.0","@dawnswwwww/zhihu-cli-darwin-x64":"0.2.0","@dawnswwwww/zhihu-cli-linux-arm64":"0.2.0","@dawnswwwww/zhihu-cli-darwin-arm64":"0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/zhihu-cli_0.2.0_1788757397154_0.29166122742970746","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"os":["darwin","linux","win32"],"_id":"@dawnswwwww/zhihu-cli@0.3.0","bin":{"zhihu":"bin/zhihu.js"},"cpu":["x64","arm64"],"bugs":{"url":"https://github.com/dawnswwwww/zhihu-cli/issues"},"dist":{"shasum":"09d4d8f2df9c236e36a0438c9452c8f55df28b73","tarball":"https://registry.npmjs.org/@dawnswwwww/zhihu-cli/-/zhihu-cli-0.3.0.tgz","fileCount":3,"integrity":"sha512-odxTfj3OtB3XQWgRmV9OYPFY6Scz+B4vr56xrTKMMTw2oiX6VLJ50GeNP7VnAKLTRlxh7aPpKJbWME41g0+uuA==","signatures":[{"sig":"MEYCIQCNZqW6t0d5Xxf3YL/HivmqynYbDPL99khxo17pzj8RfgIhAN3z8dvOt/+mtqLYkRetvY/T8Cw8VukWqGdtPDVzZTTX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAX3xr0mnNDoZ2V9OASdYcuf5PF00asUF+06cMYI9r7vAiAj1NkF6x5DWh3YwkkYRiPGyVdWdjVxmLM3LWCUcg4yHQ=="}],"unpackedSize":7303},"name":"@dawnswwwww/zhihu-cli","gitHead":"8d74f17d0b6dc64a37d961d833d2db97e4337102","license":"MIT","version":"0.3.0","_npmUser":{"name":"dawnswwwww","email":"wxn_em@163.com"},"homepage":"https://github.com/dawnswwwww/zhihu-cli#readme","repository":{"url":"git+https://github.com/dawnswwwww/zhihu-cli.git","type":"git"},"_npmVersion":"10.8.2","description":"CLI for the Zhihu Open Platform API","directories":{},"maintainers":[{"name":"dawnswwwww","email":"wxn_em@163.com"}],"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"optionalDependencies":{"@dawnswwwww/zhihu-cli-linux-x64":"0.3.0","@dawnswwwww/zhihu-cli-win32-x64":"0.3.0","@dawnswwwww/zhihu-cli-darwin-x64":"0.3.0","@dawnswwwww/zhihu-cli-linux-arm64":"0.3.0","@dawnswwwww/zhihu-cli-darwin-arm64":"0.3.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/zhihu-cli_0.3.0_1790221119834_0.4607131074680535"}}},"time":{"created":"2026-06-29T04:00:03.044Z","modified":"2026-09-24T03:38:40.186Z","0.1.1":"2026-06-29T04:00:03.356Z","0.1.2":"2026-06-29T04:04:03.923Z","0.1.3":"2026-06-29T06:09:13.446Z","0.1.4":"2026-06-29T09:38:41.992Z","0.2.0":"2026-09-07T05:03:17.279Z","0.3.0":"2026-09-24T03:38:39.927Z"},"bugs":{"url":"https://github.com/dawnswwwww/zhihu-cli/issues"},"license":"MIT","homepage":"https://github.com/dawnswwwww/zhihu-cli#readme","repository":{"url":"git+https://github.com/dawnswwwww/zhihu-cli.git","type":"git"},"description":"CLI for the Zhihu Open Platform API","maintainers":[{"name":"dawnswwwww","email":"wxn_em@163.com"}],"readme":"# zhihu-cli\n\nCLI for the [Zhihu Open Platform API](https://developer.zhihu.com).\n\nSupports authentication, Zhihu search, global web search, the Zhida chat completion API, the hot list, quota queries, knowledge bases (list/items/upload/RAG search), PDF parsing, PPT generation, Zhihu user data (contents/followees/collections/favlists), question discovery (recommendations/answers), and creator capabilities (own content full text, comments, account & per-content stats).\n\n## Installation\n\n### From npm (recommended for Agent environments)\n\n```bash\nnpm install -g @dawnswwwww/zhihu-cli\nzhihu --help\n```\n\n### From Homebrew\n\n```bash\nbrew tap dawnswwwww/tap\nbrew install zhihu-cli\n```\n\n### From crates.io\n\n```bash\ncargo install zhihu-cli\n```\n\n### From GitHub Releases\n\nDownload the prebuilt archive for your platform from the [Releases](https://github.com/dawnswwwww/zhihu-cli/releases) page, extract it, and place the `zhihu` binary in your `PATH`.\n\n## Quick start\n\n```bash\n# Authenticate with your Access Secret\nzhihu auth login\n\n# Or set it directly\nzhihu auth set-secret <YOUR_ACCESS_SECRET>\n\n# Search Zhihu\nzhihu search zhihu \"Rust 入门\" --count 5\n\n# Search the whole web\nzhihu search global \"Rust 入门\" --count 5\n\n# Ask Zhida\nzhihu ask \"Rust 和 Go 怎么选？\" --model thinking\n\n# Check remaining daily quota\nzhihu quota --ids knowledge,tools\n\n# Upload a file to your default knowledge base and RAG-search it\nzhihu kb upload ./product-doc.pdf\nzhihu kb search \"退款规则是什么？\" --scope personal\n\n# One-shot PDF parse (upload → create task → wait for result)\nzhihu pdf parse ./report.pdf\n\n# Generate a PPT from a Zhihu answer and wait for the download link\nzhihu ppt generate \"https://www.zhihu.com/question/.../answer/...\" --pages 12\n```\n\n## Claude Skill\n\nThis repository includes a Claude skill to help you use `zhihu-cli` from Claude Code or Claude.ai.\n\nInstall it with the [Skills CLI](https://skills.sh/):\n\n```bash\n# Install from GitHub\nnpx skills add dawnswwwww/zhihu-cli\n\n# Or install globally\nnpx skills add dawnswwwww/zhihu-cli -g\n```\n\nOnce installed, Claude will automatically use the skill whenever you ask about searching Zhihu, using the Zhida API, or configuring `zhihu-cli`.\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `zhihu auth login` | Interactive login (reads secret from stdin). |\n| `zhihu auth set-secret <SECRET>` | Save Access Secret directly. |\n| `zhihu auth status` | Show authentication status. |\n| `zhihu search zhihu <QUERY>` | Search within Zhihu. |\n| `zhihu search global <QUERY>` | Search the whole web. Use `--filter` and `--db`. |\n| `zhihu ask <QUERY>` | Ask Zhida. Use `--model fast/thinking/agent` and `--stream`. |\n| `zhihu hot` | Show the Zhihu hot list. `--limit` up to 30. |\n| `zhihu quota` | Query daily free quota usage. `--ids` to filter API IDs. |\n| `zhihu kb list` | List knowledge bases. `--scope all/created/subscribed`. |\n| `zhihu kb items <KB_ID>` | List knowledge base contents. `--cursor`/`--limit` (max 20). |\n| `zhihu kb upload <FILE>` | Upload a file to a knowledge base. `--kb-id` to target one. |\n| `zhihu kb search <QUERY>` | RAG search. `--kb-id`/`--scope` (at least one), `--limit` (max 10). |\n| `zhihu pdf upload <FILE>` | Upload a PDF for parsing; returns `file_id` (valid 24h). |\n| `zhihu pdf task <FILE_ID>` | Create a PDF parse task. `--idempotency-key`. |\n| `zhihu pdf status <TASK_ID>` | Query a PDF parse task. |\n| `zhihu pdf parse <FILE>` | One-shot: upload + create task + wait for the result link. `--timeout-secs`. |\n| `zhihu ppt task <URL> --pages N` | Create a PPT generation task from an answer/article URL. |\n| `zhihu ppt status <TASK_ID>` | Query a PPT generation task. |\n| `zhihu ppt generate <URL> --pages N` | One-shot: create task + wait for the PPTX link. `--timeout-secs`. |\n| `zhihu user contents` | Your created contents. `--type`, `--limit` (max 50), `--sort-field`, `--sort-order`. |\n| `zhihu user followees` | Users you follow. `--offset`/`--limit`. |\n| `zhihu user collections` | Your recently collected contents. |\n| `zhihu user favlists` | Your favlists. |\n| `zhihu user favlist-contents <TOKEN>` | Contents of a favlist (token from `user favlists`). |\n| `zhihu user <cmd> --oauth-token <T>` | Query an OAuth-authorized user's data instead of your own. |\n| `zhihu question recommend` | Recommend questions to answer. `--query <TOPIC>` for topic-based (omit for profile-based), `--count` (max 20). |\n| `zhihu question answers <QUESTION_URL>` | Answers under a question. `--offset`/`--limit` (max 50). |\n| `zhihu creator detail <CONTENT_URL>` | Full text of your own answer/article/pin/zvideo. |\n| `zhihu creator comments <CONTENT_URL>` | Comments on your own content. `--offset`/`--limit` (max 50), `--order score/reverse/ascending`. |\n| `zhihu creator account-stats` | Account-level creator stats. `--type`, paired `--start-date`/`--end-date` (YYYY-MM-DD). |\n| `zhihu creator content-stats <CONTENT_URL>` | Per-content stats. Paired `--start-date`/`--end-date` (YYYY-MM-DD). |\n\nRun `zhihu --help` or `zhihu <command> --help` for details.\n\n## Configuration\n\nThe CLI stores configuration (including the Access Secret) at `~/.zhihu-cli/config.toml` (created with `0o600` permissions on Unix).\n\nYou can also override the secret at runtime with the `ZHIHU_ACCESS_SECRET` environment variable (it takes precedence over the config file), and point the CLI at another API host with `ZHIHU_OPENAPI_BASE_URL`.\n\n## Development\n\n```bash\n# Run tests\nmake test\n\n# Lint\nmake lint\n\n# Full local CI check\nmake check\n```\n\nSee [docs/development.md](docs/development.md) for the full workflow.\n\n## Release\n\nPushing a SemVer tag triggers the release workflow:\n\n```bash\ngit tag -a v0.1.3 -m \"Release 0.1.3\"\ngit push origin v0.1.3\n```\n\nThis builds cross-platform binaries, creates a GitHub Release, publishes `zhihu-cli` to npm, and updates the Homebrew tap.\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}