NanoDocs

Examples

Here are some practical examples of how to use the NanoSights CLI for managing your NanoSights packages.

Setting Up a New Project

# Install analytics and insights packages
nanos install analytics insights

# Your package.json will now include:
# "nano-analytics": "^1.x.x"
# "nano-insights": "^1.x.x"

Updating to Specific Versions

# Update analytics to version 1.2.0
nanos install analytics@1.2.0

# This is equivalent to:
# npm install nano-analytics@1.2.0

Managing Multiple Packages Interactively

# Launch interactive removal
nanos remove

# Select multiple packages with space, then press enter
? What do you want to remove?
❯◉ analytics
 insights
 custom

Integration with npm

The NanoSights CLI is a wrapper around npm commands, which means:

  • All standard npm behaviors apply (e.g., package-lock.json updates)
  • Packages are installed in your node_modules folder
  • Dependencies are added to your package.json
  • You can still use regular npm commands alongside the CLI

Last updated on