CLI Installation
Learn how to install and set up the StackShare CLI.
Beta
The StackShare CLI is currently in beta. Features may change and we'd love your feedback!
Install the StackShare CLI to scan your projects and automatically detect the tools you're using.
Prerequisites
- Node.js 18+ - Download from nodejs.org
Verify Node.js is installed:
node --version # Should be v18 or higherQuick Start (No Installation)
The fastest way to use the CLI is with npx - no installation required:
npx stackshare scanThis will scan your current directory and detect tools automatically.
Global Installation
For frequent use, install the CLI globally:
npm install -g stackshareOr using pnpm:
pnpm add -g stackshareAuthentication
The CLI will prompt you to authenticate when you first try to post a stack. You have two options:
Browser Authentication
When prompted, the CLI opens a browser window for you to sign in. After authenticating, your API key is saved automatically.
API Key
You can also authenticate directly with an API key:
stackshare login <your-api-key>Generate an API key from your account settings.
Environment Variable
For CI/CD usage, set the STACKSHARE_API_KEY environment variable instead of using stackshare login.
Verify Installation
Check that the CLI is installed correctly:
stackshare --versionAvailable Commands
stackshare scan [directory] # Scan a directory for tools (default command)
stackshare login [api-key] # Authenticate with StackShare
stackshare logout # Remove stored authenticationNext Steps
Once installed, you can start scanning your projects: