pipiads-cli
v0.1.1
Published
CLI for the Pipiads Open API.
Downloads
17
Maintainers
Readme
pipiads-cli
CLI for the Pipiads Open API.
Requirements
- Node.js 20+
- A Pipiads Open API key
Install
Global install:
npm install -g pipiads-cli
pipiads --helpRun without installing globally:
npx pipiads-cli --helpSetup
Before using the CLI:
- Visit the official Pipiads website at https://pipiads.com/ to view real-time dashboard data and explore the product UI.
- Visit https://www.pipispy.com/ to get your API key and manage billing or recharges.
- Set your API key as an environment variable:
export PIPIADS_API_KEY=<KEY>Quick start
pipiads advertiser detail --id 66f994b3a8f1cc723674b9ffShow the installed CLI version:
pipiads --versionAuthentication
API commands require an API key.
Two supported ways:
Pass the key on each command:
pipiads advertiser detail --key <KEY> --id 66f994b3a8f1cc723674b9ffOr use an environment variable:
export PIPIADS_API_KEY=<KEY>
pipiads advertiser detail --id 66f994b3a8f1cc723674b9ff--key takes precedence over PIPIADS_API_KEY.
If neither is provided, the CLI prints:
Missing API key. Pass --key or set PIPIADS_API_KEY.Command structure
Commands are grouped by domain:
pipiads <domain> <command> [options]Examples of domains:
ad-monitor-taskadvertiserappproductstoread-libraryai-search-imagereference
Use help at any level:
pipiads --help
pipiads advertiser --help
pipiads advertiser detail --helpOutput and exit codes
Successful responses are written to stdout as JSON.
Compact output by default:
pipiads advertiser detail --key <KEY> --id 66f994b3a8f1cc723674b9ffPretty output:
pipiads advertiser detail --key <KEY> --id 66f994b3a8f1cc723674b9ff --prettyErrors are written to stderr.
Exit codes:
0success1unknown error2invalid command or arguments3missing API key4network or HTTP error5Pipiads API error
API transport behavior
The CLI routes commands to the documented Pipiads Open API transports:
- monitor-data commands ->
https://www.pipispy.com/open-api/v1/monitor/data - data commands ->
https://www.pipispy.com/open-api/v1/data - upload commands ->
https://www.pipispy.com/open-api/v1/upload-file
You can override the base URL when needed:
pipiads advertiser detail --key <KEY> --id 66f994b3a8f1cc723674b9ff --base-url https://example.com/open-api/v1/dataExamples
Advertiser detail
pipiads advertiser detail --key <KEY> --id 66f994b3a8f1cc723674b9ffAdvertiser rank list
pipiads advertiser rank-list --key <KEY> --current-page 1 --page-size 10App list
pipiads app list \
--key <KEY> \
--current-page 1 \
--page-size 10 \
--plat-type 1 \
--search-type 1 \
--sort 1 \
--sort-type desc \
--time 7Product list
pipiads product list --key <KEY> --plat-type 1 --search-type 1 --keyword gardenStore rank list
pipiads store rank-list \
--key <KEY> \
--data-type 0 \
--time 7 \
--sort 0 \
--sort-type desc \
--page-size 20 \
--current-page 1Monitor task ad details
pipiads ad-monitor-task ad-details --key <KEY> --ad-id 1160096586185797Create monitor task
pipiads ad-monitor-task create-monitor-task \
--key <KEY> \
--facebook-page-id-list 614178972053891,714739975064116Comma-separated values are converted into arrays before the request is sent.
Image upload usage
Upload a local image file:
pipiads ai-search-image submit-file --key <KEY> --image-file ./example.jpgSubmit an image URL:
pipiads ai-search-image submit-url --key <KEY> --image-url https://example.com/image.jpgAI agent usage
This package is published as a CLI. The supported integration path for agents is shell execution.
Examples:
pipiads advertiser detail --id 66f994b3a8f1cc723674b9ff
pipiads product list --plat-type 1 --search-type 1 --keyword gardenRecommended contract for automation:
- read successful JSON from
stdout - read human-readable errors from
stderr - branch on the process exit code
Reference commands
Some docs are reference-only and do not map to executable API endpoints. Those commands are still exposed under the reference domain so the CLI catalog stays aligned with the docs.
Example:
pipiads reference region --prettyThat prints metadata describing the source documentation file.
Error behavior
The CLI is designed to show actionable help:
- unknown commands print top-level help
- command validation errors print the error and the matching command help
- missing API keys explain both supported auth methods
Examples:
pipiads advertiser detail
pipiads ai-search-image submit-file
pipiads unknown-domainDevelopment
Install dependencies:
npm installRun locally during development:
npm run dev -- --helpRun tests:
npm testBuild:
npm run buildDry-run package contents:
npm pack --dry-runPublishing readiness
Current package safeguards:
- compiled CLI binary in
dist/ fileswhitelist for publish outputprepublishOnlyruns build and tests before publish
Documentation source
The command catalog is derived from the API markdown docs in the API documentation directory used for this project. The CLI maps those docs into grouped commands, help text, and request metadata.
