Skip to content

Atlan CLI

Limited functionality (so far)

You can use Atlan's command-line interface (CLI) to manage some metadata in Atlan. Currently data contracts and metadata for a limited set of asset types can be managed through the CLI.

Obtain the CLI

0.1.0

For now, the CLI must be downloaded as a pre-built binary:

Disclaimer — closed preview

This feature is in closed preview and therefore any download and installation from this link will be subject to the terms applicable to Product Release Stages . Contact your Atlan Customer Success Manager for your preview today.

If your organization is already part of the closed preview, your installation of the feature from this link shall become subject to the terms and scope of preview as agreed with your organization. Accordingly, any use of the feature outside the agreed scope may result in revocation of the closed preview for your organization. Please contact your system administrator before downloading.

Recommended

When installed via Homebrew, you can easily keep things up-to-date. If you do not use it already, see Homebrew's own installation documents for setting up Homebrew itself .

brew tap atlanhq/atlan
brew install atlan
curl -o atlan.tgz -L https://github.com/atlanhq/atlan-cli-releases/releases/latest/download/atlan_Darwin_arm64.tar.gz
tar xf atlan.tgz
curl -o atlan.tgz -L https://github.com/atlanhq/atlan-cli-releases/releases/latest/download/atlan_Darwin_amd64.tar.gz
tar xf atlan.tgz
curl -o atlan.tgz -L https://github.com/atlanhq/atlan-cli-releases/releases/latest/download/atlan_Linux_amd64.tar.gz
tar -zxf atlan.tgz
curl -o atlan.zip -L https://github.com/atlanhq/atlan-cli-releases/releases/latest/download/atlan_Windows_amd64.zip
unzip atlan.zip

Configure the CLI

0.1.0

You can configure the CLI using a config file or in some cases environment variables, with the following minimum settings1:

.atlan/config.yaml
1
2
3
4
5
atlan_api_key: eyZid92...  # (1)
atlan_base_url: https://tenant.atlan.com  # (2)
log:
  enabled: false  # (3)
  level: info  # (4)
  1. An API token that has access to your assets.
  2. The base URL of your tenant (including the https://).
  3. (Optional) Enable logging to produce more details on what the CLI is doing.
  4. When logging is enabled, specify the level of verbosity.
Environment variables
1
ATLAN_API_KEY=eyZid92...  # (1)
  1. An API token that has access to your assets.

Define data sources

You should also define data sources in the config file:

.atlan/config.yaml
 6
 7
 8
 9
10
11
12
data_source snowflake:  # (1)
  type: snowflake  # (2)
  connection:  # (3)
    name: snowflake-prod  # (4)
    qualified_name: "default/snowflake/1234567890"  # (5)
  database: db  # (6)
  schema: analytics  # (7)
  1. Each data source definition must start with data_source, followed by a space and a unique reference name for the data source (snowflake in this example).

    Reference name is your choice

    The reference name you give in the configuration file is only used here and as a reference in any data contracts you define. It need not match the name of the connection or data source in Atlan itself.

  2. You must indicate the type of connector for the data source (see connector types for options).

  3. Details of the connection must also be provided.
  4. You must provide the name of the connection, as it appears in Atlan.
  5. You must provide the unique qualified_name of the connection in Atlan.
  6. (Optional) You can also specify the database to use for this connection's assets by default, if none is specified in the data contract.
  7. (Optional) You can also specify the schema to use for this connection's assets by default, if none is specified in the data contract.

These ensure the CLI can map the details you specify in your data contract to the appropriate corresponding asset in Atlan.

What's next?

With the CLI, you can:


  1. When both are specified, environment variables will take precedence.