Skip to main content
Drive commands require a Personal Access Token (cp_pat_...) with the ACCESS_DRIVE scope.

Browse the Drive Tree

copera drive tree
Output:
{
  "Nodes": [
    {
      "_id": "65b6c7d8e9f0a1b2c3d4e5f6",
      "name": "Design Assets",
      "type": "folder",
      "owner": "64f1a2b3c4d5e6f7a8b9c0d1",
      "createdAt": "2025-05-18T13:20:44.501Z",
      "updatedAt": "2025-11-02T09:15:33.218Z",
      "hasChildren": false
    },
    {
      "_id": "66a7b8c9d0e1f2a3b4c5d6e7",
      "name": "Team Meetings",
      "type": "folder",
      "hasChildren": true,
      "children": [
        {
          "_id": "66a7b8c9d0e1f2a3b4c5d6e8",
          "name": "Kickoff Q2",
          "type": "folder",
          "hasChildren": true,
          "children": [
            {
              "_id": "66a7b8c9d0e1f2a3b4c5d6e9",
              "name": "Kickoff Q2 - 03/10/2026 Whiteboard",
              "type": "file",
              "mimeType": "application/vnd.excalidraw+json",
              "size": 1840
            }
          ]
        }
      ]
    }
  ],
  "TotalItems": 12,
  "Truncated": false
}
Browse a subtree or control depth:
copera drive tree --parent <folder-id>   # start from a folder
copera drive tree --depth 5              # deeper nesting (1-10)

Get File Details

copera drive get <file-id>
Output:
{
  "_id": "67d8e9f0a1b2c3d4e5f6a7b8",
  "name": "quarterly-report.pdf",
  "type": "file",
  "owner": "64f1a2b3c4d5e6f7a8b9c0d1",
  "createdAt": "2026-02-14T16:33:07.892Z",
  "updatedAt": "2026-02-14T16:33:07.892Z",
  "mimeType": "application/pdf",
  "size": 245120
}

Search Files

copera drive search "report"
Output:
{
  "hits": [
    {
      "_id": "67d8e9f0a1b2c3d4e5f6a7b8",
      "name": "quarterly-report.pdf",
      "type": "file",
      "mimeType": "application/pdf",
      "size": 245120,
      "createdAt": "2026-02-14T16:33:07.892Z",
      "updatedAt": "2026-02-14T16:33:07.892Z"
    }
  ],
  "totalHits": 1
}

Download Files

copera drive download <file-id>                # download to current directory
copera drive download <file-id> -o report.pdf  # download to specific path
The CLI fetches a signed CloudFront URL and downloads the file for you.

Upload Files

Single file

copera drive upload ./report.pdf
copera drive upload ./report.pdf --parent <folder-id>

Recursive directory upload

copera drive upload ./project-assets/ --parent <folder-id>
The CLI automatically:
  • Creates matching folder structures in the drive
  • Splits large files into multipart chunks via S3 presigned URLs
  • Uploads parts concurrently (default: 4 concurrent uploads)
  • Shows a progress bar when running in a TTY
Upload flags:
FlagDefaultDescription
--parentrootTarget folder ID
--concurrency4Number of concurrent part uploads
--chunk-size10 MBSize of each upload chunk

Create Folders

copera drive mkdir "New Folder"               # create at root
copera drive mkdir "Sub Folder" --parent <id> # create inside a folder

Common Workflows

Upload a release artifact into a folder

1

Create a folder for the release

copera drive mkdir "Release v2.1.0"
Copy the folder id from the output.
2

Upload the build artifacts

copera drive upload ./dist/ --parent <folder-id>
3

Verify the upload

copera drive tree --parent <folder-id>

Search and download

# Find a file
copera drive search "quarterly report" --json | jq '.[0]._id'

# Download it
copera drive download <file-id> -o quarterly-report.pdf