Cadenza CLI Reference

Complete reference for all Cadenza CLI commands. Authenticate, query the evolutionary database, import W&B projects, and generate LLM-ready context snapshots.

Project Flag

Most data query commands accept -p/--project. If omitted, Cadenza uses the default project from config. Set it with cadenza config defaults.project my-project.

Authentication

cadenza login [--token TOKEN] [--url URL]

Authenticate with an API token and store credentials locally. Tokens must start with evodb_sk_. If --token is omitted, you'll be prompted interactively.

--tokenAPI token (interactive prompt if omitted)
--urlAPI server URL (default: https://api.myluca.ai)
Examplebash
cadenza login --token evodb_sk_your_token_here
cadenza status

Display the current authentication status and configured API endpoint. Shows a token prefix and the base URL.

Examplebash
cadenza status
# token: evodb_sk_abc12...
# endpoint: https://api.myluca.ai
cadenza logout

Remove locally stored credentials by deleting ~/.cadenza/config.toml.

Configuration

cadenza config [key] [value]

Get or set configuration values using dot-notation keys. Three usage modes:

List all config values

List allbash
cadenza config

Get a specific value

Get valuebash
cadenza config defaults.project

Set a value

Set valuebash
cadenza config defaults.project my-project

Valid keys

wandb.entitywandb.api-keydefaults.projectsampling.p-exploresampling.p-exploitevodb.max-dimensionsevodb.elite-archive-sizeevodb.max-islands

Data Queries

cadenza projects

List all projects accessible with the current API token.

Examplebash
cadenza projects
# NAME          SLUG            CREATED
# my-project    my-project      2025-01-15
cadenza genotype [-p PROJECT]

Show the active genotype and its behavioral dimensions for a project. Behavioral dimensions define the axes of the search space.

-p, --projectProject name (uses config default if omitted)
Examplebash
cadenza genotype -p my-project
cadenza islands [-p PROJECT]

List all islands (subpopulations) and their population statistics for a project.

-p, --projectProject name (uses config default if omitted)
Examplebash
cadenza islands -p my-project
# ISLAND                DESCRIPTION                     PHENOTYPES
# learning-rates        Explores LR schedules           42
# architectures         Different model architectures    28
cadenza experiments -i ISLAND [-p PROJECT] [--page N]

List experiments within a specific island, with pagination. Returns 10 experiments per page.

-i, --islandIsland name Required
-p, --projectProject name (uses config default if omitted)
--pagePage number (default: 1)
Examplebash
cadenza experiments -i learning-rates -p my-project --page 2
cadenza elites [-p PROJECT]

Show the elite archive — the top-performing experiments across all islands. Each elite includes fitness scores and behavioral coordinates.

-p, --projectProject name (uses config default if omitted)
Examplebash
cadenza elites -p my-project
cadenza sample [-p PROJECT] [--top-phenotypes N]

Generate a compact LLM-ready JSON context snapshot. This is the primary command for AI agent consumption — it combines the genotype, island summaries, and top elites into a single JSON output.

-p, --projectProject name (uses config default if omitted)
--top-phenotypesNumber of top phenotypes to include (default: 2)
Examplebash
cadenza sample -p my-project --top-phenotypes 5
# Outputs compact JSON:
# {"genotype":{...},"islands":[...],"elite_archive":[...]}

Tip for agents: Pipe the output directly into your LLM context. The JSON is already optimized for token efficiency.

Import

cadenza import <wandb-project>

Start importing a W&B project into the evolutionary database. Requires wandb.entity and wandb.api-key to be configured first.

Optional EvoDB tuning parameters from config are applied automatically: evodb.max-dimensions, evodb.elite-archive-size, evodb.max-islands.

Examplebash
# Configure W&B first
cadenza config wandb.entity my-team
cadenza config wandb.api-key wand_abc123...

# Import a project
cadenza import my-wandb-project
cadenza import list

List all import jobs and their status. Possible statuses: queued | running | completed | failed.

Examplebash
cadenza import list
cadenza add --run_id RUN_ID [-p PROJECT] [--wandb-project NAME]

Add a single W&B run to an existing project. This is useful for incrementally ingesting new runs without re-importing an entire project. Requires wandb.entity and wandb.api-key to be configured first.

--run_idW&B run ID to add Required
-p, --projectEvoDB project name (uses config default if omitted)
--wandb-projectW&B project name (defaults to EvoDB project name if omitted)
Examplebash
# Add a single run to the default project
cadenza add --run_id abc123def

# Add a run to a specific project
cadenza add --run_id abc123def -p my-project --wandb-project my-wandb-project

Utilities

cadenza schema

Output the full command schema as machine-readable JSON. Designed for agent self-discovery — an AI agent can call this to learn all available commands, their arguments, and descriptions.

Examplebash
cadenza schema
# {"commands":[{"name":"login","description":"...","args":[...]},...],"auth":"..."}

Exit Codes

Cadenza uses structured exit codes for programmatic error handling.

CodeNameDescription
0OKSuccess
1ERR_USAGEInvalid arguments or missing config
2ERR_AUTHAuthentication failed or not logged in
3ERR_NOT_FOUNDResource not found
4ERR_RATE_LIMITRate limit exceeded
5ERR_CLIENTClient-side error (4xx)
10ERR_SERVERServer-side error (5xx)
11ERR_NETWORKNetwork connectivity issue
12ERR_UNEXPECTEDUnexpected error