Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.kodexa.ai/llms.txt

Use this file to discover all available pages before exploring further.

Command Reference

This page covers the current KDX command surface. It focuses on Activity-centered resource work, GitOps metadata promotion, document operations, knowledge attachments, and secure operational setup.

Global Flags

Global flags can be used with most commands.
FlagDescription
-o, --output table|json|yaml|markdownOutput format for commands that support formatted output
--profile <name>Use a named profile instead of the current profile
--url <url>Override the profile URL
--api-key <key>Override the profile API key
--debugEnable debug logging
--log-level debug|info|warn|error|silentSet log level
--log-timestampsInclude timestamps in logs
--skip-production-confirmSkip production confirmation prompts and log the bypass
--strictTreat validation warnings as errors where supported

Authentication and Profiles

CommandPurpose
kdx login <url>Authenticate in a browser and save an API key
kdx login <url> --deviceUse device-code login for headless environments
kdx login <url> --no-browserPrint the login URL instead of opening a browser
kdx config set-profile <name> --url <url> --api-key <key>Create or update a profile
kdx config use-profile <name>Switch the current profile
kdx config list-profilesList configured profiles
kdx config current-profileShow the current profile
kdx config delete-profile <name>Delete a profile
Use profiles for local and interactive work. Use sync-config.yaml environment entries for GitOps deployment jobs.

Discovery

kdx api-resources

Lists resource types discovered from the platform OpenAPI contract.
kdx api-resources
kdx api-resources --refresh
kdx api-resources --schemes-only
FlagDescription
--refreshRefresh the local OpenAPI/resource cache
--schemes-onlyShow raw resource schemes without operation metadata
Use --refresh after a platform upgrade or when docs mention a resource type your local CLI cache does not know yet.

Resource Inspection

kdx get

Displays one or many resources.
kdx get <resource-type>
kdx get <resource-type> <id-or-slug>
Examples:
kdx get activity-plans
kdx get data-definitions -o json
kdx get projects --filter-name active
kdx get module invoice-module --download --download-path ./invoice-module.zip
FlagDescription
--filter-name <name>Apply a named filter from CLI presentation config
--downloadDownload a module implementation ZIP
--download-path <path>Output path for a module implementation download

kdx describe

Shows schema-aware detail for one resource.
kdx describe <resource-type> <id-or-slug>
Examples:
kdx describe activity-plan invoice-intake
kdx describe data-definition invoice-data

Resource Authoring

kdx validate

Validates a YAML resource file against the OpenAPI schema without sending it to the server.
kdx validate -f resources/activity-plans/invoice-intake.yaml
FlagDescription
-f, --filename <path>Resource YAML file to validate

kdx apply

Creates or updates a resource from YAML.
kdx apply -f resources/activity-plans/invoice-intake.yaml
FlagDescription
-f, --filename <path>Resource YAML file to apply
There is no general kdx create command. Use kdx apply -f <file> for declarative create-or-update.

kdx delete

Deletes a resource using the delete operation discovered for that resource type.
kdx delete <resource-type> <id-or-slug> [--force]
Examples:
kdx delete data-form invoice-review-form
kdx delete activity-plan invoice-intake --force

Dynamic API Operations

kdx run

Lists and executes resource-specific operations discovered from OpenAPI. Use it when an operation exists in the API but does not have a dedicated high-level CLI command.
kdx run <resource-type>
kdx run <resource-type> <operation> --param value --body '{"key":"value"}'
Examples:
kdx run activity-plans
kdx run document-families assess --id a700ca3e-38e7-4e63-8974-59c2e9058cf3

Metadata Sync

kdx sync pull

Downloads metadata resources from an environment into a metadata repository.
kdx sync pull --target ap-team --env dev
Common flags:
FlagDescription
--target <name>Target name from sync-config.yaml; repeatable
--env <name>Source environment name from sync-config.yaml
--from-profile <name>Source profile override
--from-url <url>Source URL override
--from-api-key <key>Source API key override
--skip-missingSkip resources not found on the server
--discoverDiscover resources and generate or update a manifest
--discover-dir <dir>Set manifest metadata_dir during discovery
-f, --filter <regex>Filter resources by slug or project slug
--threads <n>Parallel pull workers

kdx sync push

Uploads local metadata files to a Kodexa environment.
kdx sync push --target ap-team --env dev --dry-run
kdx sync push --target ap-team --env dev
Common flags:
FlagDescription
--target <name>Target name from sync-config.yaml; repeatable
--env <name>Destination environment name
--to-profile <name>Destination profile override
--to-url <url>Destination URL override
--to-api-key <key>Destination API key override
--dry-runPreview actions without changing the server
-f, --filter <regex>Filter resources by slug
--forceOverwrite conflict-detected resources
--threads <n>Parallel push workers

kdx sync deploy

Deploys targets based on branch mappings, tag mappings, or explicit flags.
kdx sync deploy --branch main --dry-run
kdx sync deploy --target ap-team --env prod --confirm-all
Common flags:
FlagDescription
--target <name>Target name to deploy; repeatable
--env <name>Environment to deploy to
--branch <name>Branch name to use for branch mapping
--tag <name>Tag name to use for tag mapping
--dry-runPreview deployment
--forcePush despite sync conflicts
--confirm-eachConfirm each target before deployment
--confirm-allConfirm once before deploying all targets
-f, --filter <regex>Filter resources by slug
--output-json <path>Write deployment report JSON
--threads <n>Parallel deployment workers
The sync command also supports global sync flags --metadata-dir <path> and --config <path>.

Project Templates

kdx project create

Creates a project from a project template.
kdx project create \
  --template acme/ap-intake \
  --org acme \
  --name "AP Pilot" \
  --description "Pilot for invoice intake"
FlagDescription
--template <org/template>Project template reference
--org <org-slug>Destination organization
--name <name>New project name
--description <text>Optional project description

Document Store Operations

CommandPurpose
kdx store upload <store-ref> <file>Upload a source document
kdx store watch <document-family-id>Wait for a processing label
kdx store stats <store-name>Show store statistics
kdx store reindex <store-name>Trigger store reindexing
See Store Commands for details.

Document Family Operations

CommandPurpose
kdx document-family data <id>Export extracted JSON
kdx document-family content list <id>List content objects
kdx document-family content download <id> [content-id]Download a KDDB content object
kdx document-family add-label <id> <tag-id>Add a label
kdx document-family remove-label <id> <label-id>Remove a label
kdx document-family set-status <id> <status-id>Set status
See Document Family Commands for details.

Knowledge Attachments

CommandPurpose
kdx knowledge attach <item-ref> --file <path>Attach one file
kdx knowledge attach <item-ref> --folder <path>Zip and attach a folder
kdx knowledge download <item-ref>Download the attachment
See Knowledge Commands for details.

Organization Secrets

CommandPurpose
kdx secret list <org-slug>List secret names
kdx secret set <org-slug> <name>Set a secret interactively
kdx secret set <org-slug> <name> --from-env <env>Set from an environment variable
kdx secret delete <org-slug> <name>Delete a secret
See Secret Commands for details.

Local Document Commands

The kdx document command works with local .kddb files. It is the main CLI surface for local document inspection and debugging.
AreaCommands
Readinginfo, stats, text, page, grep, lines
Searchquery, find, locate, spatial find, spatial bbox
Structureprint, node, tags, features
Datadata objects, data attributes, data exceptions, data create, data set-attribute
Metadatametadata get, metadata set, external list, external get, external set, external delete
Filesnative list, native extract
Auditaudit, delta
See the Document Commands overview for the full local document command set.

Version

kdx version
Prints the CLI version, Git commit, and build date.