{"_id":"@krunal202/apple-search-ads-cli","_rev":"2-2709874fa25fb194999bcdb5fba8451b","name":"@krunal202/apple-search-ads-cli","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@krunal202/apple-search-ads-cli","version":"0.1.0","keywords":["apple-search-ads","cli","llm","ads"],"license":"MIT","_id":"@krunal202/apple-search-ads-cli@0.1.0","maintainers":[{"name":"krunaldoshi","email":"krunaldoshi202@gmail.com"}],"homepage":"https://github.com/krunal202/apple-search-ads-cli#readme","bugs":{"url":"https://github.com/krunal202/apple-search-ads-cli/issues"},"bin":{"asa":"bin/asa.js"},"dist":{"shasum":"45b1ea687880c2a657a4befc59d02f3c05a2a460","tarball":"https://registry.npmjs.org/@krunal202/apple-search-ads-cli/-/apple-search-ads-cli-0.1.0.tgz","fileCount":23,"integrity":"sha512-xlZCSHirdm4QInXmyzCSimnSu2rsqeAq/4oUwBbtNpCMZi2wDU9JtIYqGDbMZ3XuDwZWJc6aMiI6G9em6Y+dvA==","signatures":[{"sig":"MEYCIQD9vJKXGv6Dinoxl6JKXCh+rGzXAi27cOybJdVFJjDSngIhAPqZNWBNkbv6PKA2Z+1oO4skd8HKpwxeggSn8TtMudVJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59870},"type":"module","engines":{"node":">=18"},"gitHead":"b80d7b6caab26a3b3a4fc0060c4aa12eb2870c5d","scripts":{"test":"node --test"},"_npmUser":{"name":"krunaldoshi","email":"krunaldoshi202@gmail.com"},"repository":{"url":"git+https://github.com/krunal202/apple-search-ads-cli.git","type":"git"},"_npmVersion":"10.9.8","description":"LLM-friendly CLI for the Apple Search Ads API","directories":{},"_nodeVersion":"22.22.3","dependencies":{"commander":"^12.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/apple-search-ads-cli_0.1.0_1789476101432_0.5332309138589206","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"_id":"@krunal202/apple-search-ads-cli@0.1.1","bin":{"asa":"bin/asa.js"},"bugs":{"url":"https://github.com/krunal202/apple-search-ads-cli/issues"},"dist":{"shasum":"e2c1a571382dd24f5afbd8646d2cee8f7f65c915","tarball":"https://registry.npmjs.org/@krunal202/apple-search-ads-cli/-/apple-search-ads-cli-0.1.1.tgz","fileCount":24,"integrity":"sha512-ofRwlT5gfltV6NKU7RQAljoJ7RdfvV1GK/q2qQkv0KT2h2kIN549y0JbWk2a27ANnqIp6e+K94yYiYGoccVIwg==","signatures":[{"sig":"MEUCIQCxKXYnbLd1FuWOSe4AtKg9gPRQeurdYnk73sS5WazgmAIgar7aWwqtRsadbbtx6LR1KpTIX0HohnORZ4U3AjD5ijI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDdPj8A7QfhQhU17puM4y7Oxc2XmlCJtgR14L3UAxxagwIgUdokRccFsIUWMY9Q5xzm5k1ooKtJ2lzOrBUgPG8OWrg="}],"unpackedSize":62991},"name":"@krunal202/apple-search-ads-cli","type":"module","engines":{"node":">=18"},"gitHead":"54f6b0486bcc77f225fc1a1023312995dfb9db77","license":"MIT","scripts":{"test":"node --test"},"version":"0.1.1","_npmUser":{"name":"krunaldoshi","email":"krunaldoshi202@gmail.com"},"homepage":"https://github.com/krunal202/apple-search-ads-cli#readme","keywords":["apple-search-ads","cli","llm","ads"],"repository":{"url":"git+https://github.com/krunal202/apple-search-ads-cli.git","type":"git"},"_npmVersion":"10.9.8","description":"LLM-friendly CLI for the Apple Search Ads API","directories":{},"maintainers":[{"name":"krunaldoshi","email":"krunaldoshi202@gmail.com"}],"_nodeVersion":"22.22.3","dependencies":{"commander":"^12.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/apple-search-ads-cli_0.1.1_1789477197449_0.3051449337148604"}}},"time":{"created":"2026-09-15T12:41:41.196Z","modified":"2026-09-15T12:59:57.956Z","0.1.0":"2026-09-15T12:41:41.556Z","0.1.1":"2026-09-15T12:59:57.683Z"},"bugs":{"url":"https://github.com/krunal202/apple-search-ads-cli/issues"},"license":"MIT","homepage":"https://github.com/krunal202/apple-search-ads-cli#readme","keywords":["apple-search-ads","cli","llm","ads"],"repository":{"url":"git+https://github.com/krunal202/apple-search-ads-cli.git","type":"git"},"description":"LLM-friendly CLI for the Apple Search Ads API","maintainers":[{"name":"krunaldoshi","email":"krunaldoshi202@gmail.com"}],"readme":"# apple-search-ads-cli\n\nA small, LLM-friendly CLI for the [Apple Search Ads API](https://developer.apple.com/documentation/apple_search_ads) (v5). JSON in, JSON out, structured errors with hints — built to be driven by humans and language-model agents alike.\n\n## Install\n\n```bash\nnpm i -g @krunal202/apple-search-ads-cli   # exposes the `asa` binary\n```\n\nOr from source:\n\n```bash\nnpm install\nnpm link\n```\n\nRequires Node.js ≥ 18. Single runtime dependency: `commander`.\n\n## Quickstart\n\n```bash\n# 1. Get API credentials — full walkthrough: CREDENTIALS.md\n#    (Apple Search Ads UI → invite an API-role user → upload a public key)\nasa login --client-id <id> --team-id <id> --key-id <id> --key-file ./asa-private-key.p8\n\nasa orgs list && asa orgs use <orgId>\n\nasa campaigns list --pretty\nasa campaigns create --name \"Launch\" --budget 1000 --currency USD --adam-id 123456789 --countries US\nasa adgroups create --campaign <id> --name \"Core\" --bid 0.50 --currency USD\nasa keywords create --campaign <id> --adgroup <id> --text \"my app\" --match-type EXACT\n\nasa stats campaigns --start 2026-09-01 --end 2026-09-15 --granularity DAILY --pretty\n\nasa copy campaign <id>\nasa paste --name \"Launch - Q4\"\n\nasa logout\n```\n\n## LLM integration\n\n- `asa llm` prints the complete machine-readable usage guide (also in [LLM_GUIDE.md](LLM_GUIDE.md)).\n- Output is single-line JSON by default (`--pretty` for humans).\n- Errors are structured JSON on stderr with a `hint` field describing the corrective action; unknown commands include \"did you mean\" suggestions.\n- Every create/update accepts `--data '<json>'` for fields not covered by flags.\n\n### Memory for agents\n\n`asa` remembers what happened so an LLM starting a fresh session can pick up context:\n\n- Every mutating API call is logged automatically per org (`~/.asa/memory/<orgId>/activity.jsonl`).\n- `asa remember \"note\" [--campaign <id>]` stores decisions and rationale.\n- `asa context [--live]` prints notes + recent activity (+ current campaigns) — the recommended first command of any agent session.\n- `asa memory` / `asa memory --clear` inspects or erases the store.\n\n## Layout\n\n```\nbin/asa.js            executable entry\nsrc/cli.js            program wiring, error handling\nsrc/config.js         ~/.asa credential/token/clipboard storage\nsrc/api/auth.js       ES256 client-secret JWT + OAuth token exchange\nsrc/api/client.js     authenticated fetch wrapper (X-AP-Context, error mapping)\nsrc/commands/         login/logout/orgs, campaigns, adgroups, keywords, negatives,\n                      apps, stats, copy/paste, llm guide\ntest/                 node:test unit tests (npm test)\n```\n\nNot yet covered by the CLI: ad creative / custom product page management and budget orders (campaigns are served with the default product page ad).\n\n## License\n\nMIT\n\n## Sponsors\n\nMaintaining API coverage as Apple evolves the Search Ads API takes ongoing work. If this CLI saves you time, consider sponsoring:\n\n- **[Buy Me a Coffee](https://buymeacoffee.com/krunaldoshi)**\n- GitHub Sponsors (button on the repo page once enabled)\n- Questions or sponsorship inquiries: [@krunaldoshi202](https://twitter.com/krunaldoshi202) on X\n\nSponsors can be listed here and in release notes; reach out for logo placement or priority feature requests.\n","readmeFilename":"README.md"}