turbot/namecheap
GitHub
steampipe plugin install namecheapsteampipe plugin install namecheap

Namecheap + Steampipe

Namecheap is a domain name registrar and web hosting company

Steampipe is an open-source zero-ETL engine to instantly query cloud APIs using SQL.

List domains in your Namecheap account:

select
domain,
expires
from
namecheap_domain
order by
domain;
+--------------+---------------------------+
| domain | expires |
+--------------+---------------------------+
| steampipe.io | 2025-04-19T20:00:00-04:00 |
| turbot.com | 2024-03-07T20:00:00-04:00 |
+--------------+---------------------------+

Documentation

Quick start

Install

Download and install the latest Namecheap plugin:

steampipe plugin install namecheap

Credentials

ItemDescription
CredentialsNamecheap requires a username or API user and an API key for all requests.
PermissionsAPI keys have the same permissions as the user who creates them, and if the user permissions change, the API key permissions also change.
RadiusEach connection represents a single Namecheap Installation.
Resolution1. Credentials explicitly set in a steampipe config file (~/.steampipe/config/namecheap.spc)
2. Credentials specified in environment variables, e.g., NAMECHEAP_USERNAME, NAMECHEAP_API_USER and NAMECHEAP_API_KEY.

Configuration

Installing the latest namecheap plugin will create a config file (~/.steampipe/config/namecheap.spc) with a single connection named namecheap:

Configure your account details in ~/.steampipe/config/namecheap.spc:

connection "namecheap" {
plugin = "namecheap"
# Username/API User is required for requests. Required.
# This can also be set via the `NAMECHEAP_USERNAME` environment variable.
# username = "janedoe"
# A specific API User can also be defined. Optional, by default, this will be
# set to the `username`.
# This can also be set via the `NAMECHEAP_API_USER` environment variable.
# api_user = "janedoe"
# API key for requests. Required.
# See instructions at https://www.namecheap.com/support/api/intro/.
# This can also be set via the `NAMECHEAP_API_KEY` environment variable.
# api_key = "33d0d62a6a163083ba7b3bab31bd6612"
}

Alternatively, you can also use the standard Namecheap environment variables to obtain credentials only if other arguments (username, api_user and api_key) are not specified in the connection:

export NAMECHEAP_USERNAME=janedoe
export NAMECHEAP_API_USER=janedoe
export NAMECHEAP_API_KEY=33d0d62a6a163083ba7b3bab31bd6612

Postgres FDW

This plugin is available as a native Postgres FDW. Unlike Steampipe CLI, which ships with an embedded Postgres server instance, the Postgres FDW can be installed in any supported Postgres database version.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_postgres_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/postgres.sh)" -- namecheap

The installer will prompt you for the plugin name and version, download and install the appropriate files for your OS, system architecture, and Postgres version.

To configure the Postgres FDW, you will create an extension, foreign server, and schema and import the foreign schema.

CREATE EXTENSION IF NOT EXISTS steampipe_postgres_namecheap;
CREATE SERVER steampipe_namecheap FOREIGN DATA WRAPPER steampipe_postgres_namecheap OPTIONS (config '<your_config>');
CREATE SCHEMA namecheap;
IMPORT FOREIGN SCHEMA namecheap FROM SERVER steampipe_namecheap INTO namecheap;

SQLite Extension

This plugin is available as a SQLite Extension, making the tables available as SQLite virtual tables.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_sqlite_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/sqlite.sh)" -- namecheap

The installer will prompt you for the plugin name, version, and destination directory. It will then determine the OS and system architecture, and it will download and install the appropriate package.

To configure the SQLite extension, load the extension module and then run the steampipe_configure_namecheap function to configure it with plugin-specific options.

$ sqlite3
sqlite> .load ./steampipe_sqlite_extension_namecheap.so
sqlite> select steampipe_configure_namecheap('<your_config>');

Export

This plugin is available as a standalone Export CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- namecheap

You can pass the configuration to the command with the --config argument:

steampipe_export_namecheap --config '<your_config>' <table_name>