Skip to content

Commit 1dcd3a3

Browse files
amoebaianmcookzeroshade
authored
docs: document auth command, private drivers (#263)
- Adds a new guide for private drivers - Minimally links in notes about private drivers in other pages. - Adds a "since_version" badge using mkdocs-macros so we can mark things as being only available in certain releases. Closes #252 --------- Co-authored-by: Ian Cook <ianmcook@gmail.com> Co-authored-by: Matt Topol <zotthewizard@gmail.com>
1 parent ec0cbf7 commit 1dcd3a3

10 files changed

Lines changed: 290 additions & 3 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ cdn-dev
4747

4848
.venv
4949
.claude
50+
51+
__pycache__

docs/concepts/driver_registry.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ limitations under the License.
1616

1717
# Driver Registry
1818

19-
dbc installs drivers from a "driver registry" which is an internet-accessible index of installable [ADBC driver](./driver.md) packages. Currently, dbc supports a single driver registry which is located at [https://dbc-cdn.columnar.tech](https://dbc-cdn.columnar.tech) and is managed by [Columnar](https://columnar.tech).
19+
dbc installs drivers from a "driver registry" which is an internet-accessible index of installable [ADBC driver](./driver.md) packages.
2020

21-
When you run a command like [`dbc search`](../reference/cli.md#search) or [`dbc install`](../reference/cli.md#install), dbc gets information about the drivers that are available in the driver registry by downloading `index.yaml` from [https://dbc-cdn.columnar.tech](https://dbc-cdn.columnar.tech/index.yaml) or using a cached copy.
21+
By default, dbc is configured to communicate with Columnar's public and private driver registries. Most drivers will be from the public registry but some will be marked with a `[private]` label which means they're from the private registry. See [Private Drivers](../guides/private_drivers.md) for information on how to install and use private drivers.
22+
23+
When you run a command like [`dbc search`](../reference/cli.md#search) or [`dbc install`](../reference/cli.md#install), dbc gets information about the drivers that are available from each configured registry by downloading its `index.yaml` or using a cached copy.

docs/guides/finding_drivers.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ $ dbc search sql
4949
• sqlite - An ADBC driver for SQLite developed under the Apache Software Foundation
5050
```
5151

52+
## Private Drivers
53+
54+
If you are [logged in](./private_drivers.md) to a private registry, you will see some drivers marked with a `[private]` label:
55+
56+
```console
57+
$ dbc search
58+
...
59+
oracle [private] An ADBC driver for Oracle Database developed by Columnar
60+
```
61+
62+
These drivers can be [installed](./installing.md) and added to [driver lists](../concepts/driver_list.md) just like regular drivers.
63+
5264
## Options
5365

5466
### Verbose

docs/guides/private_drivers.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<!--
2+
Copyright 2026 Columnar Technologies Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
17+
# Private Drivers
18+
19+
{{ since_version('v0.2.0') }}
20+
21+
Most drivers available with dbc are hosted on Columnar's public [driver registry](../concepts/driver_registry.md). However, some of the drivers you see when you run `dbc search` may be marked with a `[private]` label.
22+
23+
To install and use these drivers, you must:
24+
25+
1. Log in to [Columnar Cloud](https://cloud.columnar.tech) with dbc
26+
2. Start a trial license
27+
28+
Continue reading to learn how to log in and start a trial.
29+
30+
## Logging In
31+
32+
To log into Columnar's private driver registry, run `dbc auth login`. This will automatically create an account for you the first time you log in.
33+
34+
You will see the following in your terminal and your default web browser will be opened:
35+
36+
```console
37+
$ dbc auth login
38+
Opening https://auth.columnar.tech/activate?user_code=XXXX-XXXX in your default web browser...
39+
⠏ Waiting for confirmation...
40+
```
41+
42+
In your browser, you will see a **Device Confirmation** prompt and, once you click **Confirm**, you will be redirected to log in with the provider of your choice. Once you log in, you will be redirected to [Columnar Cloud](https://cloud.columnar.tech/). Keep the tab open and continue on to the next step.
43+
44+
## Starting a Trial
45+
46+
To install and use a private driver, you must start a trial and obtain a license. This is a separate step from logging in.
47+
48+
Licenses can be obtained from your [Account](https://cloud.columnar.tech/account) page on Columnar Cloud by clicking **Start Free 14-Day Trial**. Follow any instructions in the dialog that opens up and click **Accept** to create your license.
49+
50+
### Downloading Your License
51+
52+
dbc will automatically download your license if you:
53+
54+
1. Have an active license
55+
2. Run `dbc install` with a private driver
56+
57+
If you'd prefer to download the license manually, you can click **Download License File** and place the downloaded file in the appropriate location for your operating system:
58+
59+
- Windows: `%LocalAppData%/dbc/credentials`
60+
- macOS: `~/Library/Application Support/Columnar/dbc/credentials`
61+
- Linux: `~/.local/share/dbc/credentials`
62+
63+
You may also use a custom location by setting the environment variable `XDG_DATA_HOME` to an absolute path of your choosing. If you do this, you must ensure you set the same value of `XDG_DATA_HOME` when loading drivers with the [driver manager](../concepts/driver_manager.md) for the drivers to find your license.
64+
65+
## Logging Out
66+
67+
To log out, run `dbc auth logout`.
68+
69+
By default, the `logout` command doesn't purge any driver licenses from your system and only removes your login credentials. If you wish remove the local copy of your license run:
70+
71+
```console
72+
$ dbc auth logout --purge
73+
```
74+
75+
!!! note
76+
77+
Note that this command only removes the local copy of your license and does not cancel any active licenses you may have in your [Columnar Cloud](https://cloud.columnar.tech) account.
78+
79+
!!! warning
80+
81+
ADBC drivers that require a license (i.e., private drivers) will stop working after you run this command. You can re-download your license with `dbc auth login`. See [Downloading Your License](#downloading-your-license).
82+
83+
84+
## API Keys
85+
86+
dbc also supports logging in to private driver registries via API key. This is primarily intended for use in [Continuous Integration](https://en.wikipedia.org/wiki/Continuous_integration) systems or any system where logging in with a web browser is not possible.
87+
88+
To create an API key, open a web browser to your [API keys](https://cloud.columnar.tech/apikeys) page.
89+
90+
!!! note inline end
91+
92+
If you've already created an API key, you will see a **Create API Key** button instead.
93+
94+
If you haven't created any API keys before, you will see a **Create Your First API Key** button. After clicking it, enter a name, optionally choose an expiration, and click **Create**. On the following screen, you will see your new API key and instructions to copy it to your clipboard.
95+
96+
!!! note
97+
98+
API keys grant full access to your account so be sure to store it in a secure way.
99+
100+
101+
Then to use your API key to log in, run:
102+
103+
```console
104+
$ dbc auth login --api-key "<YOUR_API_KEY_HERE>"
105+
```
106+
107+
Once you've run this successfully, dbc is now logged in and you can install private drivers as you would normally.

docs/macros.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2026 Columnar Technologies Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
def define_env(env):
17+
@env.macro
18+
def since_version(version):
19+
"""Create a "since v1.2.3" badge for annotation features with.
20+
21+
Args:
22+
version: git tag for version
23+
"""
24+
return (
25+
f'<span class="version-badge">'
26+
f'<a href="https://github.com/columnar-tech/dbc/releases/{version}" target="_blank">SINCE {version}</a>'
27+
f'</span>'
28+
)

docs/reference/cli.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ $ dbc [OPTIONS] <COMMAND>
4646
<dt><a href="#sync">dbc sync</a></dt><dd><p>Install the drivers from the <a href="../../concepts/driver_list/">driver list</a></p></dd>
4747
<dt><a href="#info">dbc info</a></dt><dd><p>Get information about a driver</p></dd>
4848
<dt><a href="#docs">dbc docs</a></dt><dd><p>Open driver documentation in a web browser</p></dd>
49+
<dt><a href="#auth">dbc auth</a></dt><dd><p>Manage driver registry credentials</p></dd>
4950
</dl>
5051

5152
## search
@@ -301,3 +302,52 @@ $ dbc docs <DRIVER>
301302
`--quiet`, `-q`
302303

303304
: Suppress all output
305+
306+
## auth
307+
308+
{{ since_version('v0.2.0') }}
309+
310+
<h3>Usage</h3>
311+
312+
```console
313+
$ dbc auth login
314+
$ dbc auth logout
315+
```
316+
317+
<h3>Subcommands</h3>
318+
319+
### login
320+
321+
<h3>Arguments</h3>
322+
323+
`REGISTRYURL`
324+
325+
: Optional. URL of the driver registry to authenticate with. Defaults to [https://dbc-cdn-private.columnar.tech/](https://dbc-cdn-private.columnar.tech/).
326+
327+
<h3>Options</h3>
328+
329+
`--clientid CLIENTID`
330+
331+
: OAuth Client ID (can also be set via `DBC_OAUTH_CLIENT_ID`)
332+
333+
`--api-key API-KEY`
334+
335+
: Authenticate using an API key instead of OAuth (use '-' to read from stdin)
336+
337+
### logout
338+
339+
<h3>Arguments</h3>
340+
341+
`REGISTRYURL`
342+
343+
: Optional. URL of the driver registry to log out from. Defaults to [https://dbc-cdn-private.columnar.tech/](https://dbc-cdn-private.columnar.tech/).
344+
345+
<h3>Options</h3>
346+
347+
`--purge`
348+
349+
: Remove all local auth credentials for dbc
350+
351+
!!! warning
352+
353+
ADBC drivers that require a license (i.e., private drivers) will stop working after you run this command. You can re-download your license with `dbc auth login`. See [Downloading Your License](../guides/private_drivers.md#downloading-your-license).

docs/stylesheets/extra.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,35 @@
22
--md-default-bg-color: rgb(33, 33, 33);
33
--md-code-bg-color: rgb(45, 45, 45);
44
}
5+
6+
/* since_version badge styling. see macros.py */
7+
.version-badge {
8+
background: var(--md-accent-fg-color);
9+
color: var(--md-accent-bg-color);
10+
padding: 2px 6px;
11+
border-radius: 3px;
12+
font-size: 0.75em;
13+
font-weight: bold;
14+
display: inline-block;
15+
}
16+
17+
.version-badge a {
18+
color: inherit;
19+
text-decoration: none;
20+
}
21+
22+
.version-badge a:hover {
23+
color: inherit;
24+
text-decoration: underline;
25+
}
26+
27+
/* Disable highlighting for shell built-ins. This means words in console blocks
28+
like echo, export, logout, and source will use the same color as other commands
29+
and won't show up highlighted as purple. */
30+
.highlight .nb {
31+
color: inherit;
32+
}
33+
534
/* Hide the site name in the header... */
635
.md-header__title .md-header__topic:first-of-type {
736
display: none !important;

mkdocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ nav:
4646
- Using a Driver List: guides/driver_list.md
4747
- Driver Managers: guides/driver_manager.md
4848
- Python Notebooks: guides/python_notebooks.md
49+
- Private Drivers: guides/private_drivers.md
4950
- Concepts:
5051
- concepts/index.md
5152
- Driver: concepts/driver.md
@@ -119,6 +120,8 @@ exclude_docs: |
119120
extra_javascript:
120121
- scripts/extra.js
121122
plugins:
123+
- macros:
124+
module_name: docs/macros
122125
- privacy
123126
- search
124127
- social:

0 commit comments

Comments
 (0)