@rolino/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/CHANGELOG.md ADDED
@@ -0,0 +1,36 @@
1
+ # @rolino/cli
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fdc916f: Add least-privilege, idempotent project creation across the public API, SDK,
8
+ CLI, and local stdio MCP, including atomic paired-brand creation.
9
+ - 2f5220f: Expose Bluesky consistently across public publishing contracts, the SDK, CLI,
10
+ and MCP, including 300-grapheme caption overrides, text and image readiness,
11
+ health reporting, scheduling, and immediate publishing. The fixed release group
12
+ also advances `@rolino/local-auth` even though its source does not change.
13
+ - edd5f2e: Validate YouTube descriptions by their 5,000-byte UTF-8 provider limit so every Rolino client rejects multibyte text that YouTube would refuse.
14
+ - 1b644ef: Prepare the first coordinated public release of Rolino's contracts, SDK, shared
15
+ local authentication, CLI, and local stdio MCP packages.
16
+ - 420484d: Add reusable media discovery and direct local-file uploads across the public
17
+ API contracts, SDK, CLI, and MCP so agents can safely prepare folder-based
18
+ social scheduling workflows. The fixed release group also advances
19
+ `@rolino/local-auth` even though its source does not change.
20
+ - 52373a6: Expose YouTube consistently across public contracts, the SDK, CLI, and MCP,
21
+ including explicit draft metadata, readiness and health, early scheduled
22
+ preparation, exact publish confirmation, and typed pending reconciliation.
23
+ The fixed release group also advances `@rolino/local-auth` even though its
24
+ source does not change.
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies [fdc916f]
29
+ - Updated dependencies [2f5220f]
30
+ - Updated dependencies [edd5f2e]
31
+ - Updated dependencies [1b644ef]
32
+ - Updated dependencies [420484d]
33
+ - Updated dependencies [52373a6]
34
+ - @rolino/contracts@0.1.0
35
+ - @rolino/sdk@0.1.0
36
+ - @rolino/local-auth@0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vlad
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,192 @@
1
+ # `@rolino/cli`
2
+
3
+ The `rolino` command-line interface for people, scripts, and coding agents.
4
+ Its stable machine mode keeps result data on stdout and diagnostics on stderr.
5
+ Network requests go through `@rolino/sdk`, which uses the Node.js native
6
+ `fetch` implementation; the CLI does not depend on Axios or another HTTP
7
+ client package.
8
+
9
+ ## Installation
10
+
11
+ The supported installation keeps the CLI independent from MCP:
12
+
13
+ ```bash
14
+ npm install --global @rolino/cli
15
+ ```
16
+
17
+ Users who also want local MCP will install both packages explicitly:
18
+
19
+ ```bash
20
+ npm install --global @rolino/cli @rolino/mcp
21
+ ```
22
+
23
+ The CLI-only installation does not include `@rolino/mcp` or the MCP SDK. If a
24
+ CLI-only user runs `rolino setup mcp`, the command explains how to install the
25
+ separate MCP package and then retry. Rolino never downloads or installs MCP
26
+ silently.
27
+
28
+ Initial commands:
29
+
30
+ ```text
31
+ rolino auth login
32
+ rolino auth status
33
+ rolino auth logout
34
+ rolino setup mcp --client codex [--scope user|project]
35
+ rolino setup mcp --client claude-code [--scope user|project]
36
+ rolino whoami
37
+ rolino projects create --name NAME [--type PRODUCT|SERVICE|PERSONAL|COMPANY] [--website URL] [--description TEXT] [--idempotency-key KEY] --yes
38
+ rolino projects list [--limit 50] [--cursor ID]
39
+ rolino projects show PROJECT_ID
40
+ rolino media list --project PROJECT_ID [--type IMAGE|VIDEO] [--query TEXT] [--limit 50] [--cursor ID]
41
+ rolino media upload FILE_PATH --project PROJECT_ID --yes
42
+ rolino posts create --project PROJECT_ID --caption TEXT [--platform INSTAGRAM|TIKTOK|YOUTUBE|BLUESKY] [--media ASSET_ID] --yes
43
+ rolino posts update POST_ID --project PROJECT_ID --expected-version VERSION --caption TEXT [--platform INSTAGRAM|TIKTOK|YOUTUBE|BLUESKY] [--media ASSET_ID] --yes
44
+ rolino posts list --project PROJECT_ID [--limit 50] [--cursor ID] [--status STATUS]
45
+ rolino posts show POST_ID --project PROJECT_ID
46
+ rolino posts readiness POST_ID --project PROJECT_ID
47
+ rolino posts schedule preview POST_ID --project PROJECT_ID --expected-version VERSION --at ISO_DATE --timezone IANA_TIMEZONE
48
+ rolino posts schedule execute POST_ID --project PROJECT_ID --expected-version VERSION --at ISO_DATE --timezone IANA_TIMEZONE --confirmation-token TOKEN [--idempotency-key KEY]
49
+ rolino posts publish preview POST_ID --project PROJECT_ID --expected-version VERSION --platform INSTAGRAM|TIKTOK|YOUTUBE|BLUESKY
50
+ rolino posts publish execute POST_ID --project PROJECT_ID --expected-version VERSION --platform INSTAGRAM|TIKTOK|YOUTUBE|BLUESKY --confirmation-token TOKEN [--idempotency-key KEY]
51
+ rolino integrations health --project PROJECT_ID
52
+ rolino calendar list --project PROJECT_ID [--from ISO_DATE --to ISO_DATE] [--limit 50] [--cursor CURSOR]
53
+ rolino doctor
54
+ ```
55
+
56
+ Interactive login opens the configured Rolino instance in a browser, obtains
57
+ explicit workspace approval, and exchanges a single-use code with PKCE S256.
58
+ The approval screen always includes identity and workspace reads and lets the
59
+ user independently opt into project creation, draft writing, confirmed
60
+ scheduling, and confirmed immediate publishing. Optional permissions start off,
61
+ and existing credentials never gain a newly selected permission. Revoke and
62
+ reauthorize an existing connection to grant project creation. The bearer
63
+ credential never passes through a browser URL. Saved credentials are scoped by
64
+ base URL and stored in the operating-system configuration directory;
65
+ `ROLINO_CONFIG_DIR` overrides that location. `auth logout` revokes the calling
66
+ credential before deleting its local copy.
67
+
68
+ The terminal waits five minutes for browser approval. If that request expires,
69
+ close the old approval page and run `rolino auth login` again; refreshing the
70
+ page cannot restart the closed loopback listener.
71
+
72
+ `setup mcp` finds the built Rolino stdio server, previews the exact token-free
73
+ configuration, and asks before changing anything. User scope is the default.
74
+ Codex configuration is written to `CODEX_HOME/config.toml` or
75
+ `~/.codex/config.toml`; Claude Code user scope is applied through its official
76
+ CLI. Project scope writes `.codex/config.toml` or `.mcp.json` in the current
77
+ directory. Existing file-backed configuration is backed up with a
78
+ `.rolino-backup` suffix. Use `--dry-run` to preview in scripts and `--yes` to
79
+ provide explicit non-interactive consent; `--agent` never implies consent.
80
+
81
+ Draft creation and update never schedule or publish. Both require interactive
82
+ confirmation or `--yes`; non-interactive and agent-mode calls fail before an
83
+ HTTP request unless `--yes` is present. Retries use `--idempotency-key` (the
84
+ request ID by default), and updates require the current `--expected-version`
85
+ shown by `posts show` so stale automation cannot overwrite a newer edit.
86
+
87
+ Media uploads use the deployment's existing local, S3-compatible, or
88
+ Cloudflare R2 storage. The CLI validates the local file, requests a short-lived
89
+ signed upload, sends bytes directly to storage, and registers the reusable
90
+ asset only after the stored size and content type match. Uploading requires
91
+ interactive confirmation or `--yes` and never creates or schedules a post.
92
+
93
+ YouTube drafts require exactly one stored video and explicit settings. Supply
94
+ `--youtube-title`, `--youtube-category-id`, `--youtube-privacy`, and
95
+ `--youtube-made-for-kids yes|no`; repeat `--youtube-tag` as needed. Optional
96
+ flags include `--youtube-caption`, `--youtube-synthetic-media`, and
97
+ `--no-youtube-notify-subscribers`. The YouTube caption override is the video
98
+ description; otherwise Rolino uses the shared caption. For example:
99
+
100
+ ```text
101
+ rolino posts create --project PROJECT_ID --caption "Launch description" --platform YOUTUBE --media VIDEO_ASSET_ID --youtube-title "Launch video" --youtube-category-id 22 --youtube-privacy PRIVATE --youtube-made-for-kids no --youtube-tag launch --yes
102
+ ```
103
+
104
+ Google may restrict uploads from unaudited API projects to Private. Rolino does
105
+ not infer audit approval from configuration. A scheduled YouTube post must
106
+ target Public; confirmed scheduling starts its private resumable upload
107
+ immediately so processing can finish before the target time.
108
+
109
+ Bluesky drafts can be text-only or include up to four stored JPEG, PNG, or WebP
110
+ images. Use `--bluesky-caption` for a destination-specific override of up to
111
+ 300 graphemes:
112
+
113
+ ```text
114
+ rolino posts create --project PROJECT_ID --caption "Shared launch" --platform BLUESKY --bluesky-caption "Launch day 🦋" --yes
115
+ ```
116
+
117
+ Project creation also requires interactive confirmation or `--yes`. It
118
+ atomically saves a project and its paired brand, but does not start research,
119
+ connect accounts, schedule posts, or publish. A fresh CLI invocation generates
120
+ a fresh request ID and therefore a fresh default idempotency key. To retry the
121
+ same logical creation across invocations, pass the original request ID or an
122
+ explicit stable value through `--idempotency-key`.
123
+
124
+ Scheduling is intentionally two-step. `posts schedule preview` validates the
125
+ exact time, timezone, current post version, readiness, and live provider health,
126
+ then returns a five-minute one-time confirmation. `posts schedule execute`
127
+ must repeat the same values and adds an idempotency key; the server rechecks
128
+ everything before atomically consuming the confirmation and scheduling. For
129
+ scripts, prefer `ROLINO_CONFIRMATION_TOKEN` over placing the short-lived token
130
+ in process arguments. Neither `--agent` nor any client-side flag bypasses the
131
+ server confirmation.
132
+
133
+ When YouTube is selected, the preview states whether confirmed execution starts
134
+ or resumes early private preparation. A schedule execution may return
135
+ `PENDING` while YouTube confirms a remote schedule change; that result is not a
136
+ published state, and the same idempotency key is safe to replay.
137
+
138
+ Immediate publishing uses the same server-enforced pattern. `posts publish
139
+ preview` validates the current version, exact destination set, readiness, live
140
+ provider health, and retry safety without publishing. `posts publish execute`
141
+ must repeat those values with the one-time confirmation and an idempotency key.
142
+ A successful execute durably queues the selected destinations for immediate
143
+ delivery; Rolino's worker performs provider calls and reconciles ambiguous
144
+ network results so an unsafe retry cannot duplicate a post. Use
145
+ `ROLINO_CONFIRMATION_TOKEN` for scripts instead of putting the token in process
146
+ arguments. YouTube remains `PREPARING` while its resumable upload and provider
147
+ processing are incomplete; only provider-confirmed visibility becomes
148
+ published.
149
+
150
+ The CLI cannot enable YouTube or Bluesky, or infer Google/YouTube approval.
151
+ Those are server-side deployment controls. Self-hosted operators should
152
+ complete the
153
+ [YouTube operations guide](https://github.com/deifos/rolino/blob/main/docs/integrations/youtube.md)
154
+ and
155
+ [Bluesky operations guide](https://github.com/deifos/rolino/blob/main/docs/integrations/bluesky.md)
156
+ before live testing.
157
+
158
+ Configuration is read from `ROLINO_URL`, `ROLINO_TOKEN`, `ROLINO_CONFIG_DIR`,
159
+ `ROLINO_OUTPUT`, `ROLINO_TIMEOUT`, and the short-lived
160
+ `ROLINO_CONFIRMATION_TOKEN`, with non-secret command options for base
161
+ URL, output, timeout, and request correlation. `ROLINO_TOKEN` takes precedence
162
+ over saved credentials. Piped stdout defaults to JSON; `--agent` adds stable
163
+ next-command suggestions. Timeouts accept integer milliseconds or values such
164
+ as `500ms`, `15s`, and `1m`.
165
+
166
+ Stable exit codes:
167
+
168
+ | Code | Meaning |
169
+ | ---: | --- |
170
+ | 0 | Success |
171
+ | 1 | Unexpected CLI failure |
172
+ | 2 | Usage/configuration error |
173
+ | 3 | Authentication required or expired |
174
+ | 4 | Permission or scope denied |
175
+ | 5 | Resource unavailable or not found |
176
+ | 6 | Conflict or stale version |
177
+ | 7 | Validation failure |
178
+ | 8 | Rate limited |
179
+ | 9 | Rolino server failure |
180
+ | 10 | Network failure |
181
+ | 11 | Timeout |
182
+ | 12 | User cancelled |
183
+
184
+ ## Support, security, and license
185
+
186
+ Stable releases are published only after the maintainer approves the release
187
+ gate. Report bugs through the
188
+ [Rolino issue tracker](https://github.com/deifos/rolino/issues) and security
189
+ issues through the repository's
190
+ [security policy](https://github.com/deifos/rolino/security/policy).
191
+
192
+ `@rolino/cli` is available under the MIT License.