Skip to main content
All CollectionsDeveloper Guides
Introducing the Kodexa CLI
Introducing the Kodexa CLI

Learn a few of the capabilities of the Kodexa CLI

Updated over 2 months ago

Here's a support article covering the kodexa CLI for users who want to interact with the Kodexa platform through the command line interface:


Kodexa CLI User Guide

The Kodexa CLI is a powerful command-line interface tool that allows you to interact with an instance of the Kodexa platform. You can use it to manage and automate various tasks, such as uploading files, deploying components, querying document stores, and more.

Installation

To install the Kodexa CLI, ensure you have Python installed and run the following command:

pip install kodexa

Basic Commands

Below is an overview of the key commands available in the Kodexa CLI:

  1. Login to Kodexa Platform: Log in to the Kodexa platform using your profile.

    kodexa login

    You will be prompted to enter the Kodexa URL, token, and profile name.

  2. Upload Files: Upload files to a specific document store on the Kodexa platform.

    kodexa upload <store-ref> <file-paths> --url <kodexa-url> --token <access-token>
    • store-ref: Reference to the document store.

    • file-paths: Paths to the files to upload.

  3. Deploy Components: Deploy a component to a Kodexa platform instance from a file.

    kodexa deploy --file <path-to-file> --url <kodexa-url> --token <access-token>
  4. Query Document Stores: Query the documents in a specified document store.

    kodexa query <store-ref> "<query>" --url <kodexa-url> --token <access-token>
    • store-ref: Reference to the document store.

    • query: The query to run.

  5. Get Logs: Retrieve logs for a specific execution.

    kodexa logs <execution-id> --url <kodexa-url> --token <access-token>
  6. Download Implementations: Download the implementation of a model store.

    kodexa download_implementation <store-ref> --url <kodexa-url> --token <access-token>
  7. Delete Resources: Delete a specific resource by its reference.

    kodexa delete <object-type> <ref> --url <kodexa-url> --token <access-token>

Additional Features

  • Verbose Mode: You can enable verbose output using the -v option with most commands.

  • Packaging Extensions: The package command is available for packaging Kodexa extensions, which allows deploying resources and models easily.

Error Handling and Logging

The CLI has robust error handling and logging mechanisms. Any exceptions that occur are logged, and the execution time is recorded for debugging or performance tuning purposes.

Conclusion

The Kodexa CLI provides a comprehensive set of tools to interact with the Kodexa platform from the command line. For more detailed documentation and examples, you can explore the official Kodexa documentation.

Did this answer your question?