dex
Type what you want in plain English and get back one ready-to-edit shell command for the data engineering CLIs you use every day. A tiny fine-tuned model ships with dex and runs on your machine: no network, no API key, no server to set up.
$ dex show the first 20 rows of sales.parquet
FILE=sales.parquet LIMIT=20 && duckdb -c "select * from '$FILE' limit $LIMIT" | less -S
The values you're likely to change come first, so you edit them and press Enter. Values dex can't know stay as
<placeholders>, and an unedited line fails instead of running with a blank. dex never runs the command itself.
If the command needs a CLI you don't have, dex says how to install it on your OS and leaves the command as is:
$ dex show the first 20 rows of sales.parquet
FILE=sales.parquet LIMIT=20 && duckdb -c "select * from '$FILE' limit $LIMIT" | less -S
dex: duckdb not found, install with: brew install duckdb
With the zsh integration, when the install needs no sudo (uv, pipx or Homebrew), dex first asks whether to install it. On y it runs that install, then the command lands on your prompt. Enter, n or Ctrl-C skips it:
$ dex show the first 20 rows of sales.parquet
dex: duckdb isn't installed. Install it with: brew install duckdb (Homebrew may update other packages)? [y/N]
In scope
Airflow and Astronomer, Databricks, Snowflake (snow and SnowSQL), Confluent, Kafka and Redpanda, AWS (S3, EMR,
Glue, Athena and more), Spark, DuckDB, dbt, curl, and about 25 more everyday data tools: kubectl, helm, gcloud, jq,
yq, psql, Trino and others. The full list, with counts, is in training/README.md.
Install
uv tool install dex-cli # or: pipx install dex-cli
The fine-tuned model isn't published yet. Until it is, point dex at any GGUF file:
export DEX_MODEL=~/models/dex.gguf
Then add the zsh integration to ~/.zshrc:
eval "$(dex --init zsh)"
With oh-my-zsh, link shell/zsh from this repo as a plugin instead:
ln -s "$PWD/shell/zsh" "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/dex" # then add dex to plugins=(...)
Use
dex <request>puts the command on your next prompt, ready to edit.- Or type the request on the command line and press Ctrl-X Ctrl-D: it is replaced by the command, with the
cursor on the first
<placeholder>. SetDEX_KEYbefore loading the integration to change the key, or to''for none. - Requests with
> | ; ' " #need quotes on the command line, or the key binding.*and?are fine. - If a command looks destructive (deletes, drops, terminates, overwrites, resets offsets), dex prints it anyway, warns on stderr and exits with code 3. Read it before you press Enter.
dex [OPTIONS] REQUEST...
--no-context send no facts about the local environment (profiles, files)
--show-prompt print the prompt instead of generating
-q, --quiet no warnings on stderr
--stop stop the background model process
--init zsh print the shell integration
-h, --help, --version
| Variable | Default | Meaning |
|---|---|---|
DEX_MODEL |
the model from the dex-model package |
a GGUF file to use instead |
DEX_IDLE |
15 |
minutes the model stays loaded after the last request; 0 loads it on every call |
DEX_THREADS |
performance or physical cores | inference threads |
DEX_KEY |
^X^D |
the zsh key binding |
DEX_ASK |
set to 1 by the zsh dex function |
lets dex ask to install a missing CLI |
How it works
dex (standard library only, about 30 ms) warm process (keeps the model loaded)
gather local context: AWS profile, Snowflake
connection, kubectl context, files here ...
build the prompt ─────────── Unix socket ─────────► generate with llama.cpp (xllamacpp)
check the answer, run the denylist ◄────────────────
print one line
dex reads a few facts about your environment (only for the tools your request mentions, from env vars and config files, never by running programs) so the model fills in real values. The model runs in a background process that starts on the first request and exits after 15 idle minutes, so later requests skip loading it. Details are in docs/architecture.md.
Develop
uv sync # Python 3.11+, the dev tools and an editable dex
uv run pre-commit install
uv run pytest # tests need no model
CONTRIBUTING.md has the checks and conventions, docs/adding-a-tool.md how to teach dex a new CLI, and docs/training.md how the model is built. The design and its reviews are in docs/designs/.
License
MIT, see LICENSE. The training templates follow each CLI's own docs or source; the licenses of those sources are listed in training/README.md.
Metadata
Release files for dex-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dex_cli-0.1.0.tar.gz | 34.8 kB | Without provenance | Details for dex_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dex_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for dex_cli-0.1.0-py3-none-any.whl |
Total release size: 73.7 kB
Release files / dex_cli-0.1.0.tar.gz
| Download URL | dex_cli-0.1.0.tar.gz |
|---|---|
| Size | 34.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1739c829f55b62080bd69cd3250dd3aacf7d27620093bbb0a34be39ef1853ba5
|
|
BLAKE2b-256 checksum How to use checksums |
cd40bc16ad390e7a71ce1586568804b56e13471e7e1b748583d32516463dde59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / dex_cli-0.1.0-py3-none-any.whl
| Download URL | dex_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 38.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78871aa28f3e983e7293c9672800a8f1323146a49127cd52a9b55eb6e5f8720c
|
|
BLAKE2b-256 checksum How to use checksums |
7feb916d56ad36b887b1f7c2a142b7b6855d6550e5bf41827f1cd942e17a9e07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for dex-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.