Workspace setup
A workspace ready for the dltHub platform is a regular Python project with a few additions. You can easily convert any existing dlt project into a dltHub workspace.
1. Enable dltHub platform features
Initialize the workspace:
uvx dlthub-init@latest
uvx dlthub-init@latest scaffolds a ready-to-run workspace—the .dlt/.workspace marker that turns on workspace mode, local config and secrets, a managed pyproject.toml, and the dltHub AI skills your coding agent uses—then installs dependencies with uv sync.
The .dlt/.workspace marker activates profile support and enables the dlthub CLI command (including dlthub profile and dlthub local). Run uvx dlthub-init@latest --help for options like --no-sync. If you'd rather flip the toggle by hand, see Enable workspace mode.
2. Log in to the dltHub platform
dlthub login
This opens a GitHub OAuth device flow and authenticates the current user. Then bind this repo to a remote workspace:
dlthub workspace connect [<name_or_id>] [--org-id <id>]
With no argument, an interactive picker is shown, grouped by organization. The chosen workspace_id (and organization_id, on the first connect) is persisted to .dlt/config.toml. To list workspaces you have access to, use dlthub workspace list.
The first time you run dlthub deploy, dlthub run, or dlthub serve, the CLI walks you through GitHub OAuth and then prompts you to pick (or create) a remote workspace — so you can skip this step entirely.
organization_id is write-once. To switch organizations later, remove the line from .dlt/config.toml by hand and run dlthub workspace connect again.
A single GitHub repository can be connected to only one remote workspace at a time. You connect with dlthub workspace connect. If you point the same repo at a different remote workspace, jobs deployed under the previous binding are deactivated — run history is preserved but their triggers no longer fire.
Connecting multiple local repositories to the same remote workspace is not yet supported.
3. Add pipelines
dlthub pipeline init <source> <destination>
This reuses the same machinery as dlt init, so verified sources and templates work as you'd expect. See Initialize a pipeline for templates, verified sources, and the agentic setup.
Credentials and configs
Understanding workspace profiles
The dltHub platform uses profiles to manage different configurations for different environments. Some profiles stay local; others are synchronized with the backend. Local-only profiles live in your repo and are never uploaded. Synced profiles are pushed to the dltHub platform on every deploy so the cloud runtime can use the same configuration when it executes your jobs.
The built-in profiles are:
| Profile | Scope | Purpose | Credentials |
|---|---|---|---|
dev | Local only | Local development (default when running on your machine) | Local DuckDB / test credentials |
tests | Local only | Automated tests | Test credentials |
prod | Synced with backend | Production batch jobs running on the dltHub platform | Read/write access to your destination |
access | Synced with backend | Interactive notebooks and dashboards on the dltHub platform | Read-only access (for safe data exploration) |
Any custom profile you reference in a job decorator (e.g. require={"profile": "analytics"}) is also synced to the cloud configuration.
When you run a script locally, dlt uses dev. When the dltHub platform executes a batch job, it uses prod. When the dltHub platform serves an interactive job (notebook, dashboard, MCP), it uses access. If access is not configured, interactive jobs fall back to prod.
See profiles in dltHub for the full reference.
Setting up configuration files
Configuration files live in the .dlt/ directory:
.dlt/
├── .workspace # Marker file enabling profiles + the `dlthub` CLI
├── config.toml # Workspace-wide config (all profiles)
├── secrets.toml # Workspace-wide secrets (gitignored)
├── dev.config.toml # Dev profile config
├── prod.config.toml # Production profile config