Metadata-Version: 2.4
Name: dremio-cli
Version: 1.6.0
Summary: A comprehensive command-line interface for Dremio Cloud and Dremio Software
Home-page: https://github.com/your-org/dremio-cli
Author: Your Name
Author-email: Dremio Developer Advocacy <developer-advocacy@dremio.com>
Maintainer-email: Dremio Developer Advocacy <developer-advocacy@dremio.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/developer-advocacy-dremio/dremio-python-cli
Project-URL: Documentation, https://github.com/developer-advocacy-dremio/dremio-python-cli/tree/main/dremio-cli/docs
Project-URL: Repository, https://github.com/developer-advocacy-dremio/dremio-python-cli
Project-URL: Issues, https://github.com/developer-advocacy-dremio/dremio-python-cli/issues
Project-URL: Changelog, https://github.com/developer-advocacy-dremio/dremio-python-cli/releases
Keywords: dremio,cli,data,lakehouse,sql,analytics,cloud,data-engineering
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0.0
Requires-Dist: requests>=2.28.0
Requires-Dist: rich>=13.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: pyyaml>=6.0.0
Requires-Dist: prompt_toolkit>=3.0.0
Requires-Dist: textual>=0.40.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: pyarrow>=12.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Dremio CLI

A comprehensive command-line interface for Dremio Cloud and Dremio Software.

## 🚀 Features

- **100% API Coverage** - Complete support for all Dremio APIs
- **Dual Platform Support** - Works with both Dremio Cloud and Software
- **Profile Management** - Easily switch between environments
- **Rich Output** - Table, JSON, and YAML formatting
- **Comprehensive Documentation** - Detailed guides for every feature

## 📦 Installation

```bash
pip install dremio-cli
```

## ⚡ Quick Start

```bash
# Configure a profile
dremio profile create --name myprofile --type software \
  --base-url https://dremio.company.com \
  --username admin --password secret

# List catalog
dremio catalog list

# Execute SQL
dremio sql execute "SELECT * FROM customers LIMIT 10"

# Create a view
dremio view create --path "Analytics.summary" \
  --sql "SELECT * FROM customers WHERE region = 'US'"
```

## 📚 Documentation

**[Complete Documentation (GitHub) →](https://github.com/developer-advocacy-dremio/dremio-python-cli/tree/main/dremio-cli/docs)**

*(Use the link above if browsing on PyPI)*


### Core Guides

- **[Installation](docs/installation.md)** - Setup and configuration
- **[Profiles](docs/profiles.md)** - Manage connection profiles
- **[Catalog](docs/catalog.md)** - Browse and navigate data
- **[SQL](docs/sql.md)** - Execute queries and analyze plans
- **[Jobs](docs/jobs.md)** - Monitor query execution

### Data Management

- **[Sources](docs/sources.md)** - Connect to data systems
- **[Views](docs/views.md)** - Create virtual datasets
- **[Tables](docs/tables.md)** - Manage physical datasets
- **[Spaces & Folders](docs/spaces-folders.md)** - Organize your catalog

### Governance & Security

- **[Tags & Wiki](docs/tags-wiki.md)** - Document and categorize
- **[Grants](docs/grants.md)** - Access control and permissions
- **[Users](docs/users.md)** - User management
- **[Roles](docs/roles.md)** - Role-based access control
- **[Reflections](docs/reflections.md)** - Manage reflections
- **[Scripts](docs/scripts.md)** - Manage scripts (Cloud only)

### Productivity

- **[Favorites](docs/favorites.md)** - Save frequently used queries
- **[History](docs/history.md)** - View and re-run commands
- **[REPL](docs/repl.md)** - Interactive SQL Shell (Enhanced)
- **[Monitor](docs/monitor.md)** - Real-time System Monitor
- **[Init](docs/init.md)** - Interactive Configuration Wizard
- **[Completion](docs/completion.md)** - Shell Completion Scripts
- **[Lineage](docs/lineage.md)** - Visualize dataset dependencies

## 🎯 Key Features

### Catalog Operations
Browse and navigate your Dremio catalog with ease.

```bash
dremio catalog list
dremio catalog get <id>
dremio catalog get-by-path "MySpace.MyFolder.MyView"
```

### SQL Execution
Execute queries, explain plans, and validate syntax.

```bash
dremio sql execute "SELECT * FROM table"
dremio sql execute --file query.sql --async
dremio sql explain "SELECT * FROM table"
dremio sql validate "SELECT * FROM table"
```

### Source Management
Connect to and manage data sources.

```bash
dremio source list
dremio source create --name MyDB --type POSTGRES --config-file db.json
dremio source refresh <id>
```

### View Management
Create and manage virtual datasets.

```bash
dremio view create --path "Analytics.summary" --sql "SELECT * FROM data"
dremio view update <id> --sql "SELECT * FROM updated_data"
dremio view list --space Analytics
```

### Job Management
Monitor and manage query jobs.

```bash
dremio job list
dremio job get <id>
dremio job results <id> --output-file results.json
dremio job profile <id> --download profile.zip
```

### Access Control
Manage permissions and grants.

```bash
dremio grant list <catalog-id>
dremio grant add <id> --grantee-type ROLE --grantee-id analyst --privileges SELECT
dremio user list
dremio role list
```

## 🔧 Configuration

### Profile-Based Configuration

```bash
# Create profile
dremio profile create --name prod --type cloud \
  --base-url https://api.dremio.cloud \
  --project-id <project-id> \
  --token <pat-token>

# Use profile
dremio --profile prod catalog list

# Set default profile
dremio profile set-default prod
```

### Environment Variables

```bash
# Set in .env file
DREMIO_BASE_URL=https://dremio.company.com
DREMIO_USERNAME=admin
DREMIO_PASSWORD=secret
```

## 📊 Output Formats

```bash
# Table format (default)
dremio catalog list

# JSON format
dremio --output json catalog list

# YAML format
dremio --output yaml catalog list
```

## 🌐 Platform Support

| Feature | Software | Cloud |
|---------|----------|-------|
| Catalog Operations | ✅ | ✅ |
| SQL Execution | ✅ | ⚠️ Limited |
| Job Management | ✅ | ✅ |
| View Management | ✅ | ✅ |
| Source Management | ✅ | ✅ |
| Grant Management | ✅ | ✅ |
| User/Role Management | ✅ | ⚠️ Via Console |

## 💻 Development

```bash
# Clone repository
git clone https://github.com/developer-advocacy-dremio/dremio-python-cli.git
cd dremio-python-cli/dremio-cli

# Install in development mode
pip install -e .

# Run tests
pytest

# Run live tests
python scripts/test_sql_operations.py
```

## 🤝 Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

## 📄 License

This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.

## 🔗 Links

- [Documentation](docs/README.md)
- [Dremio Documentation](https://docs.dremio.com)
- [Dremio Cloud](https://www.dremio.com/cloud/)
- [Dremio Software](https://www.dremio.com/platform/)

## 🆘 Support

For issues and questions:
- GitHub Issues: [Report an issue](https://github.com/developer-advocacy-dremio/dremio-python-cli/issues)
- Documentation: [Read the docs](docs/README.md)
- Community: [Dremio Community](https://community.dremio.com)
