Metadata-Version: 2.4
Name: dlthub-init
Version: 0.1.0
Summary: Scaffold a dltHub workspace into a new or existing directory.
Project-URL: Homepage, https://github.com/dlt-hub/dlthub-init
Project-URL: Repository, https://github.com/dlt-hub/dlthub-init
Project-URL: Issues, https://github.com/dlt-hub/dlthub-init/issues
Author: dltHub
License: dltHub License
        
        Copyright 2026 ScaleVector, GmbH. All rights reserved.
        
        
        ## Definitions
        
        "Agreement" means the agreement between ScaleVector, GmbH and its affiliates
        (collectively, "dltHub") and you governing the use of dltHub Services, including
        dltHub Platform, as those terms are defined in the applicable dltHub Terms of Use
        available at: https://dlthub.com/terms.
        
        "dltHub Services" means dltHub Platform and any other products or services offered
        by dltHub, as defined in the Agreement.
        
        "Derivative Works" means any work that is based on, incorporates, or is derived
        from the Licensed Materials, including but not limited to code generated with the
        assistance of the Licensed Materials, modified copies, adaptations, and projects
        into which the Licensed Materials is installed or integrated.
        
        "Licensed Materials" means the source code, object code, data, and/or other works,
        including educational materials, to which this license applies.
        
        ## Scope of Use
        
        You may view, use, copy, modify, publish, and distribute the Licensed Materials
        solely in connection with dltHub Services under a governing Agreement. Any use of
        the Licensed Materials outside of dltHub Services is not permitted under this
        license.
        
        Without limiting the foregoing, the following are examples of permitted use:
        
        1. Using toolkits and skills provided by dltHub to develop, build, test,
           and deploy data pipelines on dltHub Platform.
        2. Copying and modifying toolkit code for use exclusively with dltHub Services and on
           dltHub Services.
        3. Using the Licensed Materials to generate code intended for deployment on dltHub
           Platform.
        
        The following are examples of uses that are NOT permitted under this license:
        
        1. Using toolkits and skills provided by dltHub to generate code or pipelines for 
           deployment on a third-party runtime platform or orchestration service that is not
           part of dltHub Services.
        2. Modifying toolkits to replace, bypass, or substitute components that are part of
           dltHub services in order to operate within a third-party development environment.
        3. Incorporating the Licensed Materials or Derivative Works into any product or
           service that competes with the Licensed Materials, or any other dltHub Services.
        4. Providing the Licensed Materials to third parties as part of a hosted or managed
           service that replicates the functionality of dltHub Services.
        
        Use beyond the scope of this license requires a separate license agreement
        negotiated with dltHub on a case-by-case basis.
        
        
        ## Redistribution
        
        Redistribution of the Licensed Materials, with or without modification, is
        permitted provided that this license notice is included in all copies or substantial
        portions of the Licensed Materials. All recipients are bound by the same scope of
        use restrictions set forth in this license.
        
        ## Intellectual Property
        
        dltHub retains all right, title, and interest in and to the Licensed Materials as
        originally published.
        
        dltHub waives all intellectual property claims over Derivative Works, provided that:
        
        1. The use of the Licensed Materials complies with the scope of use set forth in
           this license, and
        2. This license notice is retained in all copies or substantial portions of the
           Licensed Materials contained within the Derivative Works.
        
        This waiver extends to the Licensed Materials itself as incorporated into Derivative
        Works — you are free to use, modify, and distribute it within your Derivative Works
        without further restriction, subject only to the scope of use and redistribution
        terms above.
        
        
        ## Disclaimer and Limitation of Liability
        
        THE LICENSED MATERIALS ARE PROVIDED "AS IS" WITH ALL FAULTS. DLTHUB AND ITS
        LICENSORS DISCLAIM ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, STATUTORY, OR
        OTHERWISE, INCLUDING WITHOUT LIMITATION THE WARRANTIES OF MERCHANTABILITY, FITNESS
        FOR A PARTICULAR PURPOSE, TITLE, AND NONINFRINGEMENT. DLTHUB AND ITS LICENSORS'
        TOTAL AGGREGATE LIABILITY RELATING TO OR ARISING OUT OF YOUR USE OF OR DLTHUB'S
        PROVISIONING OF THE LICENSED MATERIALS SHALL BE LIMITED TO ONE THOUSAND DOLLARS
        ($1,000). IN NO EVENT SHALL DLTHUB OR ITS LICENSORS BE LIABLE FOR ANY LOST PROFITS,
        LOSS OF REVENUE, LOST BUSINESS, COSTS OF COVER OR ANY INCIDENTAL, SPECIAL,
        EXEMPLARY OR PUNITIVE DAMAGES OF ANY KIND OR NATURE IN CONNECTION WITH THIS LICENSE
        OR THE LICENSED MATERIALS.
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Requires-Python: >=3.10
Requires-Dist: beaupy>=3.9
Requires-Dist: rich>=13.7
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# dlthub-init (beta)

Scaffold a [dltHub](https://dlthub.com) workspace into a new or existing directory.

`dlthub-init` lays down the files of a minimal dltHub workspace — `pyproject.toml`,
a locked `uv.lock`, and the `.dlt/` configuration — and optionally creates the
virtual environment. That is all it does: it does not log in, run a pipeline, or
install agent toolkits.

Unlike `dlthub-start`, it is safe to run inside an existing repository. It is
non-destructive by default: it never overwrites your files, and it stops before
writing anything if a generated path would collide with something already there.

## Usage

```bash
uvx dlthub-init             # initialize the current directory
uvx dlthub-init my-workspace  # initialize ./my-workspace
```

After scaffolding, `dlthub-init` offers to create a virtual environment and
install dependencies with `uv`.

### Options

| Flag | Effect |
| --- | --- |
| `--no-sync` | Scaffold files only; do not create a venv or install dependencies. |
| `--force` | Overwrite existing generated files (never secrets). |
| `--merge` | Append missing entries to an existing `.gitignore` instead of skipping it. |
| `--no-pyproject` | Skip `pyproject.toml`. |
| `--no-gitignore` | Skip `.gitignore`. |
| `--verbose`, `-v` | Stream output from `uv`. |

## Collision behavior

`dlthub-init` is safe to run in an existing directory:

- Missing files are **created**.
- The run stops only if `.dlt/.workspace` already exists — the directory is
  already a dltHub workspace (override with `--force`).
- Otherwise existing files are **left alone** and reported as skipped: your
  `pyproject.toml`, `.dlt/config.toml`, and `.dlt/secrets.toml` are never
  overwritten, and `.gitignore` is skipped (or **merged** with `--merge`).
- `uv.lock` is written only when `pyproject.toml` is created, so the lockfile
  always matches the workspace's dependencies.
- `--force` overwrites the generated files (never secrets).

## Development

```bash
make dev      # install dev dependencies
make lint     # ruff + mypy
make test     # unit tests
make ci       # full local CI
```

The bundled workspace lives in `src/dlthub_init/scaffolds/minimal_workspace`.
After editing its `pyproject.toml`, run `make scaffold-lock-upgrade` to refresh
the committed `uv.lock`.
