Curiosity CLI

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.

Usage

# 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

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

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.

See also

© 2026 Curiosity CLI. All rights reserved.