The Kodexa CLI provides commands for managing projects, including exporting and importing projects between environments. This page explains how to manage projects using the CLI.

Exporting Projects

The export-project command allows you to export a project and its associated resources to a local zip file:

kodexa export-project <project-id> --output <output-path>

For example:

kodexa export-project 12345 --output /path/to/project-export.zip

This will create a zip file containing all the project resources, including:

  • Project metadata
  • Associated assistants
  • Document stores
  • Data stores
  • Models
  • Other related components

Importing Projects

The import-project command allows you to import a project from a previously exported zip file:

kodexa import-project <path-to-zip>

For example:

kodexa import-project /path/to/project-export.zip

This will:

  1. Create the project in the target environment
  2. Import all associated components
  3. Maintain relationships between components
  4. Set up necessary permissions

Bootstrapping Projects

The bootstrap command allows you to create a new project with default settings:

kodexa bootstrap <project-id>

This creates a new project with basic metadata and example implementation.

Examples

Export a project to a file

kodexa export-project 12345 --output project-backup.zip

Import a project from a file

kodexa import-project project-backup.zip

Bootstrap a new project

kodexa bootstrap new-project-id

Best Practices

  1. Use project exports for backups before making significant changes
  2. Use project exports/imports to migrate between development and production environments
  3. Name exported files with version information for better tracking
  4. Review imported projects after import to ensure all components were correctly created