Documentation Index
Fetch the complete documentation index at: https://docs.scanoss.com/llms.txt
Use this file to discover all available pages before exploring further.
SCANOSS JavaScript provides a simple, easy-to-consume library for interacting with SCANOSS APIs and engines.
Installation
Standard Installation
Install SCANOSS-JS globally using npm:
# Install from npm
npm install -g scanoss
Project Installation
Install SCANOSS-JS as a dependency in your Node.js project:
Getting Started
Basic Scanning
# Scan a directory (output to console)
scanoss-js scan /path/to/folder
# Scan with JSON output file
scanoss-js scan -o results.json /path/to/folder
# Scan with dependency detection
scanoss-js scan --dependencies -o results.json /path/to/folder
# Scan with HTML report
scanoss-js scan --dependencies --format html -o report.html /path/to/folder
Viewing Results
# View JSON results
cat results.json
# View HTML report in browser
# Windows (Git Bash/PowerShell)
start report.html
# macOS
open report.html
# Linux
xdg-open report.html
Configuration
Configuring API Access
By default, SCANOSS uses the SCANOSS OSS Knowledge Base API at https://api.osskb.org (no API key required).
To use a different endpoint or API key:
# Via command line
scanoss-js scan --apiurl https://api.scanoss.com --key <your-api-key> -o results.json /path/to/folder