Skip to content

aleda145/kavla-cli

Repository files navigation

Kavla CLI

Connect data sources to a Kavla canvas.

Receive SQL from the browser, execute it locally, and relay previews back.

Your credentials never leave your machine.

See the CLI page for what it enables.

Quick start

Install

curl -fsS https://install.kavla.dev | bash

(it's the same as install.sh)

Setup

kavla init

Supported Sources

Source Type Connection
DuckDB duckdb Path to an existing DuckDB file
Directory directory Path to a directory with CSV, Parquet, or JSON files
BigQuery bigquery Google Cloud project ID (experimental)
Postgres postgres Postgres URI

Architecture

alt text

  • Every Kavla canvas has its own isolated backend
  • A CLI session connects to one canvas over a dedicated websocket
  • When it connects the CLI shares its configured sources to the canvas
  • Only the CLI owner can execute queries against the CLI sources
  • SQL can now be sent from the canvas to the CLI
  • Credentials are never sent, they stay local
  • When the CLI is terminated, the connection drops instantly
  • Preview results are stored on the canvas after the CLI disconnects
  • Results follow the canvas access rules and need to be explicitly shared

Commands

Add a source

kavla config add-source

Login

kavla login

Connect to a canvas

kavla connect

Or connect directly:

kavla connect <room_id>

Build

go build -o kavla main.go

Config

Config lives in ~/.kavla/config.yaml. Tokens and source definitions stay on your machine.

Support

kavla.dev

Discord

About

CLI to enhance canvases hosted on kavla.dev

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages