expensive is a namecheap.com client to check domain availability, obtain WHOIS information, register domains, update DNS hosts and control domains' name servers via the CLI. It allows to login using 2-factor authentication and white-list IP addresses without having to use the web interface. The package uses the API and Web API libraries to make requests.
|Yarn||yarn global add expensive|
|Npm||npm i -g expensive|
Table Of Contents
Upon the first run the program will ask a series of questions:
Username: <namecheap-username> Api key https://ap.www.namecheap.com/settings/tools/apiaccess/: <api key> Client ip [10.10.10.10]: <the ip> Last 3 digit of phone to use for 2 factor auth: <055>
After they've been answered,
expensive will remember the answers and store them in the
.expensiverc file in the home directory (or
.expensive-sandboxrc), and use this data for all calls to the API.
Client IP is required for requests, but if not given, it will be acquired automatically each time prior to calls.
The last 3 digits will be used to during the second-stage of the 2-factor web auth required to white-list unknown IP addresses.
To use the
sandbox version of the app for testing, either the
SANDBOX environmental variable needs to be set, or
-s flags should be passed.
The program can be used from the terminal.
expensive A CLI application to access namecheap.com domain name registrar API. domains The domain name for operations, or multiple domain names for checking availability. --init, -I Initialise package configuration interactively, i.e., the API key and ip address. --info, -i Show the information for the domain. --register, -r Register the domain. --whois, -w Display brief WHOIS data. --Whois Display full WHOIS data. --coupon Find this month's coupon. --sandbox, -s Use the sandbox API. --whitelistIP, -W Add current IP address to the list of white-listed ones. --version, -v Display the current version number. --help, -h Show help information. expensive domain.com --info Display the information about the domain on the account. Also displays DNS hosts if using Namecheap's DNS. expensive Print the list of domains belonging to the account. --sort, -S Sort by this field (name, expire, create). --desc, -D Sort in descending order. --filter, -F Filter by this word. --pageSize, -P The page size. --type, -T Domain type (ALL, EXPIRING, EXPIRED). expensive domain.com [--TXT|CNAME|address 10.10.10.10] ... Manipulate DNS Records. --record The record type. Can be one of the following: A, AAAA, ALIAS, CAA, CNAME, MX, MXE, NS, TXT, URL, URL301, FRAME. --TXT Add a TXT record with this address to the domain. Alias for --type TXT --address <TXT>. --CNAME Add a CNAME record with this address to the domain. --type CNAME --address <CNAME>. --ttl When adding host records, sets the _TTL_. By default, namecheap sets 1800. --host The host name for adding dns records. Default: @. --address The address of the new host record. --mxpref MX preference for hosts. Applicable to MX records only. --github, -g Setup GitHub pages for the apex domain as per docs https://git.io/fjyr7 Also removes the parking page and URL redirect. All other hosts are kept itact. --delete Remove the specified host record. expensive domain.com -r [-p PROMO] Register the domain name. Expensive will attempt to find the promo code online, and compare its price to the normal price. --promo, -p Use this promo code on registration. --years, -y The number of years that the domain should be registered for. expensive domain|domain.com [domain.org] [-f] [-z app,page] Check domains for availability. When no TLD is given, com, net, org, biz, co, cc, io, bz, nu, app, page are checked. --free, -f Display only free domains. --zones, -z Check in these zones only.
||List all domains.|
||Check domain(s)' availability.|
||Display information about a domain associated with the account.|
||Request WHOIS data.|
||Register a domain name.|
||Initialises or updates settings such as API key.|
||Updates hosts records to include GitHub apex records.||GitHub Pages|
A log of search queries and found free domains is written to
|© Art Deco 2019||Tech Nation Visa Sucks|