Documentation
Quickstart
macOS

Quickstart

Follow the steps below to start syncing data from CloudQuery source plugins (opens in a new tab) to destination plugins (opens in a new tab).

Download CloudQuery CLI

You can download the precompiled binary from releases (opens in a new tab), or using CLI:

brew install cloudquery/tap/cloudquery

Sign in with CloudQuery

To sign in from the CLI, run the following command:

cloudquery login

A new browser window will open where you will complete the sign-in process.

You will be able to create a new account when you sign in with the CLI for the first time. Alternatively, head to CloudQuery Cloud (opens in a new tab) to create a new account.

For a non-interactive sign-in process and sync, you can generate an API key. This is useful for production deployments.

Create a Sync Configuration

CloudQuery supports many sources (opens in a new tab) and destinations (opens in a new tab).

In this guide we'll create a configuration to sync from the XKCD source (opens in a new tab) to the SQLite destination (opens in a new tab) using the init command.

Run the following command to create a configuration file:

cloudquery init --source xkcd --destination sqlite --spec-path xkcd_to_sqlite.yaml

To pick from a list of available sources and destinations, run the init command without any arguments.

Start Syncing

Run the following command to start syncing:

cloudquery sync xkcd_to_sqlite.yaml

You should see a spinner with number of resources synced and the time it took to sync.

To learn about the available options for the sync command, run cloudquery sync --help.

Examine the Data

Once the sync is done you can query the data via the database directly via the sqlite3 (opens in a new tab) command line tool or any other SQLite client.

Run the following command to get the oldest 10 XKCD comics:

sqlite3 db.sql "select num, title from xkcd_comics order by num asc limit 10"

The output should look like this:

num  title                                             
---  --------------------------------------------------
1    Barrel - Part 1                                   
2    Petit Trees (sketch)                              
3    Island (sketch)                                   
4    Landscape (sketch)                                
5    Blown apart                                       
6    Irony                                             
7    Girl sleeping (Sketch -- 11th grade Spanish class)
8    Red spiders                                       
9    Serenity is coming out tomorrow                   
10   Pi Equals

Next Steps

Now that you have successfully synced data from the XKCD source (opens in a new tab) to the SQLite destination (opens in a new tab), you can explore more sources and destinations: