The Kodexa CLI provides several utility commands that help with various tasks. This page documents these useful utility commands.

Version Information

The version command displays the installed version of the Kodexa CLI:

kodexa version

This is useful for checking compatibility and ensuring you’re using the latest version.

Sending Events

The send-event command allows you to send events to assistants:

kodexa send-event <event-id> --type <event-type> --data <event-data>

For example:

kodexa send-event assistant-id --type document-processed --data '{"documentId": "123"}'

Getting Execution Logs

The logs command allows you to view logs for a specific execution:

kodexa logs <execution-id>

This displays detailed logs for debugging purposes.

Downloading Model Implementations

The download-implementation command allows you to download the implementation of a model store:

kodexa download-implementation <store-ref> [<output-file>]

For example:

kodexa download-implementation org-name/model-store model-implementation

Generating Data Classes

The dataclasses command generates Python dataclasses from a taxonomy file:

kodexa dataclasses <taxonomy-file> --output-path <path> --output-file <file>

This is useful for creating strongly typed Python classes that match your taxonomy.

Examples

Check CLI version

kodexa version

Send an event to an assistant

kodexa send-event my-assistant --type document-ready --data '{"path": "/documents/invoice.pdf"}'

View execution logs

kodexa logs execution-12345

Download a model implementation

kodexa download-implementation org/model-store my-model-implementation

Generate dataclasses from a taxonomy

kodexa dataclasses taxonomy.json --output-path ./src --output-file data_models.py