# Curiosity CLI

The Curiosity CLI (curiosity-cli) is a command-line tool for interacting with the Curiosity Workspace. It allows you to manage deployments, ingest data, and perform administrative tasks.

# Installation

To install the CLI as a global .NET tool, run:

dotnet tool install Curiosity.CLI --global

To update the tool:

dotnet tool update Curiosity.CLI --global

# Common Arguments

Most commands require the following arguments to connect to your workspace:

  • --server or -s: The URL of your workspace (e.g., https://my-workspace.curiosity.ai/).
  • --token or -t: A Library Token (create one in Manage > Tokens > Library).
  • --timeout: Request timeout in seconds (default: 90).

# General Commands

# Test Connection

Tests the connection to the workspace and validates the token.

curiosity-cli test -s {URL} -t {TOKEN}

# Store Token

Encrypts and stores a token locally for a specific server. Once stored, you can use -t auto in other commands.

curiosity-cli store-token -s {URL} -t {TOKEN}

# Wait For

Waits until the workspace is ready (useful in CI/CD pipelines).

# Wait up to 30 minutes (default)
curiosity-cli wait-for -s {URL}

# Wait max 5 minutes
curiosity-cli wait-for -s {URL} --max-timeout 300

# Development & Deployment

# Serve

Hosts a local front-end build (created with Mosaik.FrontEnd) for testing.

curiosity-cli serve -p {PATH_TO_FRONTEND_BUILD} -s {URL}

# Upload Front End

Uploads a compiled front-end application to the workspace.

curiosity-cli upload-front-end -s {URL} -t {TOKEN} -p {PATH_TO_FRONTEND_BUILD} --auto-patch

# Export Workspace Definitions

Exports custom code (Tasks, Indexes, Endpoints) from the workspace to a local folder.

curiosity-cli export-workspace-definitions -s {URL} -t {TOKEN} -p {OUTPUT_FOLDER}

# Import Workspace Definitions

Imports custom code (Tasks, Indexes, Endpoints) from a local folder to the workspace.

curiosity-cli import-workspace-definitions -s {URL} -t {TOKEN} -p {SOURCE_FOLDER} --delete-others

# Inspect

Analyzes a folder and provides a summary of supported and unsupported files before ingestion.

curiosity-cli inspect -p {FOLDER_PATH}

# Data Ingestion

# Upload Folder

Uploads a local folder to the workspace once.

curiosity-cli upload-folder -s {URL} -t {TOKEN} -p {FOLDER_PATH} --source "MyDocs"

Options:

  • --extensions: Filter by extension (e.g., doc;pdf).
  • --bandwidth: Limit upload speed (Mbps).
  • --upload-to: Destination (Public, Group, UserPublic, UserPrivate).
  • --target-uid: UID of the Group or User (required if not Public).
  • --sync-file-url: Generate direct access URLs for files.

# Monitor

Continuously watches a folder and syncs changes to the workspace.

curiosity-cli monitor -s {URL} -t {TOKEN} -p {FOLDER_PATH} --fetch-server-state

# Ingest PST

Extracts and uploads emails from a PST file.

curiosity-cli ingest-pst -s {URL} -t {TOKEN} -p {PST_FILE} --source "Archive"

# Git Sync

Syncs a Git repository to the workspace (used internally by the Git Connector).

curiosity-cli git-sync -s {URL} -t {TOKEN} ...

# Advanced (Windows Only)

# Upload/Monitor with Permissions

These commands upload files along with their Active Directory Access Control Lists (ACLs), ensuring that users in the workspace only see files they have permission to access.

# Upload with permissions
curiosity-cli upload-folder-with-permissions -s {URL} -t {TOKEN} -p {PATH} -c {CACHE_FILE}

# Monitor with permissions
curiosity-cli monitor-with-permissions -s {URL} -t {TOKEN} -p {PATH} -c {CACHE_FILE}