Scanning Projects
Learn how to use the StackShare CLI to scan your projects and automatically detect your tech stack.
Use the StackShare CLI to automatically detect tools in your codebase and submit them as a stack.
How It Works
The CLI scanner maintains detection patterns for the top 100 tools per category across 71 StackShare categories. When you scan a project, we look for:
- Configuration files - Tool-specific config files like
tailwind.config.js,docker-compose.yml - Package manifests - Dependencies in
package.json,requirements.txt,Gemfile, etc. - File patterns - Known file patterns like
.github/workflows/*.ymlfor GitHub Actions
This approach detects tools beyond simple dependency parsing—including Vercel, GitHub Actions, Docker, Tailwind CSS, and hundreds of other tools across all categories.
See the complete list of tools with detection patterns on the Supported Tools page.
Basic Usage
Navigate to your project directory and run:
npx stackshare scanOr if you have the CLI installed globally:
stackshare scanThe CLI will detect tools and prompt you to post them to StackShare.
Command Options
stackshare scan [directory] [options]
Arguments:
directory Directory to scan (default: current directory)
Options:
-s, --stack <slug> Sync to an existing stack by slug
-S, --stack-name <n> Stack name for new stacks
-a, --all Include all detected tools (not just primary)
-n, --dry-run Scan only, do not post
-j, --json Output JSON only
-v, --verbose Show matched files for each tool
-y, --yes Skip prompts, post automatically
-r, --raw Show all detections without deduplicationExample Output
$ stackshare scan
✔ Scanned 847 files in 234ms
Detected 18 primary tools (24 total):
▸ Application & Data
● TypeScript · Languages
● React · JavaScript Frameworks
● Next.js · Frameworks (Full Stack)
● Tailwind CSS · Front-End Frameworks
▸ DevOps
● Docker · Virtual Machine Platforms
● GitHub Actions · Continuous Integration
▸ Utilities
● ESLint · Code Review
● Prettier · Code Review
● Vitest · Testing Frameworks
? What would you like to do? › Post on StackSharePosting to StackShare
After scanning, you can:
- Post on StackShare - Create a new stack or update an existing one
- Done - Exit without posting
When posting, you'll choose:
- Primary tools (recommended) - Deduplicated, one tool per function
- All tools - Includes alternatives and npm packages
- Custom selection - Choose specific tools to include
Then select where to save:
- Create new stack - Creates a stack with the inferred name (from git remote or directory)
- Update existing stack - Sync to one of your existing stacks
CI/CD Integration
Automate stack updates by running the CLI in your CI/CD pipeline. See the CI/CD Integration guide for setup instructions.
Troubleshooting
Tool not detected?
If a tool you're using isn't detected:
- Check the Supported Tools page - See if we have detection patterns for it
- Verify the detection pattern - Some tools require specific config files to be present
- Request addition - Contact us at team@stackshare.io to request a new tool or detection pattern
False positives?
If a tool is incorrectly detected, you can:
- Remove it manually after creating the stack
- Report the false positive so we can improve our patterns
Authentication errors?
Make sure you've logged in with stackshare login or set your STACKSHARE_API_KEY environment variable.