|
1 | 1 | # radcli |
2 | 2 |
|
3 | | -`radcli` is a command-line interface for Reddit Ads. |
| 3 | +A command-line interface for Reddit Ads. Fast, scriptable, no browser required. |
4 | 4 |
|
5 | | -The goal is simple: make Reddit Ads fast, scriptable, and predictable without |
6 | | -having to live in the website. |
| 5 | +## Install |
7 | 6 |
|
8 | | -Today `radcli` is already useful for: |
| 7 | +**Homebrew:** |
9 | 8 |
|
10 | | -- showing release metadata and self-updating from GitHub Releases |
11 | | -- authenticating with Reddit Ads |
12 | | -- selecting a default business and ad account |
13 | | -- listing and inspecting campaigns, ad groups, and ads |
14 | | -- creating and updating campaigns, ad groups, ads, and creatives |
15 | | -- looking up targeting entities, funding instruments, pixels, and audiences |
16 | | -- running raw reports |
17 | | -- running enriched summary reports |
18 | | -- filtering reports by campaign, ad group, and ad |
19 | | -- exporting report output as tables, JSON, or CSV |
| 9 | +```bash |
| 10 | +brew tap lloydhumphreys/radcli |
| 11 | +brew install --cask radcli |
| 12 | +``` |
| 13 | + |
| 14 | +**From source:** |
| 15 | + |
| 16 | +```bash |
| 17 | +git clone https://github.com/lloydhumphreys/radcli.git |
| 18 | +cd radcli |
| 19 | +go build -o bin/rad ./cmd/rad |
| 20 | +``` |
20 | 21 |
|
21 | | -## Why |
| 22 | +## Get started |
22 | 23 |
|
23 | | -The Reddit Ads web UI is powerful, but it can also be slow and hard to navigate |
24 | | -for repeated operator tasks. `radcli` is meant to be a daily-driver tool for: |
| 24 | +### 1. Create a Reddit Ads app |
25 | 25 |
|
26 | | -- advertisers |
27 | | -- agencies |
28 | | -- internal growth teams |
29 | | -- anyone who wants Reddit Ads to behave more like infrastructure |
| 26 | +Go to Business Manager and create a developer app. You'll need the client ID, |
| 27 | +client secret, and a redirect URI. |
30 | 28 |
|
31 | | -## Build |
| 29 | +### 2. Configure and log in |
32 | 30 |
|
33 | 31 | ```bash |
34 | | -git clone https://github.com/lloydhumphreys/radcli.git |
35 | | -cd radcli |
36 | | -env GOCACHE=$PWD/.gocache go build -o bin/rad ./cmd/rad |
| 32 | +rad auth setup \ |
| 33 | + --client-id YOUR_CLIENT_ID \ |
| 34 | + --client-secret YOUR_CLIENT_SECRET \ |
| 35 | + --redirect-uri https://yourdomain.com/oauth/callback |
| 36 | + |
| 37 | +rad auth login --open |
37 | 38 | ``` |
38 | 39 |
|
39 | | -## Install And Update |
| 40 | +This opens Reddit in your browser. Approve the app and you'll be redirected to |
| 41 | +your redirect URI with a `code` parameter in the URL, e.g.: |
| 42 | + |
| 43 | +``` |
| 44 | +https://yourdomain.com/oauth/callback?state=abc123&code=def456#_ |
| 45 | +``` |
40 | 46 |
|
41 | | -Release/distribution scaffolding is included for: |
| 47 | +Copy the entire URL from your browser's address bar and paste it back into the |
| 48 | +terminal. `rad` extracts the code automatically and exchanges it for an access |
| 49 | +token. You can also paste just the code value if you prefer. |
42 | 50 |
|
43 | | -- GitHub Releases |
44 | | -- Homebrew tap publishing |
45 | | -- `rad self-update` |
| 51 | +If the redirect URI doesn't resolve to a real server, that's fine — you only |
| 52 | +need the URL from the address bar, not for the page to load. |
46 | 53 |
|
47 | | -From a local checkout: |
| 54 | +### 3. Pick a business and ad account |
48 | 55 |
|
49 | 56 | ```bash |
50 | | -./bin/rad version |
51 | | -./bin/rad self-update --check |
| 57 | +rad business list |
| 58 | +rad business use "My Business" |
| 59 | +rad account list |
| 60 | +rad account use "My Ad Account" |
52 | 61 | ``` |
53 | 62 |
|
54 | | -Once releases are live, the intended Homebrew flow is: |
| 63 | +### 4. Start working |
55 | 64 |
|
56 | 65 | ```bash |
57 | | -brew tap lloydhumphreys/radcli |
58 | | -brew install --cask radcli |
59 | | -brew upgrade --cask radcli |
| 66 | +rad campaign list |
| 67 | +rad campaign get "Spring Launch" |
| 68 | +rad report campaign-summary --since 30d |
60 | 69 | ``` |
61 | 70 |
|
62 | | -## Quick Start |
| 71 | +## What can it do? |
63 | 72 |
|
64 | | -1. Create a Reddit Ads developer app in Business Manager. |
65 | | -2. Configure the CLI with your app credentials. |
66 | | -3. Log in once. |
67 | | -4. Pick a business and ad account. |
68 | | -5. Start listing assets and running reports. |
| 73 | +**Browse and manage your ad structure:** |
69 | 74 |
|
70 | | -For the full login flow and redirect URI notes, see [`docs/login.md`](./docs/login.md). |
| 75 | +```bash |
| 76 | +rad campaign list |
| 77 | +rad campaign create --name "Spring Launch" --objective CLICKS --configured-status PAUSED |
| 78 | +rad adgroup create --campaign "Spring Launch" --name "US Traffic" --configured-status PAUSED --dry-run |
| 79 | +rad ad create --ad-group "US Traffic" --name "Hero Ad" --configured-status ACTIVE --post-id t3_abc123 |
| 80 | +rad ad update --configured-status PAUSED "Hero Ad" |
| 81 | +``` |
71 | 82 |
|
72 | | -Example: |
| 83 | +**Run reports:** |
73 | 84 |
|
74 | 85 | ```bash |
75 | | -./bin/rad auth setup \ |
76 | | - --client-id YOUR_CLIENT_ID \ |
77 | | - --client-secret YOUR_CLIENT_SECRET \ |
78 | | - --redirect-uri https://YOURDOMAIN.com/oauth/reddit-ads/callback \ |
79 | | - --scope adsread \ |
80 | | - --scope adsedit \ |
81 | | - --scope adsconversions \ |
82 | | - --scope history \ |
83 | | - --scope read \ |
84 | | - --user-agent 'macos:com.example.radcli:v0.1.0 (by /u/YOUR_USERNAME)' |
85 | | - |
86 | | -./bin/rad auth login |
87 | | -./bin/rad auth whoami |
88 | | -./bin/rad business list |
89 | | -./bin/rad business use YOUR_BUSINESS_NAME |
90 | | -./bin/rad account list |
91 | | -./bin/rad account use YOUR_ACCOUNT_NAME |
92 | | -./bin/rad campaign list |
93 | | -./bin/rad report campaign-summary --since 30d |
| 86 | +rad report campaign-summary --since 30d |
| 87 | +rad report ad-summary --campaign "Spring Launch" --since 7d --csv --output report.csv |
| 88 | +rad report run --from 2026-03-01T00:00:00Z --to 2026-03-08T00:00:00Z --field IMPRESSIONS --field CLICKS |
94 | 89 | ``` |
95 | 90 |
|
96 | | -## Example Commands |
| 91 | +**Inspect creatives:** |
97 | 92 |
|
98 | 93 | ```bash |
99 | | -./bin/rad campaign get "Spring Launch" |
100 | | -./bin/rad adgroup get "Retargeting" |
101 | | -./bin/rad ad get "Winner Variant" |
| 94 | +rad post get t3_abc123 |
| 95 | +rad post create --profile t2_xyz --type IMAGE --headline "My Ad" --content-json @content.json |
| 96 | +``` |
| 97 | + |
| 98 | +**Find targeting options:** |
102 | 99 |
|
103 | | -./bin/rad campaign create --name "Spring Launch" --objective CLICKS --configured-status PAUSED --dry-run |
104 | | -./bin/rad adgroup create --campaign "Spring Launch" --name "US Retargeting" --configured-status PAUSED --dry-run |
105 | | -./bin/rad ad create --ad-group "US Retargeting" --name "Spring Ad" --configured-status PAUSED --dry-run |
| 100 | +```bash |
| 101 | +rad targeting communities search --query "3d printing" |
| 102 | +rad targeting interests list |
| 103 | +rad targeting keywords suggest --keyword "filament" |
| 104 | +``` |
106 | 105 |
|
107 | | -./bin/rad report campaign-summary --since 30d |
108 | | -./bin/rad report campaign-summary --campaign "Spring Launch" --since 30d |
109 | | -./bin/rad report adgroup-summary --adgroup "Retargeting" --since 14d |
110 | | -./bin/rad report ad-summary --ad "Winner Variant" --since 7d |
| 106 | +**Check funding, pixels, and audiences:** |
111 | 107 |
|
112 | | -./bin/rad report campaign-summary --since 30d --csv --output campaign-summary-30d.csv |
| 108 | +```bash |
| 109 | +rad funding list |
| 110 | +rad pixel list |
| 111 | +rad pixel events "Main Pixel" |
| 112 | +rad audience saved list |
113 | 113 | ``` |
114 | 114 |
|
| 115 | +Every command supports `--json` for machine-readable output. Reports also |
| 116 | +support `--csv`. Use `--dry-run` on any write command to preview the request |
| 117 | +body before sending it. |
| 118 | + |
115 | 119 | ## Docs |
116 | 120 |
|
117 | | -The deeper docs live in [`docs/`](./docs): |
118 | | - |
119 | | -- [`docs/index.md`](./docs/index.md) |
120 | | -- [`docs/commands.md`](./docs/commands.md) |
121 | | -- [`docs/distribution.md`](./docs/distribution.md) |
122 | | -- [`docs/login.md`](./docs/login.md) |
123 | | -- [`docs/resources.md`](./docs/resources.md) |
124 | | -- [`docs/reports.md`](./docs/reports.md) |
125 | | -- [`plan.md`](./plan.md) |
126 | | - |
127 | | -## Current Scope |
128 | | - |
129 | | -Implemented command groups: |
130 | | - |
131 | | -- `auth` |
132 | | -- `config` |
133 | | -- `business` |
134 | | -- `account` |
135 | | -- `funding` |
136 | | -- `pixel` |
137 | | -- `audience` |
138 | | -- `profile` |
139 | | -- `post` |
140 | | -- `campaign` |
141 | | -- `adgroup` |
142 | | -- `ad` |
143 | | -- `targeting` |
144 | | -- `report` |
145 | | -- `version` |
146 | | -- `self-update` |
147 | | - |
148 | | -## Next |
149 | | - |
150 | | -The next major milestone is workflow polish: |
151 | | - |
152 | | -- better validation and error messages around write commands |
153 | | -- more end-to-end workflow docs and examples |
154 | | -- richer export and automation ergonomics |
155 | | -- wider live testing against real Reddit Ads setups |
| 121 | +- [Examples with output](./docs/examples.md) |
| 122 | +- [Command reference](./docs/commands.md) |
| 123 | +- [Authentication flow](./docs/login.md) |
| 124 | +- [Reports](./docs/reports.md) |
| 125 | +- [All docs](./docs/index.md) |
| 126 | + |
| 127 | +## License |
| 128 | + |
| 129 | +[MIT](./LICENSE) |
0 commit comments