NanoDocs

CLI Tool

The NanoSights CLI is a command-line tool that simplifies the management of the NanoTags. Instead of relying on full npm installs, use simple aliases like analytics, insights, and custom to install, update, and remove packages.

Installation

Install the CLI globally to use it across all your projects:

npm i -g nanos-cli

Or use it directly with npx without installation:

npx nanos-cli install analytics

Quick Start

Once installed, the nanos command becomes available in your terminal:

# Install a package
nanos install analytics

# Remove a package
nanos remove analytics

Usage

Installing Packages

Install one or more NanoSights packages using their simple aliases:

# Install a single package
nanos install analytics

# Install multiple packages
nanos install analytics insights custom

# Install a specific version
nanos install analytics@1.0.0

Removing Packages

Remove packages from your project:

# Remove a single package
nanos remove analytics

# Remove multiple packages
nanos remove analytics insights

# Interactive removal (select packages to remove)
nanos remove

Interactive Mode

Run any command without arguments to enter interactive mode, where you can select packages using checkboxes:

nanos install

This will present you with a list of available packages:

? What do you want to install?
❯◯ analytics
 ◯ insights
 ◯ custom

Use the arrow keys to navigate, space to select, and enter to confirm.

Available Packages

The CLI provides convenient aliases for NanoSights packages:

AliasNPM PackageDescription
analyticsnano-analyticsTrack user behavior and website analytics
insightsnano-insightsAnalyze page performance metrics
customnano-customLog custom events and interactions

Last updated on