Skip to content
Node.js CLI tool to register and manage domains on namecheap.com
JavaScript CSS HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.documentary/section-breaks
.vscode
compile/bin
doc
docs
documentary
example
images
man
splendid
src
test
types
wiki
.alamoderc.json
.eslintignore
.eslintrc
.gitignore
CHANGELOG.md
LICENSE
README-source.md
README.md
demo.gif
package.json
yarn.lock

README.md

namecheap

expensive

npm version

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.

Package Manager Command
Yarn yarn global add expensive
Npm npm i -g expensive

Expensive Demo Of Registering A Domain Name In CLI

Table Of Contents

Configuration

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.

Sandbox

To use the sandbox version of the app for testing, either the SANDBOX environmental variable needs to be set, or --sandbox or -s flags should be passed.

CLI

The program can be used from the terminal.

expensive -h
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.
Command Meaning Wiki
expensive List all domains. 📜List Domains
expensive hello world example.com Check domain(s)' availability. Check Availability
expensive example.com -i Display information about a domain associated with the account. ℹ️Domain Information
expensive example.com -w Request WHOIS data. 👁Show Whois
expensive example.com -r Register a domain name. 💵Registration
expensive --init Initialises or updates settings such as API key. 🔏Initialise Config
expensive domain.com --github Updates hosts records to include GitHub apex records. GitHub Pages
expensive --version Print version. Version
expensive --help Show help. Usage

Result Log

A log of search queries and found free domains is written to HOMEDIR/.expensive.log.

Copyright

Art Deco © Art Deco 2019 Tech Nation Visa Tech Nation Visa Sucks

You can’t perform that action at this time.