VideoReview Maintenance CLI
A maintenance CLI for administrators that runs separately from VideoReview.
Note: prebuilt binaries are on the GitHub Releases page (video-review-cli-<OS>-<Architecture>).
1. Generate an API Token
Section titled “1. Generate an API Token”The maintenance CLI needs an API Token.
An admin generates it on the admin screen (API Token guide).
2. Set the environment variables
Section titled “2. Set the environment variables”The URL of the VideoReview server
VIDEO_REVIEW_SERVER_URL
The generated API Token
VIDEO_REVIEW_API_TOKEN
You can also pass them on the command line.
go run . --server http://xxx.xxx.xxx.xxx:3489 --token xxxxxx command --video_id xxx
Note: --server starts with http:// or https://.
Note: put --server and --token before the command name.
3. Commands
Section titled “3. Commands”Create the first administrator
Section titled “Create the first administrator”go run . bootstrap --email Nijika@example.com --pass 123abc
Note: the first administrator can also be created on the web screen.
Create a user
Section titled “Create a user”go run . create-user --name Nijika --email Nijika@example.com --pass 123abc
Export users to a CSV file
Section titled “Export users to a CSV file”go run . export-users --file users.csv
Create and update users from a CSV file
Section titled “Create and update users from a CSV file”go run . import-users --file users.csv
CSV example
Section titled “CSV example”| id | name (required) | pass | role | active | |
|---|---|---|---|---|---|
| Bocchi | bocchi@example.com | secret01 | viewer | ||
| 9b2f6c1e-4a7d-4e0b-8f3a-2c5d7e9a1b40 | Nijika | nijika@example.com | admin | false |
Note: a row without id creates a user. email and pass are required.
Note: a row with id updates that user. An empty cell keeps the current value.
Note: when creating, an empty role means viewer and an empty active means true.
Note: export-users leaves pass empty. Fill it in only to reset the password.
Note: save the file as UTF-8.
Get the video list (JSON)
Section titled “Get the video list (JSON)”go run . get-videos
go run . get-videos --include_revisions true
go run . get-videos --filter_tree "battle"
Note: --filter_tree narrows the list to titles or folder keys that contain the text.
Get a video's revision information (JSON)
Section titled “Get a video's revision information (JSON)”go run . get-videos-rev --video_id {uuid}
Soft-delete a video
Section titled “Soft-delete a video”go run . delete-video --video_id {uuid}
Delete a revision
Section titled “Delete a revision”go run . purge-revision --video_id {uuid} --revision 1
Note: this also deletes the files, so it cannot be undone.
Re-encode a video
Section titled “Re-encode a video”go run . reencode-video --video_id {uuid}
Note: this only queues the video; a worker encodes it afterwards.
Upload a video
Section titled “Upload a video”go run . upload-video --title "title" --folder_key "folder_key" --scene_path "scene_path" --video_path "/path/to/video.mp4"
To register the files whose VCS changes matter at the same time, add --vcs_watch_paths as a comma-separated list.
go run . upload-video --title "title" --folder_key "folder_key" --video_path "/path/to/video.mp4" --vcs_watch_paths "Assets/Scenes/Boss.unity,Assets/Prefabs"
Change a video's vcs_watch_paths
Section titled “Change a video's vcs_watch_paths”Replace the files whose VCS changes matter for a video already uploaded.
go run . patch-video --video_id {uuid} --vcs_watch_paths "Assets/Scenes/Boss.unity,Assets/Prefabs"
Create thumbnails
Section titled “Create thumbnails”go run . create-video-tmb --video_id {uuid}
go run . create-video-tmb-all
Note: ffmpeg is needed on the PC that runs the CLI.
Get comments
Section titled “Get comments”go run . get-comments --video_id {uuid}
Set tags and a summary
Section titled “Set tags and a summary”go run . annotate-video-rev --video_rev_id {uuid} --tags "A,B,C" --summary "summary text"
Note: only the fields you pass change (with only --tags, the summary stays as it is).
Upload a video's event context
Section titled “Upload a video's event context”go run . upload-video-event-context --video_rev_id {uuid} --json_path "events.json"
The JSON is an array of events.
[ { "kind": "log", "startMs": 1200, "endMs": 1800, "data": "Boss spawned" }, { "kind": "subtitle", "startMs": 3000, "endMs": 5000, "data": "Here it comes" }]Note: kind is set on each event.
Note: each upload replaces the events of the same kind on that revision.
Warm the VCS cache
Section titled “Warm the VCS cache”Fetch the VCS changes for a period before people open the Changes tab.
go run . warm-vcs-cache --days 30
go run . warm-vcs-cache --from 2026-03-01T00:00:00Z --to 2026-04-01T00:00:00Z
Note: days already fetched are skipped.
Note: add --refresh to fetch them again.
Note: write the dates in UTC, ending with Z.