cli_commands

Version
v 1.0.7
Last reviewed
Jun 3, 2026

Subcommands reference

drop

Drop an app and all its target states.

This will:

  • Revert all target states created by the app (e.g., drop tables, delete rows)
  • Clear the app’s internal state database

APP_TARGET: path/to/app.py, module, path/to/app.py:app_name, or module:app_name.

Usage:

bash
cocoindex drop [OPTIONS] APP_TARGET

Options:

OptionDescription
-f, --forceSkip confirmation prompt.
-q, --quietAvoid printing anything to the standard output, e.g. statistics.
--helpShow this message and exit.

init

Initialize a new CocoIndex project.

Creates a new project directory with starter files: 1. main.py (Main application file) 2. pyproject.toml (Project metadata and dependencies) 3. README.md (Quick start guide)

PROJECT_NAME: Name of the project (defaults to current directory name if not specified).

Usage:

bash
cocoindex init [OPTIONS] [PROJECT_NAME]

Options:

OptionDescription
--dir DIRECTORYDirectory to create the project in.
--helpShow this message and exit.

ls

List all apps.

If APP_TARGET (path/to/app.py or module) is provided, lists apps defined in that module and their persisted status, grouped by environment.

If APP_TARGET is omitted and --db is provided, lists all apps from the specified database.

Usage:

bash
cocoindex ls [OPTIONS] [APP_TARGET]

Options:

OptionDescription
--db TEXTPath to database to list apps from (only used when APP_TARGET is not specified).
--helpShow this message and exit.

show

Show the app’s stable paths.

If APP_TARGET is provided, loads the app from the module. Otherwise, --db and --app-name can be used to inspect an app directly from its database without loading the module.

Usage:

bash
cocoindex show [OPTIONS] [APP_TARGET]

Options:

OptionDescription
--db TEXTPath to database (used with —app-name when APP_TARGET is not specified).
--app-name TEXTApp name to inspect (used with —db when APP_TARGET is not specified).
--treeDisplay stable paths as a tree with component annotations.
--helpShow this message and exit.

update

Run an app in catch-up mode. With —live, run in live mode.

APP_TARGET: path/to/app.py, module, path/to/app.py:app_name, or module:app_name.

Usage:

bash
cocoindex update [OPTIONS] APP_TARGET

Options:

OptionDescription
-f, --forceSkip confirmation prompt.
-q, --quietAvoid printing anything to the standard output, e.g. statistics.
--resetDrop existing setup before updating (equivalent to running ‘cocoindex drop’ first).
--full-reprocessReprocess everything and invalidate existing caches.
-L, --liveRun in live mode (live components continue processing after initial update).
--helpShow this message and exit.

CocoIndex Docs Edit this page Report issue