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-cliOr use it directly with npx without installation:
npx nanos-cli install analyticsQuick Start
Once installed, the nanos command becomes available in your terminal:
# Install a package
nanos install analytics
# Remove a package
nanos remove analyticsUsage
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.0Removing 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 removeInteractive Mode
Run any command without arguments to enter interactive mode, where you can select packages using checkboxes:
nanos installThis will present you with a list of available packages:
? What do you want to install?
❯◯ analytics
◯ insights
◯ customUse the arrow keys to navigate, space to select, and enter to confirm.
Available Packages
The CLI provides convenient aliases for NanoSights packages:
| Alias | NPM Package | Description |
|---|---|---|
analytics | nano-analytics | Track user behavior and website analytics |
insights | nano-insights | Analyze page performance metrics |
custom | nano-custom | Log custom events and interactions |
Last updated on