Clearly AIDocs

CLI

Use the Clearly AI command line client to create projects, upload sources, start reviews, and fetch results.

The Clearly AI CLI is the clearly command for the Clearly AI HTTP API. Use it when you want to script common review setup without clicking through the web app.

What you need

  • A Clearly AI tenant URL, usually https://{tenant}.clearly-app.com.
  • A personal API key from Settings > Manage > Personal API Keys.
  • The Clearly AI CLI package provided by your Clearly AI contact.

Configure the CLI

Run the interactive setup:

clearly configure

Enter:

  • Base URL: your tenant URL, for example https://acme.clearly-app.com
  • API Key: your personal API key

The CLI stores profiles in ~/.clearly/config.

Use named profiles when you work across tenants:

clearly configure --profile staging
clearly configure list
clearly configure show --profile staging

Run a review

Create a project:

clearly projects create "Production API Security Review" \
  --description "Scope: public API, backend workers, and deployment config."

Upload a file or directory of sources:

clearly sources upload PROJECT_ID ./sources

List review templates:

clearly questionnaires list

Start a review:

clearly reviews create PROJECT_ID threat-model-v0.yaml

Fetch review status and results:

clearly reviews get REVIEW_ID

Poll until the review status is generated. The response is JSON and includes review metadata and answer blocks.

Project commands

clearly projects list
clearly projects get PROJECT_ID
clearly projects create "Project name" --description "Short scope"
clearly projects update PROJECT_ID --name "New name"
clearly projects update PROJECT_ID --description "Updated scope"
clearly projects delete PROJECT_ID

Deletion prompts for confirmation. Use --yes only in scripts where you already have a separate confirmation step.

Source commands

clearly sources upload PROJECT_ID ./architecture.pdf
clearly sources upload PROJECT_ID ./source-directory

When you pass a directory, the CLI uploads all files under that directory.

Review commands

clearly reviews create PROJECT_ID review-template-file.yaml
clearly reviews get REVIEW_ID

Use the review template filename returned by clearly questionnaires list.

Example project

If your account has access to the Clearly AI example repositories and the required review templates are installed in your tenant, you can list and run bundled examples:

clearly example --list
clearly example maestro

The bundled maestro example creates a project, downloads example sources from GitHub, uploads them, and starts the configured reviews.

FAQs