Skip to main content
Use ttr drive to upload local files and inspect directory listings or object metadata in Tuturuuu Drive with your signed-in operator CLI session.

Commands

Use internal for the root workspace, personal for your personal workspace, or a workspace UUID.

Upload

  • Streams the local file to the workspace’s configured storage provider through the signed upload intent flow (upload-url → PUT → finalize-upload).
  • Enforces the same 100 MB file-size limit and allowed-type rules as the Drive UI, verifies the server-side stored size on finalization, and prints { path, size, sha256 } with --json.
  • Creates no public or signed share link. Uploaded files inherit normal workspace Drive permissions only; Wiki pages can reference them via the per-request share redirect /api/v1/workspaces/<wsId>/storage/share?path=<path>.

Read-only inspection

  • ttr drive list lists files and folders under --path (or the Drive root).
  • ttr drive stat <path> returns { path, size, contentType, updatedAt, provider } for a single Drive object without generating a download link.

Scoped Drive session security model

Raw CLI sessions (target_app: "platform", cli:access) are refused directly on every workspace storage route (upload-url, finalize-upload, list, stat, share, object, move, rename, folders, analytics). Instead, each ttr drive invocation exchanges the operator’s CLI session at POST /api/v1/workspaces/<wsId>/storage/cli-session for a short-lived drive-target app session:

Regression coverage

  • packages/auth/src/cli-drive-session.test.ts
  • apps/web/src/app/api/v1/workspaces/[wsId]/storage/cli-session/route.test.ts
  • apps/web/src/app/api/v1/workspaces/[wsId]/storage/drive-upload-auth.test.ts
  • apps/web/src/app/api/v1/workspaces/[wsId]/storage/stat/route.test.ts
  • packages/sdk/src/cli/drive.test.ts