Skip to main content

kawa-dsl

Terraform-like CLI for managing KAWA workspaces as code — datasources, sheets, views, dashboards, scripts, workflows, agents, artifacts and skills are defined in TOML files under dsl/ and pushed to KAWA via kawa commit.

Install

pip install kawa-dsl

After installation, kawa is available on your PATH:

kawa --help

Configure

The CLI talks to your KAWA server using two environment variables. Set them in your shell, or drop a .env file in the directory you run kawa from — it is picked up automatically.

Variable Required Description
KAWA_API_URL yes Base URL of your KAWA server, e.g. https://kawa.mycompany.com. No trailing slash.
KAWA_API_KEY yes API key from the KAWA UI → Settings → API keys. Sent as Authorization: Bearer <key>.
KAWA_DSL_HOME no Where local config lives. Defaults to ./.kawa (cwd-relative).

Example .env:

KAWA_API_URL=https://kawa.mycompany.com
KAWA_API_KEY=ka_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Quick start

mkdir my-workspace && cd my-workspace
kawa init                          # creates .kawa/ in cwd
kawa checkout <workspace_id>       # clones the workspace into ./dsl/
# edit files under dsl/
kawa plan                          # preview what would change
kawa commit                        # push changes back to KAWA

Workspace layout

kawa checkout materializes the workspace as one TOML file per entity:

my-workspace/
├── workspace.toml        # workspace binding
├── dsl/
│   ├── scripts/          # script metadata (source lives in scripts/)
│   ├── datasources/
│   ├── sheets/
│   ├── views/            # one file per view, bound to its sheet by tag
│   ├── dashboards/
│   ├── workflows/
│   ├── agents/
│   ├── artifacts/        # versioned artifact ledgers
│   └── skills/           # versioned skill ledgers
├── scripts/              # Python/SQL source files
├── files/                # file-datasource blobs
└── data/                 # editable-datasource row snapshots (export only)

Every entity carries an immutable_tag — a rename-proof identity that is stable across servers. Bundles produced by kawa export are addressed by tag, which is what makes them portable to any workspace on any server.

Commands

Workspace lifecycle

Command Description
kawa init Initialize $KAWA_DSL_HOME and print setup instructions
kawa checkout <ws_id> Clone a workspace into ./dsl/
kawa status Show branch, workspace, user, connection checks
kawa app list List workspaces accessible to the current user
kawa app create <name> Create a new workspace
kawa list Show workspace contents as a tree

Plan & apply

Command Description
kawa plan Preview what would change (read-only)
kawa commit Refresh + plan + apply (--yes to skip the prompt, --delete to allow deletions)
kawa refresh Rebuild local state from KAWA (never touches dsl/ files)
kawa pull Pull fresh KAWA state, preserving local changes
kawa check Dry-run scripts and validate sheet formulas before pushing

Transfer between workspaces & servers

Command Description
kawa inventory [--json] List every entity per kind: name, description, immutable tag, created date, owner
kawa export Export the workspace to a portable ZIP bundle
kawa export --no-data Schema only: no file-datasource blob (CSV, Excel, …) and no editable rows travel; non-data assets (widget images) still do
kawa export --anonymize-data The data travels with every value replaced and every column's KAWA type preserved (text/integer/decimal/boolean/date/date_time re-infer identically on import). Exclusive with --no-data
kawa export --tags=t1,t2 Selective export: the named entities plus their dependency closure (sheet → datasource → script, view → sheet, dashboard → sheets, workflow → scripts/sub-workflows, …)
kawa export --tags=t1,t2 --no-deps Exactly the named entities, no closure — for targets that already hold the dependencies (tag-matched update-in-place)
kawa import <bundle.zip> --workspace-id=N Apply a bundle to any target workspace — --url/--api-key for another server, --plan-only for a dry run, --yes to apply without prompting
# move two dashboards (and everything they depend on) to another server
kawa inventory --workspace-id=12                  # find the tags
kawa export --workspace-id=12 --tags=sales_ab12cd34ef,ops_cd34ef56ab --output=partial.zip
kawa import partial.zip --workspace-id=7 --url=https://other-kawa.mycompany.com --api-key=ka_live_... --yes

Data

Command Description
kawa patch <sheet> --action INSERT|UPDATE|DELETE --rows '...' Insert / update / delete rows on an editable datasource
kawa run workflow <id-or-name> Execute a workflow
kawa run datasource <name> Trigger an ETL refresh
kawa datasources status <name> Latest ETL sync state
kawa workflows logs|status <name> Workflow execution logs / status

Scripts

Command Description
kawa scripts init --name "X" Start a script draft at scripts/X.py
kawa scripts checkout --name "X" Pull the live script source for editing
kawa scripts register --name "X" Publish (create-or-update, with check gate)
kawa scripts logs|status <name> Execution logs / status

Artifacts & files

Command Description
kawa artifact init|checkout|register Draft / edit / publish artifact versions
kawa artifact list|show|describe Inspect artifacts
kawa artifact query|patch|generate '<json>' Replay artifact-api calls
kawa artifact workflow run|status|definition Drive workflows through the artifact API
kawa files put <path> / kawa files get <fileId> <path> Upload / download files

Skills

Command Description
kawa skills init --name N --description D Start a structured skill draft
kawa skills check <dir> Validate a skill directory
kawa skills register --name SLUG Publish the draft as a project skill version
kawa skills checkout|list|show|archive Edit / inspect / archive project skills

Providers (JDBC)

Command Description
kawa providers list-databases <provider> List reachable databases
kawa providers list-tables <provider> <db> List tables
kawa providers describe-table <provider> <db> <table> Schema + sample rows
kawa providers test-query <provider> <sql> Schema + sample rows for a custom query

Topology & governance

Command Description
kawa graph [--out g.json] [--html t.html] Extract the workspace topology graph
kawa sox snapshot|promote|plan|deploy|drift|history SOX promotion pipeline (workspace → reviewable tree → governed deploy)
kawa secrets push Upsert K_SECRET_VALUE_* env secrets into the workspace

Common options

Option Description
--work-dir=PATH Workspace directory override (default: current directory)
--auto-approve / --yes / -y Skip confirmation prompts (commit, import)
--delete (commit only) Allow entity deletions — blocked by default

Every subcommand documents its own flags: kawa <command> --help.

Metadata

Release files for kawa-dsl 2.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kawa-dsl 2.4.2
File Size Uploaded
kawa_dsl-2.4.2.tar.gz 721.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kawa-dsl 2.4.2
File Interpreter ABI Platform
kawa_dsl-2.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.5 MB

Release files / kawa_dsl-2.4.2.tar.gz

Download URL kawa_dsl-2.4.2.tar.gz
Size 721.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5f4b70d41e6fb4099f0326c3b21f7a925013cf218599c2753f9348e457bf88a1
BLAKE2b-256 checksum
How to use checksums
9798be274d06bf0fe24c98defc2a64fb76ae535a75807e66f629b87641f3275c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Release files / kawa_dsl-2.4.2-py3-none-any.whl

Download URL kawa_dsl-2.4.2-py3-none-any.whl
Size 781.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e580c5459b1c5874d1b8f181191d33953df04143d8811f9a727742b3145ec63
BLAKE2b-256 checksum
How to use checksums
68d0ff41b1a6aa5685728cfc03f8071d4d6b365d5ccbf1b1c88a79d8a39f7deb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Release history Release notifications | RSS feed

2.4.5

2 release files

2.4.4

2 release files

2.4.3

2 release files

This release

2.4.2 This release

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page