Skip to main content

Using the DuckDB CLI

Installation

caution

MotherDuck runs on vanilla DuckDB and currently supports DuckDB version v0.9.2 only. Support for v0.10.0 is coming soon!

Download and install the DuckDB binary, depending on your operating system.

  1. Download the 64-bit Windows binary here
  2. Extract the Zip File.
  3. Run DuckDB using ./duckdb

For more information, see the DuckDB installation documentation.

Connect to MotherDuck

You can connect to MotherDuck by executing the following in DuckDB. DuckDB will automatically download and load the signed MotherDuck extension.

.open motherduck:

Or shorter using the alias:

.open md:

DuckDB will prompt you to authenticate with MotherDuck using your default web browser. Follow the instructions displayed in the terminal.

Test your MotherDuck connection using the following command. It will run in the cloud to display a list of your MotherDuck databases.

show databases;

Congrats 🎉 You are connected!

Now you can create databases and switch between them. You can also connect to your local DuckDB databases alongside databases hosted in MotherDuck, and interact with both!

To know more about how to persist your authentication credentials, read Authenticating to MotherDuck

Upgrading MotherDuck via the DuckDB CLI:

If you have previously installed the extension, but we have upgraded the service, you may need to run the FORCE INSTALL command as shown in the following example.

FORCE INSTALL motherduck