@reepl/cli 0.1.0
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.
- package/README.md +104 -0
- package/dist/chunk-QSNFNE5Z.js +719 -0
- package/dist/chunk-QSNFNE5Z.js.map +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +982 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/index.d.ts +525 -0
- package/dist/core/index.js +57 -0
- package/dist/core/index.js.map +1 -0
- package/package.json +49 -0
- package/scripts/postinstall.mjs +56 -0
package/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Reepl CLI
|
|
2
|
+
|
|
3
|
+
`reepl` — a command-line interface for Reepl. Create, schedule, and manage LinkedIn / X /
|
|
4
|
+
Reddit content, carousels, signals, DMs, and writing styles from your terminal or an agent.
|
|
5
|
+
|
|
6
|
+
Built LLM-first: every command emits a stable JSON envelope (`{ ok, data }` /
|
|
7
|
+
`{ ok, error: { code } }`), auto-enabled when output is piped, with distinct exit codes per
|
|
8
|
+
error class so scripts and agents can branch without parsing prose.
|
|
9
|
+
|
|
10
|
+
## Architecture
|
|
11
|
+
|
|
12
|
+
- **`src/core`** — `@reepl/api-core`, an environment-agnostic client for `api.reepl.io/v1`.
|
|
13
|
+
Owns endpoint shapes, Cognito token refresh, workspace scoping, and typed errors. It is
|
|
14
|
+
the same contract the Reepl MCP server uses internally, and is designed to be extracted
|
|
15
|
+
to its own npm package so both surfaces share one source of truth.
|
|
16
|
+
- **`src/cli`** — the `reepl` binary: config/token storage, browser login, output
|
|
17
|
+
rendering, and one command module per resource.
|
|
18
|
+
|
|
19
|
+
## Auth
|
|
20
|
+
|
|
21
|
+
`reepl login` opens your browser to the Reepl web app, which hands back Cognito tokens to a
|
|
22
|
+
localhost loopback listener. Tokens are stored in `~/.reepl/credentials.json` (0600) and
|
|
23
|
+
refreshed automatically (public Cognito client, no secret). Headless:
|
|
24
|
+
`reepl login --token <idToken> --refresh <refreshToken>`.
|
|
25
|
+
|
|
26
|
+
## Commands
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
# Auth & workspace
|
|
30
|
+
reepl login | logout | whoami
|
|
31
|
+
reepl workspace list | switch <id> | current
|
|
32
|
+
|
|
33
|
+
# Posts (LinkedIn + X) --platform linkedin|x
|
|
34
|
+
reepl post create -c "..." [--draft | --schedule <iso> | --publish] [--title t] [--media a,b]
|
|
35
|
+
reepl post list [--status scheduled|published|drafts] [--search q] [--limit n]
|
|
36
|
+
reepl post update <id> [-c "..."] [--schedule <iso>] [--draft]
|
|
37
|
+
reepl post delete <id> [--draft]
|
|
38
|
+
|
|
39
|
+
# Calendar (scheduled across platforms)
|
|
40
|
+
reepl calendar [--platform linkedin|x|all]
|
|
41
|
+
|
|
42
|
+
# Comment / reply by URL or id (auto-routes LinkedIn / X / Reddit)
|
|
43
|
+
reepl comment <urlOrId> -t "..." # or --url; --platform to force
|
|
44
|
+
|
|
45
|
+
# Reddit
|
|
46
|
+
reepl reddit search <keyword> # Pro plan
|
|
47
|
+
reepl reddit reply <urlOrId> -t "..."
|
|
48
|
+
reepl reddit status
|
|
49
|
+
|
|
50
|
+
# Signals inbox
|
|
51
|
+
reepl signals list
|
|
52
|
+
|
|
53
|
+
# Carousels
|
|
54
|
+
reepl carousel list | get <id> | delete <id>
|
|
55
|
+
reepl carousel create --title t --slides '[{"headline":"..","body":".."}]'
|
|
56
|
+
reepl carousel update <id> [--title t] [--slides <json>] [--theme x]
|
|
57
|
+
reepl carousel generate --topic "..." [--slides n]
|
|
58
|
+
|
|
59
|
+
# Writing styles (workspace-scoped; train is Pro+)
|
|
60
|
+
reepl style get
|
|
61
|
+
reepl style set --facet posts -i "..."
|
|
62
|
+
reepl style train --facet posts
|
|
63
|
+
reepl style test --facet posts -i "..."
|
|
64
|
+
|
|
65
|
+
# Voice profile
|
|
66
|
+
reepl voice get
|
|
67
|
+
reepl voice update --file profile.json | --active | --inactive
|
|
68
|
+
|
|
69
|
+
# X DMs & reply (Premium)
|
|
70
|
+
reepl dm list | messages <id> | refresh
|
|
71
|
+
reepl dm reply <conversationId> -t "..."
|
|
72
|
+
reepl x reply <tweetUrlOrId> -t "..."
|
|
73
|
+
|
|
74
|
+
# Agent discovery
|
|
75
|
+
reepl schema # full command/flag tree as JSON
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Every command accepts `--json` (auto-enabled when piped) and exits non-zero with a typed
|
|
79
|
+
`error.code` on failure (`UNAUTHENTICATED`, `PLAN_REQUIRED`, `PREMIUM_REQUIRED`, ...).
|
|
80
|
+
|
|
81
|
+
### Notes / limits
|
|
82
|
+
- **LinkedIn comments** address Reepl-tracked posts by their Reepl post id, not arbitrary
|
|
83
|
+
public LinkedIn URLs (use the Chrome extension for those). Reddit and X comment/reply
|
|
84
|
+
work for any post by URL.
|
|
85
|
+
- **Reddit post creation** is intentionally out of scope for v1 (no backend endpoint);
|
|
86
|
+
Reddit is reply + search only.
|
|
87
|
+
|
|
88
|
+
## Develop
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm install
|
|
92
|
+
npm test # unit tests (fast, hermetic — mocked fetch)
|
|
93
|
+
npm run test:e2e # end-to-end: real binary vs a mock Reepl server
|
|
94
|
+
npm run test:all # both
|
|
95
|
+
npm run typecheck # tsc --noEmit
|
|
96
|
+
npm run build # tsup -> dist/
|
|
97
|
+
node dist/cli/index.js --help
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Testing is documented in [TESTING.md](TESTING.md) — including the e2e TDD harness
|
|
101
|
+
(`MockReeplServer` + `runCli`) for driving the real CLI in a red/green loop.
|
|
102
|
+
|
|
103
|
+
Installing the package prints a branded Reepl screen (postinstall); a bare `reepl`
|
|
104
|
+
shows it too.
|