@docyrus/animaguru 0.8.0 → 0.9.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 CHANGED
@@ -80,7 +80,7 @@ CLI 0.7.1 can select a cloud workspace for project listing, project creation, an
80
80
  animaguru workspaces list
81
81
  animaguru workspaces use team_0123456789abcdef0123456789abcdef
82
82
  animaguru projects list
83
- animaguru projects create --name "Shared cast" --style pixel
83
+ animaguru projects create --name "Shared cast"
84
84
  animaguru credits
85
85
  animaguru workspaces use personal
86
86
  ```
@@ -89,10 +89,12 @@ Use a team ID returned by `workspaces list`. The choice is saved per server in t
89
89
 
90
90
  ## Agent workflow
91
91
 
92
+ Remote projects are neutral containers. `projects create` has no `--style` flag. Choose a style when generating a sprite; local film setup keeps its separate style interview.
93
+
92
94
  ```sh
93
- animaguru projects create --name "Forest cast" --style pixel
95
+ animaguru projects create --name "Forest cast"
94
96
  # Read the returned project.id and use it below.
95
- animaguru generate PROJECT_ID --name "Knight" --description "A blue knight with a red scarf" --actions idle,walk --yes
97
+ animaguru generate PROJECT_ID --name "Knight" --description "A blue knight with a red scarf" --style pixel --actions idle,walk --yes
96
98
  animaguru jobs wait PROJECT_ID JOB_ID --timeout 600
97
99
  animaguru jobs list PROJECT_ID
98
100
  animaguru projects get PROJECT_ID
@@ -123,7 +125,7 @@ animaguru models PROJECT_ID --image-model gpt-image-2.5 --video-model pruna/p-vi
123
125
  # Either selection can be changed independently:
124
126
  animaguru models PROJECT_ID --video-model heygen/heygen-video-1
125
127
  # Or choose them when creating a project:
126
- animaguru projects create --name "Forest cast" --style pixel \
128
+ animaguru projects create --name "Forest cast" \
127
129
  --image-model gpt-image-2.5 --video-model heygen/heygen-video-1
128
130
  ```
129
131
 
@@ -136,7 +138,7 @@ These flags are available in CLI 0.2.0 and later. Rerun the macOS installer to u
136
138
  CLI 0.4.0 adds standalone assets alongside the existing sprite commands. Use any project, or create an empty one first. `assets list` returns saved asset ids, image blob hashes for video references, and the models configured on that server.
137
139
 
138
140
  ```sh
139
- animaguru projects create --name "Adventure assets" --style hd-cartoon
141
+ animaguru projects create --name "Adventure assets"
140
142
  animaguru assets list PROJECT_ID
141
143
 
142
144
  animaguru assets generate PROJECT_ID --type image --name "Forest" \
@@ -265,17 +267,63 @@ Run `animaguru auth login`, then submit from a finished AnimaGuru video workspac
265
267
  ```sh
266
268
  animaguru submit --yes # Builds and hosts HTML5; private
267
269
  animaguru submit --share "alex@example.com" --yes # Private review for a verified account
268
- animaguru submit --visibility public --yes # Listed at https://animaguru.com/videos
269
270
  animaguru submit --file production/exports/film.mp4 --poster public/assets/cover.png --yes
270
271
  animaguru submit --file production/exports/film.zip --dry-run
271
272
  ```
272
273
 
273
274
  An optional positional directory selects the workspace; file and poster paths are relative to it. HTML5 exports upload the compiled animation and local media; source code, project instructions, credentials and generation receipts are not submitted. MP4 and AnimaGuru HTML5 ZIP are both supported. The CLI prints the video ID and full watch URL. Public HTML5 videos offer embed markup on the watch page; private sharing requires the selected AnimaGuru users to sign in.
274
275
 
276
+ To request public gallery publication, upload privately, open the video in My videos on the website, choose Share → Public, and accept the public video sharing agreement. Staff must approve the submission before anyone else can access its public link, download or embed. Direct CLI public-sharing requests without agreement acceptance are refused by the API.
277
+
275
278
  `videos list --scope mine|shared|public` lists films. Owners can edit metadata, change visibility and replace recipients on the website, or use `videos share VIDEO_ID --visibility private --share "alex@example.com" --yes`. `videos delete VIDEO_ID --yes` removes the film and files. Making a film private or removing a recipient revokes access to existing playback links.
276
279
 
277
280
  Uploads are divided into SHA-256 verified 8 MiB parts. Interrupted submissions print their video ID: inspect with `videos get VIDEO_ID`, retry a fully uploaded film with `videos complete VIDEO_ID`, or delete the unfinished draft before resubmitting. Completion is idempotent. HTML5 ZIPs allow 64 MiB compressed / 96 MiB expanded with 500 entries and 32 MiB per asset; MP4s allow 512 MiB; PNG/JPEG/WebP covers allow 2 MiB. Uploads are available to verified accounts with a 2 GiB video library allowance. Hosting does not run paid generation jobs.
278
281
 
282
+ ## Upload directly to YouTube
283
+
284
+ CLI 0.9.0 adds `animaguru youtube`. Authorization and uploads run on your computer and call Google directly. You do not need an AnimaGuru account or a hosted video. The website, Worker, R2 and D1 are not involved.
285
+
286
+ Enable YouTube Data API v3 in your Google Cloud project, configure the Google Auth Platform consent screen and test users, and create an OAuth client of type **Desktop app**. Download its JSON file outside your project. A web OAuth client or Gemini API key will not work. The CLI uses Google's system-browser authorization with PKCE and a temporary `127.0.0.1` callback listener. Google app verification and quota rules apply. See [Google's installed-app OAuth guide](https://developers.google.com/identity/protocols/oauth2/native-app).
287
+
288
+ ```sh
289
+ animaguru youtube auth login --client-file /absolute/path/desktop-client.json --yes
290
+ # Or, to also upload subtitles:
291
+ animaguru youtube auth login --client-file /absolute/path/desktop-client.json --captions --yes
292
+ animaguru youtube auth status
293
+ # --no-browser prints the URL; open it in a browser on this same computer.
294
+ ```
295
+
296
+ Login requests `youtube.upload` to send videos and `youtube.readonly` to identify and verify your selected channel. Add `--captions` to also upload subtitle tracks: YouTube's caption API requires Google's broader `youtube.force-ssl` permission, which also allows managing your videos, so it is requested only with that flag. To add it to an existing connection, log out and log in again with `--captions`. `--yes` acknowledges [YouTube's terms](https://www.youtube.com/t/terms), Google's data use under its [privacy policy](https://policies.google.com/privacy), and local credential storage. Choose your own channel in Google's authorization screen. `ANIMAGURU_YOUTUBE_CLIENT_FILE` can supply the client-file path. To switch channels, disconnect first.
297
+
298
+ Export your animation with the existing `npm run export:mp4` workflow, then use the saved MP4 path:
299
+
300
+ ```sh
301
+ animaguru youtube upload --file production/exports/film-en.mp4 \
302
+ --title "My film" --description "Made with AnimaGuru" \
303
+ --privacy private --made-for-kids no --synthetic-media yes --dry-run
304
+ # After reviewing the file, destination and visibility, replace --dry-run with --yes.
305
+ animaguru youtube upload --file production/exports/film-en.mp4 \
306
+ --title "My film" --description "Made with AnimaGuru" \
307
+ --privacy private --made-for-kids no --synthetic-media yes --yes
308
+ animaguru youtube uploads list
309
+ animaguru youtube uploads resume UPLOAD_ID --yes
310
+ animaguru youtube auth logout --yes
311
+ ```
312
+
313
+ Private is the default; `--privacy unlisted|public` changes it. You must choose `--made-for-kids yes|no` and `--synthetic-media yes|no` yourself. Follow [YouTube's synthetic-content disclosure guidance](https://support.google.com/youtube/answer/14328491); ordinary animation and realistic synthetic scenes can have different requirements. `--channel CHANNEL_ID` requires an exact match with your saved connection. Upload `--yes` confirms the destination, visibility and your rights to distribute the video. It does not spend AnimaGuru credits or submit it for AnimaGuru gallery review.
314
+
315
+ The optional positional directory sets the root for relative paths. The default title comes from the MP4's export receipt (`FILM.json`), then the film's `film.config.json`. `--animation NAME` selects a film in a multi-animation workspace. `--file` is required; export/rendering is a separate step. MP4s can be up to 256 GiB. Titles allow 100 characters and descriptions 5,000 UTF-8 bytes; neither may contain angle brackets. `--dry-run` checks the file and metadata without sign-in, uploads or network calls.
316
+
317
+ Subtitles: `npm run export:mp4` writes `FILM.srt` and `FILM.vtt` beside `FILM.mp4`. With the default `--captions auto`, the upload adds the `.srt` (or else the `.vtt`) as a caption track once the video arrives. `--captions FILE` chooses another `.srt`/`.vtt` file and `--captions none` skips subtitles. The language comes from `--caption-language`, a WebVTT `Language:` header, the export receipt or `film.config.json`. The track has no name by default, like YouTube Studio uploads; `--caption-name` sets one. `--dry-run` lists the subtitle file and language. Without caption permission, a found subtitle file is skipped with a note, and an explicitly chosen one is refused before any video bytes are sent. If adding captions fails after the video arrives, the video stays, the JSON includes `captionsError`, and `youtube uploads resume UPLOAD_ID --yes` adds them later. Burned-in `--burn-captions` exports have no subtitle files, so nothing is added to them.
318
+
319
+ Thumbnail: when `film.config.json` sets `"poster"` (seconds), the export also saves that frame as `FILM.jpg`. With the default `--thumbnail auto`, the upload sets `FILM.jpg` (or `.jpeg`/`.png`) from beside the MP4 as the video's custom thumbnail; `--thumbnail FILE` chooses another JPEG or PNG up to 2 MiB and `--thumbnail none` skips it. This uses the upload permission, not `--captions`. YouTube allows custom thumbnails only on verified channels (https://www.youtube.com/verify); if it refuses, the video stays, the JSON includes `thumbnailError`, and `youtube uploads resume UPLOAD_ID --yes` retries after verification. Repeating an upload command for an already uploaded video adds subtitles or a thumbnail it does not have yet.
320
+
321
+ Uploads run while the CLI is running. Progress and instructions go to stderr; the final JSON includes the YouTube video ID, watch URL and actual returned privacy. Google may still be processing the video. A saved SHA-256 fingerprint guards resumption; restore the original file if it changes. Retries query Google's saved byte position, including after a lost final response. Interrupted transfers reuse their upload ID and session; starting another upload of the same unfinished file is refused. Repeating a completed upload with identical metadata returns its receipt. An expired session requires inspecting YouTube Studio before intentionally starting a new upload. See [Google's resumable upload protocol](https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol).
322
+
323
+ Tokens, client configuration and resumable receipts stay under `~/.config/animaguru/youtube/`, or `ANIMAGURU_CONFIG_DIR/youtube/`, in owner-only directories (`0700`) and files (`0600`). They are never included in command JSON or sent to AnimaGuru. Treat a backup of that directory as credentials. Receipts older than 30 days are removed on the next listing/upload. Authorization is refreshed and channel identity checked when used; revoked grants remove local authorized data. Logout revokes Google access and removes local credentials/receipts while keeping your MP4s and YouTube videos. If Google cannot confirm revocation, the CLI links to [Google account permissions](https://security.google.com/settings/security/permissions). Manage published copies in YouTube Studio.
324
+
325
+ Only one YouTube command may run at a time. Normal cancellation releases its lock. After a forced process kill, check that no YouTube command is running before removing `youtube/operation.lock` in the configuration directory.
326
+
279
327
  ## One brand, many animations
280
328
 
281
329
  ```sh