Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
version: "latest"
- run: uv python install ${{ matrix.python-version }}
- run: uv sync --python ${{ matrix.python-version }}
- run: uv run pytest tests/ -q
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish to PyPI

on:
push:
tags:
- "v*"

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
version: "latest"
- run: uv sync
- run: uv run pytest tests/ -q

publish:
needs: test
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
version: "latest"
- run: uv build
- uses: pypa/gh-action-pypi-publish@release/v1
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] - 2026-03-18

### Added
- **12 command groups** with consistent CRUD verbs: `query`, `folder`, `schema`, `wiki`, `tag`, `reflection`, `job`, `engine`, `user`, `role`, `grant`, `project`
- **Top-level commands**: `search`, `describe`
- **3 output formats**: JSON (default), CSV, pretty table
- **Field filtering** via `--fields` for reduced output
- **Retry with exponential backoff** on timeouts and 429/502/503/504
- **Config resolution**: CLI flags > env vars > config file
- **Command introspection** via `dremio describe <command>` for agent self-discovery
- **Input validation** for SQL injection, path traversal, and malformed IDs
- **120 unit tests** with full HTTP mocking
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@ Dremio Cloud has a powerful REST API and rich system tables, but no official CLI
### 1. Install

```bash
# Clone the repo
git clone https://github.com/dremio/cli.git
cd cli

# Install as a standalone tool (recommended)
uv tool install .
# From PyPI (recommended)
pip install dremio-cli

# Or with pip
pip install .
# Or with uv
uv tool install dremio-cli

# Or for development (editable install)
# Or from source (for development)
git clone https://github.com/dremio/cli.git
cd cli
uv sync
```

Expand Down
29 changes: 28 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,41 @@
[project]
name = "drs"
name = "dremio-cli"
version = "0.1.0"
description = "Developer CLI for Dremio Cloud"
readme = "README.md"
requires-python = ">=3.11"
license = "Apache-2.0"
authors = [
{ name = "Dremio", email = "oss@dremio.com" },
]
keywords = ["dremio", "cli", "data-lakehouse", "sql", "cloud", "iceberg"]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Database",
"Topic :: Software Development :: Libraries",
"Typing :: Typed",
]
dependencies = [
"typer[all]>=0.9",
"httpx>=0.27",
"pyyaml>=6",
"pydantic>=2",
]

[project.urls]
Homepage = "https://github.com/dremio/cli"
Repository = "https://github.com/dremio/cli"
Issues = "https://github.com/dremio/cli/issues"
Documentation = "https://docs.dremio.com/dremio-cloud/api/"

[project.scripts]
dremio = "drs.cli:app"

Expand All @@ -22,6 +46,9 @@ build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/drs"]

[tool.pytest.ini_options]
asyncio_mode = "auto"

[dependency-groups]
dev = [
"pytest>=9.0.2",
Expand Down
Empty file added src/drs/py.typed
Empty file.