database-tycoon 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- database_tycoon-0.1.0/.github/workflows/publish.yml +38 -0
- database_tycoon-0.1.0/.gitignore +67 -0
- database_tycoon-0.1.0/CHANGELOG.md +50 -0
- database_tycoon-0.1.0/LICENSE +21 -0
- database_tycoon-0.1.0/PKG-INFO +222 -0
- database_tycoon-0.1.0/README.md +181 -0
- database_tycoon-0.1.0/data/README.md +51 -0
- database_tycoon-0.1.0/dbt_project/README.md +81 -0
- database_tycoon-0.1.0/dbt_project/dbt_project.yml +77 -0
- database_tycoon-0.1.0/dbt_project/packages.yml +8 -0
- database_tycoon-0.1.0/dbt_project/profiles.yml +12 -0
- database_tycoon-0.1.0/docs/install_rill.sh +18 -0
- database_tycoon-0.1.0/docs/openmetadata.md +59 -0
- database_tycoon-0.1.0/docs/publishing-to-pypi.md +151 -0
- database_tycoon-0.1.0/pyproject.toml +66 -0
- database_tycoon-0.1.0/rill/README.md +29 -0
- database_tycoon-0.1.0/rill/rill.yaml +3 -0
- database_tycoon-0.1.0/src/tycoon/__init__.py +3 -0
- database_tycoon-0.1.0/src/tycoon/__main__.py +5 -0
- database_tycoon-0.1.0/src/tycoon/cli.py +89 -0
- database_tycoon-0.1.0/src/tycoon/commands/__init__.py +0 -0
- database_tycoon-0.1.0/src/tycoon/commands/ask.py +319 -0
- database_tycoon-0.1.0/src/tycoon/commands/data.py +25 -0
- database_tycoon-0.1.0/src/tycoon/commands/db.py +163 -0
- database_tycoon-0.1.0/src/tycoon/commands/doctor.py +137 -0
- database_tycoon-0.1.0/src/tycoon/commands/explore.py +190 -0
- database_tycoon-0.1.0/src/tycoon/commands/init.py +333 -0
- database_tycoon-0.1.0/src/tycoon/commands/run.py +36 -0
- database_tycoon-0.1.0/src/tycoon/commands/run_all.py +107 -0
- database_tycoon-0.1.0/src/tycoon/commands/sources.py +503 -0
- database_tycoon-0.1.0/src/tycoon/commands/start.py +134 -0
- database_tycoon-0.1.0/src/tycoon/commands/status.py +125 -0
- database_tycoon-0.1.0/src/tycoon/commands/stop.py +128 -0
- database_tycoon-0.1.0/src/tycoon/commands/transform.py +170 -0
- database_tycoon-0.1.0/src/tycoon/config.py +106 -0
- database_tycoon-0.1.0/src/tycoon/constants.py +19 -0
- database_tycoon-0.1.0/src/tycoon/dbt.py +24 -0
- database_tycoon-0.1.0/src/tycoon/ingestion/__init__.py +0 -0
- database_tycoon-0.1.0/src/tycoon/ingestion/catalog.py +199 -0
- database_tycoon-0.1.0/src/tycoon/ingestion/ducklake_config.py +68 -0
- database_tycoon-0.1.0/src/tycoon/ingestion/mta_bus_speeds_pipeline.py +107 -0
- database_tycoon-0.1.0/src/tycoon/ingestion/mta_pipeline.py +102 -0
- database_tycoon-0.1.0/src/tycoon/ingestion/nyc_dot_pipeline.py +102 -0
- database_tycoon-0.1.0/src/tycoon/ingestion/runner.py +245 -0
- database_tycoon-0.1.0/src/tycoon/ingestion/source_installer.py +72 -0
- database_tycoon-0.1.0/src/tycoon/ingestion/source_manager.py +267 -0
- database_tycoon-0.1.0/src/tycoon/ingestion/sources/__init__.py +1 -0
- database_tycoon-0.1.0/src/tycoon/nao.py +115 -0
- database_tycoon-0.1.0/src/tycoon/orchestration/__init__.py +1 -0
- database_tycoon-0.1.0/src/tycoon/orchestration/assets/__init__.py +1 -0
- database_tycoon-0.1.0/src/tycoon/orchestration/assets/ingestion.py +67 -0
- database_tycoon-0.1.0/src/tycoon/orchestration/assets/rill.py +31 -0
- database_tycoon-0.1.0/src/tycoon/orchestration/assets/transforms.py +21 -0
- database_tycoon-0.1.0/src/tycoon/orchestration/definitions.py +64 -0
- database_tycoon-0.1.0/src/tycoon/orchestration/resources.py +26 -0
- database_tycoon-0.1.0/src/tycoon/project.py +156 -0
- database_tycoon-0.1.0/src/tycoon/scaffolding/__init__.py +0 -0
- database_tycoon-0.1.0/src/tycoon/scaffolding/dbt_generator.py +227 -0
- database_tycoon-0.1.0/src/tycoon/scaffolding/rill_generator.py +358 -0
- database_tycoon-0.1.0/src/tycoon/scaffolding/templates.py +310 -0
- database_tycoon-0.1.0/src/tycoon/server/__init__.py +0 -0
- database_tycoon-0.1.0/src/tycoon/server/app.py +42 -0
- database_tycoon-0.1.0/src/tycoon/server/routes.py +140 -0
- database_tycoon-0.1.0/src/tycoon/server/spa.py +321 -0
- database_tycoon-0.1.0/src/tycoon/server/subprocess_manager.py +82 -0
- database_tycoon-0.1.0/src/tycoon/server/websocket.py +57 -0
- database_tycoon-0.1.0/src/tycoon/services/__init__.py +0 -0
- database_tycoon-0.1.0/src/tycoon/services/definitions.py +103 -0
- database_tycoon-0.1.0/src/tycoon/services/manager.py +139 -0
- database_tycoon-0.1.0/src/tycoon/templates/csv-import/README +46 -0
- database_tycoon-0.1.0/src/tycoon/templates/csv-import/tycoon.yml +18 -0
- database_tycoon-0.1.0/src/tycoon/templates/github-analytics/tycoon.yml +24 -0
- database_tycoon-0.1.0/src/tycoon/templates/nyc-transit/README +9 -0
- database_tycoon-0.1.0/src/tycoon/templates/nyc-transit/tycoon.yml +41 -0
- database_tycoon-0.1.0/src/tycoon/templates/weather-station/tycoon.yml +20 -0
- database_tycoon-0.1.0/src/tycoon/utils/__init__.py +0 -0
- database_tycoon-0.1.0/src/tycoon/utils/console.py +58 -0
- database_tycoon-0.1.0/src/tycoon/utils/duckdb_utils.py +53 -0
- database_tycoon-0.1.0/src/tycoon/utils/process.py +34 -0
- database_tycoon-0.1.0/tests/README.md +161 -0
- database_tycoon-0.1.0/tests/__init__.py +0 -0
- database_tycoon-0.1.0/tests/conftest.py +25 -0
- database_tycoon-0.1.0/tests/test_check.py +19 -0
- database_tycoon-0.1.0/tests/test_cli.py +51 -0
- database_tycoon-0.1.0/tests/test_config.py +39 -0
- database_tycoon-0.1.0/tests/test_constants.py +27 -0
- database_tycoon-0.1.0/tests/test_db_command.py +44 -0
- database_tycoon-0.1.0/tests/test_explore.py +654 -0
- database_tycoon-0.1.0/tests/test_ingestion.py +131 -0
- database_tycoon-0.1.0/tests/test_init.py +160 -0
- database_tycoon-0.1.0/tests/test_project.py +129 -0
- database_tycoon-0.1.0/tests/test_server.py +55 -0
- database_tycoon-0.1.0/tests/test_services.py +55 -0
- database_tycoon-0.1.0/tests/test_sources.py +282 -0
- database_tycoon-0.1.0/tests/test_utils.py +136 -0
- database_tycoon-0.1.0/uv.lock +3262 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags:
|
|
5
|
+
- "v*"
|
|
6
|
+
jobs:
|
|
7
|
+
build:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v4
|
|
11
|
+
- uses: astral-sh/setup-uv@v4
|
|
12
|
+
- run: uv build
|
|
13
|
+
- uses: actions/upload-artifact@v4
|
|
14
|
+
with:
|
|
15
|
+
name: dist
|
|
16
|
+
path: dist/
|
|
17
|
+
publish-testpypi:
|
|
18
|
+
needs: build
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
environment: testpypi
|
|
21
|
+
permissions:
|
|
22
|
+
id-token: write
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/download-artifact@v4
|
|
25
|
+
with: {name: dist, path: dist/}
|
|
26
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
27
|
+
with:
|
|
28
|
+
repository-url: https://test.pypi.org/legacy/
|
|
29
|
+
publish-pypi:
|
|
30
|
+
needs: publish-testpypi
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
environment: pypi
|
|
33
|
+
permissions:
|
|
34
|
+
id-token: write
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/download-artifact@v4
|
|
37
|
+
with: {name: dist, path: dist/}
|
|
38
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
*.egg
|
|
8
|
+
.pytest_cache/
|
|
9
|
+
|
|
10
|
+
# Virtual environments
|
|
11
|
+
.venv/
|
|
12
|
+
venv/
|
|
13
|
+
|
|
14
|
+
# DuckDB
|
|
15
|
+
*.duckdb
|
|
16
|
+
*.duckdb.wal
|
|
17
|
+
data/
|
|
18
|
+
!data/README.md
|
|
19
|
+
|
|
20
|
+
# dbt
|
|
21
|
+
transformation/target/
|
|
22
|
+
transformation/dbt_packages/
|
|
23
|
+
transformation/logs/
|
|
24
|
+
dbt_project/target/
|
|
25
|
+
dbt_project/dbt_packages/
|
|
26
|
+
dbt_project/logs/
|
|
27
|
+
|
|
28
|
+
# Rill
|
|
29
|
+
rill/tmp/
|
|
30
|
+
|
|
31
|
+
# IDE
|
|
32
|
+
.idea/
|
|
33
|
+
.vscode/
|
|
34
|
+
*.swp
|
|
35
|
+
|
|
36
|
+
# OS
|
|
37
|
+
.DS_Store
|
|
38
|
+
|
|
39
|
+
# Demo
|
|
40
|
+
.demo_pids
|
|
41
|
+
|
|
42
|
+
# DuckLake
|
|
43
|
+
ducklake_data/
|
|
44
|
+
|
|
45
|
+
# Dagster runtime state
|
|
46
|
+
dagster_home/
|
|
47
|
+
.tmp_dagster_home_*/
|
|
48
|
+
.tycoon/dagster/
|
|
49
|
+
|
|
50
|
+
# AI tool configs (machine-specific)
|
|
51
|
+
.aider*
|
|
52
|
+
.claude/
|
|
53
|
+
.config/
|
|
54
|
+
.gemini/
|
|
55
|
+
ai-workbench/
|
|
56
|
+
|
|
57
|
+
# Nao analytics agent (auto-generated context, not source code)
|
|
58
|
+
.tycoon/nao/databases/
|
|
59
|
+
.tycoon/nao/repos/
|
|
60
|
+
.tycoon/nao/agent/
|
|
61
|
+
|
|
62
|
+
# tycoon runtime state (PIDs, locks, local nao/dagster config)
|
|
63
|
+
.tycoon/
|
|
64
|
+
logs/
|
|
65
|
+
.claude/worktrees/
|
|
66
|
+
|
|
67
|
+
gha-creds-*.json
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
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).
|
|
2
|
+
|
|
3
|
+
## [0.1.0] - 2026-04-09
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
#### Core CLI
|
|
8
|
+
- `tycoon init` — scaffold a new project with templates: `csv-import`, `github-analytics`, `nyc-transit`, `weather-station`
|
|
9
|
+
- `tycoon doctor` — environment diagnostics (checks dbt, Rill, warehouse config, and stack config)
|
|
10
|
+
- `tycoon check-updates` — check PyPI for a newer version of the package
|
|
11
|
+
|
|
12
|
+
#### Data Pipeline
|
|
13
|
+
- `tycoon data sources catalog` — browse available source integrations
|
|
14
|
+
- `tycoon data sources add <type>` — interactively register a source; auto-installs dlt packages on demand
|
|
15
|
+
- `tycoon data sources list` — list all registered sources
|
|
16
|
+
- `tycoon data sources show <name>` — inspect a registered source
|
|
17
|
+
- `tycoon data sources run <name>` — ingest a source via dlt into DuckDB
|
|
18
|
+
- `tycoon data sources run-all` — ingest all registered sources
|
|
19
|
+
- `tycoon data sources status` — show freshness and row counts per source
|
|
20
|
+
- `tycoon data transform run` — run `dbt build`
|
|
21
|
+
- `tycoon data analyze <source>` — auto-scaffold dbt staging models from raw schema; `--rill` flag generates Rill dashboards
|
|
22
|
+
- `tycoon data db query <sql>` — query the local DuckDB warehouse directly
|
|
23
|
+
|
|
24
|
+
#### Services
|
|
25
|
+
- `tycoon start` / `tycoon stop` — start/stop Rill, Dagster, Nao, and DuckDB UI
|
|
26
|
+
- `tycoon run <tool>` — passthrough runner for `dbt`, `dlt`, `rill`, and `dagster`
|
|
27
|
+
|
|
28
|
+
#### AI Queries (requires `tycoon[ask]`)
|
|
29
|
+
- `tycoon ask init` — initialize the natural language query index
|
|
30
|
+
- `tycoon ask sync` — sync the index with the current warehouse schema
|
|
31
|
+
- `tycoon ask chat` — natural language queries via Nao (Ollama supported, no API key needed)
|
|
32
|
+
|
|
33
|
+
#### Source Catalog (downloaded on demand via dlt)
|
|
34
|
+
- `rest_api` — any REST API; defaults to PokéAPI demo (no credentials needed)
|
|
35
|
+
- `filesystem` — CSV and Parquet files from local paths
|
|
36
|
+
- `github` — commits, issues, pull requests, repositories
|
|
37
|
+
- `slack` — channels, messages, users
|
|
38
|
+
- `stripe` — customers, invoices, products, subscriptions
|
|
39
|
+
- `hubspot` — companies, contacts, deals, tickets
|
|
40
|
+
- `notion` — databases, pages, users
|
|
41
|
+
|
|
42
|
+
#### Optional Extras
|
|
43
|
+
- `tycoon[dagster]` — Dagster orchestration with full asset graph
|
|
44
|
+
- `tycoon[ask]` — Nao + Ibis for natural language querying
|
|
45
|
+
|
|
46
|
+
### Known Limitations
|
|
47
|
+
- Snowflake and BigQuery warehouses are not yet supported (planned for a future release)
|
|
48
|
+
- `tycoon start --only rill` requires a `rill/` project directory initialized with `rill init`
|
|
49
|
+
|
|
50
|
+
[0.1.0]: https://github.com/Database-Tycoon/tycoon-cli/releases/tag/v0.1.0
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Database Tycoon Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: database-tycoon
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Database Tycoon — local-first analytics CLI that adapts to your existing data stack
|
|
5
|
+
Project-URL: Homepage, https://github.com/Database-Tycoon/tycoon-cli
|
|
6
|
+
Project-URL: Repository, https://github.com/Database-Tycoon/tycoon-cli
|
|
7
|
+
Project-URL: Issues, https://github.com/Database-Tycoon/tycoon-cli/issues
|
|
8
|
+
Author: Database Tycoon Team
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: analytics,cli,data,dbt,dlt,duckdb
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Database
|
|
18
|
+
Requires-Python: >=3.12
|
|
19
|
+
Requires-Dist: dbt-core==1.11.8
|
|
20
|
+
Requires-Dist: dbt-duckdb==1.10.1
|
|
21
|
+
Requires-Dist: dlt[duckdb]==1.24.0
|
|
22
|
+
Requires-Dist: duckdb==1.5.1
|
|
23
|
+
Requires-Dist: httpx==0.28.1
|
|
24
|
+
Requires-Dist: pydantic==2.12.5
|
|
25
|
+
Requires-Dist: pyyaml==6.0.3
|
|
26
|
+
Requires-Dist: rich==14.3.3
|
|
27
|
+
Requires-Dist: typer==0.24.1
|
|
28
|
+
Provides-Extra: ask
|
|
29
|
+
Requires-Dist: ibis-framework[duckdb]==12.0.0; extra == 'ask'
|
|
30
|
+
Requires-Dist: nao-core==0.0.59; extra == 'ask'
|
|
31
|
+
Provides-Extra: dagster
|
|
32
|
+
Requires-Dist: dagster-dbt==0.28.20; extra == 'dagster'
|
|
33
|
+
Requires-Dist: dagster-dlt==0.28.20; extra == 'dagster'
|
|
34
|
+
Requires-Dist: dagster-webserver==1.12.20; extra == 'dagster'
|
|
35
|
+
Requires-Dist: dagster==1.12.20; extra == 'dagster'
|
|
36
|
+
Provides-Extra: server
|
|
37
|
+
Requires-Dist: fastapi==0.135.3; extra == 'server'
|
|
38
|
+
Requires-Dist: uvicorn[standard]==0.44.0; extra == 'server'
|
|
39
|
+
Requires-Dist: websockets==16.0; extra == 'server'
|
|
40
|
+
Description-Content-Type: text/markdown
|
|
41
|
+
|
|
42
|
+
# tycoon
|
|
43
|
+
|
|
44
|
+
A pip-installable CLI that wires dlt → DuckDB → dbt → Rill into a working local analytics stack. No Docker, no cloud account required.
|
|
45
|
+
|
|
46
|
+
**Adaptable**: bring your own ingestion (Airbyte, Fivetran), warehouse (Snowflake, BigQuery, MotherDuck), dbt project, BI tool, or orchestrator — `tycoon init` asks before it assumes.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Install
|
|
51
|
+
|
|
52
|
+
Requires Python >= 3.12.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install database-tycoon
|
|
56
|
+
# or
|
|
57
|
+
uv add database-tycoon
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Optional extras:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install "database-tycoon[dagster]" # Dagster orchestration
|
|
64
|
+
pip install "database-tycoon[ask]" # AI natural language queries (Ollama supported)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Quickstart
|
|
70
|
+
|
|
71
|
+
The fastest path to a working dashboard uses the PokéAPI — no credentials, no signup.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# 1. Create a project
|
|
75
|
+
mkdir my-project && cd my-project
|
|
76
|
+
tycoon init --template csv-import
|
|
77
|
+
|
|
78
|
+
# 2. Add the PokéAPI as a source (press Enter twice for defaults)
|
|
79
|
+
tycoon data sources add rest_api
|
|
80
|
+
|
|
81
|
+
# 3. Ingest into DuckDB
|
|
82
|
+
tycoon data sources run pokeapi
|
|
83
|
+
|
|
84
|
+
# 4. Scaffold dbt models and generate Rill dashboards
|
|
85
|
+
tycoon data analyze pokeapi --rill
|
|
86
|
+
|
|
87
|
+
# 5. Open Rill
|
|
88
|
+
tycoon start --only rill
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Rill opens at `http://localhost:9009` with `pokemon`, `berry`, and `type` tables ready to explore.
|
|
92
|
+
|
|
93
|
+
Already have a pipeline? `tycoon init` will ask about your ingestion tool, warehouse, dbt project, BI tool, and orchestrator — and configure itself around what you already have.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## CLI Reference
|
|
98
|
+
|
|
99
|
+
| Command | Description |
|
|
100
|
+
|---|---|
|
|
101
|
+
| `tycoon init` | Scaffold a new project |
|
|
102
|
+
| `tycoon data sources catalog` | Browse available source integrations |
|
|
103
|
+
| `tycoon data sources add <type>` | Register a new data source |
|
|
104
|
+
| `tycoon data sources list` | List sources configured in this project |
|
|
105
|
+
| `tycoon data sources list show <name>` | Show detailed config for a source |
|
|
106
|
+
| `tycoon data sources run <name>` | Run ingestion for a named source |
|
|
107
|
+
| `tycoon data sources run-all` | Run ingestion for all sources |
|
|
108
|
+
| `tycoon data transform run` | Run dbt transformations |
|
|
109
|
+
| `tycoon data analyze <source>` | Scaffold dbt staging models; add `--rill` to also generate dashboards |
|
|
110
|
+
| `tycoon data db query <sql>` | Run a SQL query against the warehouse |
|
|
111
|
+
| `tycoon data run-all` | Ingest all sources then run dbt build |
|
|
112
|
+
| `tycoon data status` | Show freshness and row counts for each source |
|
|
113
|
+
| `tycoon start` | Start Rill, Dagster, Nao, and the web UI |
|
|
114
|
+
| `tycoon stop` | Stop all services |
|
|
115
|
+
| `tycoon ask chat` | Query your data in natural language (Nao) |
|
|
116
|
+
| `tycoon run <tool>` | Passthrough to dbt, dlt, rill, dagster |
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## tycoon.yml Reference
|
|
121
|
+
|
|
122
|
+
```yaml
|
|
123
|
+
name: my-project
|
|
124
|
+
version: 0.1.0
|
|
125
|
+
|
|
126
|
+
database:
|
|
127
|
+
raw: data/raw.duckdb # dlt output (or md: URI for MotherDuck)
|
|
128
|
+
warehouse: data/warehouse.duckdb # dbt output — read by Rill and Nao
|
|
129
|
+
|
|
130
|
+
dbt_project_dir: dbt_project # path to dbt project (yours or tycoon-scaffolded)
|
|
131
|
+
rill_dir: rill # path to Rill dashboard definitions
|
|
132
|
+
|
|
133
|
+
stack: # generated by tycoon init — edit as needed
|
|
134
|
+
ingestion: dlt # dlt | airbyte | fivetran | meltano | none
|
|
135
|
+
ingestion_managed: true # false = tycoon won't run `data sources run`
|
|
136
|
+
warehouse: duckdb # duckdb | motherduck | snowflake | bigquery | other
|
|
137
|
+
transformation_managed: true # false = tycoon won't scaffold or overwrite dbt
|
|
138
|
+
bi: rill # rill | metabase | looker | tableau | other | none
|
|
139
|
+
bi_managed: true # false = tycoon won't start Rill
|
|
140
|
+
orchestrator: dagster # dagster | airflow | prefect | other | none
|
|
141
|
+
orchestrator_managed: true # false = tycoon won't start Dagster
|
|
142
|
+
|
|
143
|
+
sources:
|
|
144
|
+
my-github:
|
|
145
|
+
type: github # matches a catalog source name
|
|
146
|
+
schema: raw_github # schema name in the raw DuckDB file
|
|
147
|
+
config:
|
|
148
|
+
access_token: ${GITHUB_TOKEN} # env vars are interpolated
|
|
149
|
+
owner: my-org
|
|
150
|
+
repo: my-repo
|
|
151
|
+
|
|
152
|
+
ask: # optional — requires tycoon[ask]
|
|
153
|
+
llm:
|
|
154
|
+
provider: ollama # fully local, no API key required
|
|
155
|
+
port: 5005
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Each source produces its own raw DuckDB file: `data/raw_<source>.duckdb`. All sources write into `data/warehouse.duckdb` after transformation.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Catalog Sources
|
|
163
|
+
|
|
164
|
+
These sources are available via `tycoon data sources add <name>`. They are downloaded on demand via `dlt init` and not bundled in the package.
|
|
165
|
+
|
|
166
|
+
| Source | Category | Key Tables |
|
|
167
|
+
|---|---|---|
|
|
168
|
+
| `github` | Developer | commits, issues, pull_requests, repositories |
|
|
169
|
+
| `slack` | Communication | channels, messages, users |
|
|
170
|
+
| `stripe` | Finance | customers, invoices, products, subscriptions |
|
|
171
|
+
| `hubspot` | CRM | companies, contacts, deals, tickets |
|
|
172
|
+
| `notion` | Knowledge | databases, pages, users |
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Data Directory
|
|
177
|
+
|
|
178
|
+
Raw DuckDB files follow the naming convention `raw_<source>.duckdb` (written by ingestion) while `warehouse.duckdb` is the single transformed database read by Rill and Nao. See `data/README.md` for details.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Rill Dashboards
|
|
183
|
+
|
|
184
|
+
Rill is a local-first BI tool. Dashboard definitions are YAML files in the `rill/` directory.
|
|
185
|
+
Launch Rill via `tycoon start` or `tycoon start --only rill`.
|
|
186
|
+
|
|
187
|
+
Auto-generate dashboards for a source after ingestion:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
tycoon data analyze my-source --rill
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
This exports each raw table to Parquet, then generates Rill source, metrics view, and explore
|
|
194
|
+
files — one dashboard per table. The `--rill` flag is opt-in; dashboard generation is skipped
|
|
195
|
+
by default since it requires a Rill project directory (`rill/`) to already exist.
|
|
196
|
+
|
|
197
|
+
**Architecture**: sources read from Parquet via Rill's `local_file` connector into its
|
|
198
|
+
built-in in-memory OLAP. Dashboards are immediately usable without a dbt run.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Optional Extras
|
|
203
|
+
|
|
204
|
+
### Dagster orchestration (`tycoon[dagster]`)
|
|
205
|
+
|
|
206
|
+
Installs Dagster, dagster-dbt, and dagster-dlt. Provides a full asset graph covering ingestion and transformation. Run the Dagster UI with:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
dagster dev
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
The workspace is defined in `workspace.yaml` at the project root.
|
|
213
|
+
|
|
214
|
+
### AI queries (`tycoon[ask]`)
|
|
215
|
+
|
|
216
|
+
Installs Nao and Ibis for natural language querying of the warehouse. Requires a running LLM — Ollama (local) is supported out of the box with no API key.
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
tycoon ask init
|
|
220
|
+
tycoon ask sync
|
|
221
|
+
tycoon ask chat
|
|
222
|
+
```
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# tycoon
|
|
2
|
+
|
|
3
|
+
A pip-installable CLI that wires dlt → DuckDB → dbt → Rill into a working local analytics stack. No Docker, no cloud account required.
|
|
4
|
+
|
|
5
|
+
**Adaptable**: bring your own ingestion (Airbyte, Fivetran), warehouse (Snowflake, BigQuery, MotherDuck), dbt project, BI tool, or orchestrator — `tycoon init` asks before it assumes.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Requires Python >= 3.12.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install database-tycoon
|
|
15
|
+
# or
|
|
16
|
+
uv add database-tycoon
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Optional extras:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install "database-tycoon[dagster]" # Dagster orchestration
|
|
23
|
+
pip install "database-tycoon[ask]" # AI natural language queries (Ollama supported)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Quickstart
|
|
29
|
+
|
|
30
|
+
The fastest path to a working dashboard uses the PokéAPI — no credentials, no signup.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# 1. Create a project
|
|
34
|
+
mkdir my-project && cd my-project
|
|
35
|
+
tycoon init --template csv-import
|
|
36
|
+
|
|
37
|
+
# 2. Add the PokéAPI as a source (press Enter twice for defaults)
|
|
38
|
+
tycoon data sources add rest_api
|
|
39
|
+
|
|
40
|
+
# 3. Ingest into DuckDB
|
|
41
|
+
tycoon data sources run pokeapi
|
|
42
|
+
|
|
43
|
+
# 4. Scaffold dbt models and generate Rill dashboards
|
|
44
|
+
tycoon data analyze pokeapi --rill
|
|
45
|
+
|
|
46
|
+
# 5. Open Rill
|
|
47
|
+
tycoon start --only rill
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Rill opens at `http://localhost:9009` with `pokemon`, `berry`, and `type` tables ready to explore.
|
|
51
|
+
|
|
52
|
+
Already have a pipeline? `tycoon init` will ask about your ingestion tool, warehouse, dbt project, BI tool, and orchestrator — and configure itself around what you already have.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## CLI Reference
|
|
57
|
+
|
|
58
|
+
| Command | Description |
|
|
59
|
+
|---|---|
|
|
60
|
+
| `tycoon init` | Scaffold a new project |
|
|
61
|
+
| `tycoon data sources catalog` | Browse available source integrations |
|
|
62
|
+
| `tycoon data sources add <type>` | Register a new data source |
|
|
63
|
+
| `tycoon data sources list` | List sources configured in this project |
|
|
64
|
+
| `tycoon data sources list show <name>` | Show detailed config for a source |
|
|
65
|
+
| `tycoon data sources run <name>` | Run ingestion for a named source |
|
|
66
|
+
| `tycoon data sources run-all` | Run ingestion for all sources |
|
|
67
|
+
| `tycoon data transform run` | Run dbt transformations |
|
|
68
|
+
| `tycoon data analyze <source>` | Scaffold dbt staging models; add `--rill` to also generate dashboards |
|
|
69
|
+
| `tycoon data db query <sql>` | Run a SQL query against the warehouse |
|
|
70
|
+
| `tycoon data run-all` | Ingest all sources then run dbt build |
|
|
71
|
+
| `tycoon data status` | Show freshness and row counts for each source |
|
|
72
|
+
| `tycoon start` | Start Rill, Dagster, Nao, and the web UI |
|
|
73
|
+
| `tycoon stop` | Stop all services |
|
|
74
|
+
| `tycoon ask chat` | Query your data in natural language (Nao) |
|
|
75
|
+
| `tycoon run <tool>` | Passthrough to dbt, dlt, rill, dagster |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## tycoon.yml Reference
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
name: my-project
|
|
83
|
+
version: 0.1.0
|
|
84
|
+
|
|
85
|
+
database:
|
|
86
|
+
raw: data/raw.duckdb # dlt output (or md: URI for MotherDuck)
|
|
87
|
+
warehouse: data/warehouse.duckdb # dbt output — read by Rill and Nao
|
|
88
|
+
|
|
89
|
+
dbt_project_dir: dbt_project # path to dbt project (yours or tycoon-scaffolded)
|
|
90
|
+
rill_dir: rill # path to Rill dashboard definitions
|
|
91
|
+
|
|
92
|
+
stack: # generated by tycoon init — edit as needed
|
|
93
|
+
ingestion: dlt # dlt | airbyte | fivetran | meltano | none
|
|
94
|
+
ingestion_managed: true # false = tycoon won't run `data sources run`
|
|
95
|
+
warehouse: duckdb # duckdb | motherduck | snowflake | bigquery | other
|
|
96
|
+
transformation_managed: true # false = tycoon won't scaffold or overwrite dbt
|
|
97
|
+
bi: rill # rill | metabase | looker | tableau | other | none
|
|
98
|
+
bi_managed: true # false = tycoon won't start Rill
|
|
99
|
+
orchestrator: dagster # dagster | airflow | prefect | other | none
|
|
100
|
+
orchestrator_managed: true # false = tycoon won't start Dagster
|
|
101
|
+
|
|
102
|
+
sources:
|
|
103
|
+
my-github:
|
|
104
|
+
type: github # matches a catalog source name
|
|
105
|
+
schema: raw_github # schema name in the raw DuckDB file
|
|
106
|
+
config:
|
|
107
|
+
access_token: ${GITHUB_TOKEN} # env vars are interpolated
|
|
108
|
+
owner: my-org
|
|
109
|
+
repo: my-repo
|
|
110
|
+
|
|
111
|
+
ask: # optional — requires tycoon[ask]
|
|
112
|
+
llm:
|
|
113
|
+
provider: ollama # fully local, no API key required
|
|
114
|
+
port: 5005
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Each source produces its own raw DuckDB file: `data/raw_<source>.duckdb`. All sources write into `data/warehouse.duckdb` after transformation.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Catalog Sources
|
|
122
|
+
|
|
123
|
+
These sources are available via `tycoon data sources add <name>`. They are downloaded on demand via `dlt init` and not bundled in the package.
|
|
124
|
+
|
|
125
|
+
| Source | Category | Key Tables |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| `github` | Developer | commits, issues, pull_requests, repositories |
|
|
128
|
+
| `slack` | Communication | channels, messages, users |
|
|
129
|
+
| `stripe` | Finance | customers, invoices, products, subscriptions |
|
|
130
|
+
| `hubspot` | CRM | companies, contacts, deals, tickets |
|
|
131
|
+
| `notion` | Knowledge | databases, pages, users |
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Data Directory
|
|
136
|
+
|
|
137
|
+
Raw DuckDB files follow the naming convention `raw_<source>.duckdb` (written by ingestion) while `warehouse.duckdb` is the single transformed database read by Rill and Nao. See `data/README.md` for details.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Rill Dashboards
|
|
142
|
+
|
|
143
|
+
Rill is a local-first BI tool. Dashboard definitions are YAML files in the `rill/` directory.
|
|
144
|
+
Launch Rill via `tycoon start` or `tycoon start --only rill`.
|
|
145
|
+
|
|
146
|
+
Auto-generate dashboards for a source after ingestion:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
tycoon data analyze my-source --rill
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
This exports each raw table to Parquet, then generates Rill source, metrics view, and explore
|
|
153
|
+
files — one dashboard per table. The `--rill` flag is opt-in; dashboard generation is skipped
|
|
154
|
+
by default since it requires a Rill project directory (`rill/`) to already exist.
|
|
155
|
+
|
|
156
|
+
**Architecture**: sources read from Parquet via Rill's `local_file` connector into its
|
|
157
|
+
built-in in-memory OLAP. Dashboards are immediately usable without a dbt run.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Optional Extras
|
|
162
|
+
|
|
163
|
+
### Dagster orchestration (`tycoon[dagster]`)
|
|
164
|
+
|
|
165
|
+
Installs Dagster, dagster-dbt, and dagster-dlt. Provides a full asset graph covering ingestion and transformation. Run the Dagster UI with:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
dagster dev
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
The workspace is defined in `workspace.yaml` at the project root.
|
|
172
|
+
|
|
173
|
+
### AI queries (`tycoon[ask]`)
|
|
174
|
+
|
|
175
|
+
Installs Nao and Ibis for natural language querying of the warehouse. Requires a running LLM — Ollama (local) is supported out of the box with no API key.
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
tycoon ask init
|
|
179
|
+
tycoon ask sync
|
|
180
|
+
tycoon ask chat
|
|
181
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# data/
|
|
2
|
+
|
|
3
|
+
This directory holds all DuckDB database files for the project. It is listed in `.gitignore` and is not committed to the repository.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Files
|
|
8
|
+
|
|
9
|
+
### Raw databases (dlt output)
|
|
10
|
+
|
|
11
|
+
One file per source, written by dlt ingestion pipelines:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
raw_<source>.duckdb
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Examples:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
raw_github.duckdb
|
|
21
|
+
raw_slack.duckdb
|
|
22
|
+
raw_stripe.duckdb
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
These files contain the raw schema as produced by dlt, including dlt metadata tables (`_dlt_loads`, `_dlt_pipeline_state`). They are attached **read-only** in the dbt profile to prevent transformation runs from writing back to the raw layer.
|
|
26
|
+
|
|
27
|
+
### Warehouse database (dbt output)
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
warehouse.duckdb
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Written by dbt transformation runs. This is the single database read by Rill dashboards and Nao AI queries. All mart and report models land here.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Naming Convention
|
|
38
|
+
|
|
39
|
+
| File | Written by | Read by |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| `raw_<source>.duckdb` | `tycoon data sources run <source>` | dbt (read-only attach) |
|
|
42
|
+
| `warehouse.duckdb` | `tycoon data transform run` | Rill, Nao, `tycoon data db` |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Notes
|
|
47
|
+
|
|
48
|
+
- Do not manually edit or delete these files while a pipeline or dbt run is in progress.
|
|
49
|
+
- To reset a source, delete its raw DuckDB file and re-run ingestion.
|
|
50
|
+
- To reset the warehouse, delete `warehouse.duckdb` and re-run `tycoon data transform run`.
|
|
51
|
+
- The `tycoon data db` command opens an interactive DuckDB shell on `warehouse.duckdb`.
|