upload-folder
One-shot ingest of a local folder into the workspace's graph. Walks the folder recursively, extracts text/metadata from every supported file, and creates the corresponding file and folder nodes.
For a continuous version that keeps syncing, use monitor. For ingestion that also propagates Windows / Active Directory ACLs, use upload-folder-with-permissions.
Syntax
Usage: curiosity-cli upload-folder --server <url> --token <token> --path <dir> --fetch-server-state <bool> [options]
curiosity-cli upload-folder \
--server https://my-workspace.example.com/ \
--token $CURIOSITY_TOKEN \
--path /mnt/shares/docs \
--source "Shared Drive" \
--fetch-server-state false
Options
| Option | Description |
|---|---|
--server |
Workspace URL. Alias -s. Required. |
--token |
Library Token. Alias -t. Required. |
--path |
Folder to upload. Alias -p. Required. |
--source |
Source label attached to every uploaded file entry. Default: the leaf directory name. |
--fetch-server-state |
Required. When true, fetch the list of already-uploaded files first so that files deleted locally also get removed from the workspace. Requires --sync-file-url. |
--bandwidth |
Cap upload rate in Mbps. Default: unlimited. |
--upload-to |
Public, Group, UserPublic, UserPrivate. See Common Options. Default Public. |
--target-uid |
UID of the Group/User when --upload-to is not Public. |
--extensions |
Semicolon-separated list of extensions to include, e.g. doc;docx;pdf. |
--root-path |
Local path prefix to strip before constructing the workspace path. |
--root-folder-name |
Name of the root folder to create in the workspace. Requires --root-path. |
--restore-access-time |
Restore the file's last-access timestamp after reading. Useful on hot+cold-storage shares. Default false. |
--sync-file-url |
Store the file URL alongside each node so it can be opened directly from the workspace. Default false. |
--in-place |
Only sync the file URL — don't copy bytes. Requires --sync-file-url and the server having direct access to the files. Default false. |
--timeout |
Per-request timeout in seconds. Default 90. |
Windows-only impersonation
When running on Windows the command also accepts --username, --password, and --domain to impersonate a different account for folder/file reads — useful for shares that the CLI's own account cannot read.
Filtering
# Only PDFs and Word documents under 1 GB/s
curiosity-cli upload-folder -s $URL -t $TOKEN -p /mnt/docs \
--extensions "pdf;doc;docx" \
--bandwidth 1000 \
--fetch-server-state false
Layout in the workspace
Given --path /mnt/docs/projects/atlas, the workspace will mirror that path:
workspace/
└── atlas/
└── ...
Use --root-path and --root-folder-name to rewrite the prefix:
curiosity-cli upload-folder -s $URL -t $TOKEN \
--path /mnt/docs/projects/atlas \
--root-path /mnt/docs \
--root-folder-name "Shared Drive"
Produces:
workspace/
└── Shared Drive/
└── projects/
└── atlas/
└── ...
Remarks
- Use
upload-folderfor a one-shot ingest of a local folder; for ongoing sync usemonitor, and to preserve Active Directory ACLs useupload-folder-with-permissions. --fetch-server-stateis required; set it totrue(with--sync-file-url) to mirror local deletions into the workspace.- Run
inspectfirst to see which files are supported, and use--extensions/--bandwidthto scope or throttle the upload.
See also
inspect— dry-run report of supported/unsupported files.monitor— keep the folder in sync continuously.upload-folder-with-permissions— preserve Active Directory ACLs.- Data Connector — for programmatic, idempotent ingest of non-file sources.
- Access control — to understand the ACL options on uploaded content.