export-workspace-definitions

Downloads the workspace's custom code — custom endpoints, custom tasks (scheduled tasks), and custom indexes — as either a single .zip archive or an extracted directory tree. The output is the same format expected by import-workspace-definitions.

Combined with version control, this is the building block for GitOps-style promotion of custom code between dev, staging, and production workspaces.

Syntax

Usage: curiosity-cli export-workspace-definitions --server <url> --token <token> --export-path <path> [--unzip]

# As a single zip
curiosity-cli export-workspace-definitions \
  --server      https://my-workspace.example.com/ \
  --token       $CURIOSITY_TOKEN \
  --export-path ./workspace-definitions.zip

# As an extracted folder, ready to commit to git
curiosity-cli export-workspace-definitions \
  --server      https://my-workspace.example.com/ \
  --token       $CURIOSITY_TOKEN \
  --export-path ./workspace-definitions \
  --unzip

Options

Option Description
--server Workspace URL. Alias -s. Required.
--token Library Token. Alias -t. Required.
--export-path Output .zip file path or output directory when --unzip is set. Required.
--unzip Download as zip, then extract into the path and delete the temporary zip. When false, the path must end in .zip. Alias -u. Default false.

Promotion pattern

# In CI, on every merge to main in your "workspace-config" repo:
curiosity-cli export-workspace-definitions \
  -s $DEV_URL -t $DEV_TOKEN --export-path ./definitions --unzip
git add definitions
git commit -m "Snapshot dev workspace definitions"
git push

# Then, on promotion:
curiosity-cli import-workspace-definitions \
  -s $STAGING_URL -t $STAGING_TOKEN --import-path ./definitions --zip

Keep the same artifact moving from staging to prod — re-export at each step only when you intend to capture changes made in that environment.

What's inside the export

The export captures everything you've authored under Manage → Custom Code in the workspace UI:

  • Custom endpoints (with their authorization and path-matching settings).
  • Custom AI tools.
  • Custom indexes.
  • Scheduled tasks.

Uploaded data, ingested files, users, and tokens are not included — those are workspace state, not definitions. Use the standard workspace backup tooling for state.

Remarks

  • Use export-workspace-definitions to capture custom endpoints, AI tools, indexes, and scheduled tasks for version control or promotion between environments.
  • Pass --unzip to get a directory tree ready to commit; otherwise --export-path must end in .zip.
  • Only definitions are exported — uploaded data, files, users, and tokens are not. Apply the output with import-workspace-definitions.

See also

© 2026 Curiosity. All rights reserved.