@agendapanda/cli 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +208 -0
  3. package/package.json +25 -2
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Agenda Panda
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,208 @@
1
+ # @agendapanda/cli
2
+
3
+ CLI for [Agenda Panda](https://agendapanda.com) — schedule and manage social media posts from the terminal.
4
+
5
+ Works with X (Twitter), LinkedIn, Facebook Pages, Instagram, and Threads.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @agendapanda/cli
11
+ ```
12
+
13
+ Or run directly:
14
+
15
+ ```bash
16
+ npx @agendapanda/cli <command>
17
+ ```
18
+
19
+ ## Quick start
20
+
21
+ ```bash
22
+ # 1. Create an API key at https://agendapanda.com/account-settings
23
+ # 2. Authenticate
24
+ ap auth login --key ap_your_key_here
25
+
26
+ # 3. Set active workspace
27
+ ap projects list
28
+ ap projects use <project-id>
29
+
30
+ # 4. Post something
31
+ ap post create --content "Hello world" --connection <connection-id> --now
32
+ ```
33
+
34
+ ## Commands
35
+
36
+ ### Authentication
37
+
38
+ ```
39
+ ap auth login --key <key> Store API key (or set AP_API_KEY env var)
40
+ ap auth logout Clear stored credentials
41
+ ap auth status Show current user and active project
42
+ ap auth api-keys list List API keys
43
+ ap auth api-keys create --name Create a new API key
44
+ ap auth api-keys revoke <id> Revoke an API key
45
+ ```
46
+
47
+ ### Workspaces
48
+
49
+ ```
50
+ ap projects list List workspaces
51
+ ap projects use <id> Set active workspace
52
+ ap projects get Show full workspace details
53
+ ap projects update Update workspace settings
54
+ ```
55
+
56
+ `ap projects update` accepts `--name`, `--website`, `--industry`, `--target-audience`, `--brand-voice`, `--timezone`, `--soul-file <path>`, `--art-file <path>`, `--clear-soul`, `--clear-art`.
57
+
58
+ ### Connections
59
+
60
+ ```
61
+ ap connections list List connected social accounts
62
+ ap connections health Check connection health status
63
+ ap connections add <platform> Start OAuth flow (twitter, linkedin, facebook, threads, instagram)
64
+ ap connections add-all Start OAuth flow for all platforms
65
+ ```
66
+
67
+ ### Posts
68
+
69
+ ```
70
+ ap post create Create a post
71
+ ap post list List all posts
72
+ ap post get <id> Get a single post
73
+ ap post update <id> Update a post
74
+ ap post delete <id> Delete a post
75
+ ap post retry <id> Retry a failed post
76
+ ```
77
+
78
+ Create options: `--content <text>`, `--connection <id>`, `--schedule <datetime>`, `--now`, `--media <path>`, `--project <id>`.
79
+
80
+ Content can also be piped via stdin:
81
+
82
+ ```bash
83
+ echo "Hello from a pipe" | ap post create --connection <id> --now
84
+ ```
85
+
86
+ ### Calendar
87
+
88
+ ```
89
+ ap calendar import --file <path> Import posts from a JSON file
90
+ ap calendar sync --file <path> Sync a calendar file (create/update/delete by external_id)
91
+ ap calendar pull Pull scheduled posts as JSON
92
+ ```
93
+
94
+ #### Import
95
+
96
+ Bulk-create posts from a JSON array:
97
+
98
+ ```json
99
+ [
100
+ {
101
+ "content": "Post text here",
102
+ "connection": "<connection-id>",
103
+ "schedule": "2026-03-15T14:00:00Z"
104
+ }
105
+ ]
106
+ ```
107
+
108
+ Options: `--dry-run`, `--project <id>`, `--json`.
109
+
110
+ #### Sync
111
+
112
+ Two-way sync using `external_id` for stable identity:
113
+
114
+ ```json
115
+ [
116
+ {
117
+ "content": "Updated text",
118
+ "connection": "<connection-id>",
119
+ "schedule": "2026-03-15T14:00:00Z",
120
+ "external_id": "post-001"
121
+ }
122
+ ]
123
+ ```
124
+
125
+ Options: `--delete-missing`, `--dry-run`, `--project <id>`, `--json`.
126
+
127
+ #### Pull
128
+
129
+ Fetch current posts from the server as a CalendarItem JSON array:
130
+
131
+ ```bash
132
+ # Pull to file
133
+ ap calendar pull --file cal.json
134
+
135
+ # Filter by date range
136
+ ap calendar pull --from 2026-03-01 --to 2026-03-31
137
+
138
+ # Include published posts
139
+ ap calendar pull --include-published
140
+ ```
141
+
142
+ **Round-trip workflow:**
143
+
144
+ ```bash
145
+ ap calendar pull --file cal.json # pull current state
146
+ # edit cal.json (or feed to AI with ap context)
147
+ ap calendar sync --file cal.json # push changes back
148
+ ```
149
+
150
+ ### Context
151
+
152
+ Dump brand context, connections, and platform rules — useful for feeding to AI tools:
153
+
154
+ ```bash
155
+ # Markdown output (default)
156
+ ap context
157
+
158
+ # JSON output
159
+ ap context --json
160
+
161
+ # Include connection IDs
162
+ ap context --verbose
163
+ ```
164
+
165
+ ### Media
166
+
167
+ ```
168
+ ap media upload <file> Upload an image or video
169
+ ```
170
+
171
+ Supported formats: JPEG, PNG, GIF, WebP, MP4, MOV, WebM.
172
+
173
+ ## Configuration
174
+
175
+ Config is stored at `~/.config/agendapanda/config.json`.
176
+
177
+ Environment variable overrides:
178
+
179
+ | Variable | Description |
180
+ |----------|-------------|
181
+ | `AP_API_KEY` | API key (overrides stored key) |
182
+ | `AP_API_URL` | API base URL (default: `https://agendapanda.com`) |
183
+ | `AP_PROJECT` | Active project ID (overrides stored project) |
184
+
185
+ ## JSON output
186
+
187
+ All commands support `--json` for machine-readable output. JSON mode is also enabled automatically when stdout is piped.
188
+
189
+ Response envelopes:
190
+
191
+ - Lists: `{ "items": [...] }`
192
+ - Mutations: `{ "success": true, "item": {...} }`
193
+ - Errors: `{ "error": "message", "code": "ERROR_CODE" }` (stderr)
194
+
195
+ ## Schedule format
196
+
197
+ All schedule times must be **UTC ISO 8601 with Z suffix**:
198
+
199
+ ```
200
+ "schedule": "2026-03-15T14:00:00Z" # correct
201
+ "schedule": "2026-03-15T14:00:00" # rejected (no Z)
202
+ ```
203
+
204
+ The optional `timezone` field is display/planning metadata only — it does not affect when the post is published.
205
+
206
+ ## License
207
+
208
+ MIT
package/package.json CHANGED
@@ -1,7 +1,29 @@
1
1
  {
2
2
  "name": "@agendapanda/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Agenda Panda CLI - schedule social media posts from the terminal",
5
+ "license": "MIT",
6
+ "author": "Agenda Panda <hello@agendapanda.com> (https://agendapanda.com)",
7
+ "homepage": "https://agendapanda.com",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/nicejobhq/agendapanda-cli"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/nicejobhq/agendapanda-cli/issues"
14
+ },
15
+ "keywords": [
16
+ "social-media",
17
+ "scheduler",
18
+ "cli",
19
+ "twitter",
20
+ "linkedin",
21
+ "instagram",
22
+ "threads",
23
+ "facebook",
24
+ "content-calendar",
25
+ "automation"
26
+ ],
5
27
  "bin": {
6
28
  "ap": "dist/bin/ap.js"
7
29
  },
@@ -10,7 +32,8 @@
10
32
  "node": ">=20.0.0"
11
33
  },
12
34
  "files": [
13
- "dist/"
35
+ "dist/",
36
+ "README.md"
14
37
  ],
15
38
  "scripts": {
16
39
  "build": "tsc",