{"_id":"@aquabx/unbuilt-cli","_rev":"2-3ecc1cfbdbd6dceaf5b4f331da912be6","name":"@aquabx/unbuilt-cli","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.0":{"name":"@aquabx/unbuilt-cli","version":"0.2.0","keywords":["cli","website","analysis","technology","detection"],"author":{"name":"Artem Yavorskyi","email":"aqson@me.com"},"license":"MIT","_id":"@aquabx/unbuilt-cli@0.2.0","maintainers":[{"name":"aquabx","email":"tom.chauvel@hotmail.com"}],"bin":{"unbuilt":"bin/cli.js"},"dist":{"shasum":"4a06d8275fb08c8e2d809e3223792e22c139f157","tarball":"https://registry.npmjs.org/@aquabx/unbuilt-cli/-/unbuilt-cli-0.2.0.tgz","fileCount":5,"integrity":"sha512-eNDwhhj4tktErNAmKKBD9lr2CRdGOZN9KKpSCVpKJd+75QhkAuV2AbWRp0H1rIjE9DGjHvyLS2CyfwoTci3ufg==","signatures":[{"sig":"MEYCIQDdKdebxEuukTcMs7DtY9duX8FmVC43pTAs1CV6G06qgwIhAOAvMWrEakY7P3BTW0SFYVbyqkrYFjSy5NQKemtY74Tl","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8863761},"main":"./build/index.js","type":"commonjs","engines":{"node":">=20.0.0"},"exports":{".":"./build/index.js"},"gitHead":"d52ec2ded186930385a9dd755d707ab97419425d","scripts":{"dev":"tsx scripts/build.ts --watch","lint":"eslint src","build":"tsc && tsx scripts/build.ts"},"_npmUser":{"name":"aquabx","email":"tom.chauvel@hotmail.com"},"_npmVersion":"11.11.0","description":"CLI tool to analyze technologies used on websites via unbuilt.app","directories":{},"_nodeVersion":"25.8.0","dependencies":{"ora":"^5.4.1","axios":"^1.6.2","boxen":"^8.0.1","chalk":"^4.1.2","uuidv4":"^6.2.13","p-queue":"^8.1.0","commander":"^11.1.0","csv-parse":"^5.6.0","playwright":"^1.48.1","@unbuilt/helpers":"^0.1.0","@unbuilt/analyzer":"^0.1.0","console-table-printer":"^2.11.2"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.19.5","ts-node":"^10.9.1","typescript":"^5.2.2","@types/node":"^20.5.7","esbuild-node-externals":"^1.8.0","@typescript-eslint/parser":"^6.5.0","@typescript-eslint/eslint-plugin":"^6.5.0"},"_npmOperationalInternal":{"tmp":"tmp/unbuilt-cli_0.2.0_1773064713906_0.8437293855318622","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@aquabx/unbuilt-cli","version":"0.2.1","description":"CLI tool to analyze technologies used on websites via unbuilt.app","main":"./build/index.js","bin":{"unbuilt":"bin/cli.js"},"exports":{".":"./build/index.js"},"type":"commonjs","keywords":["cli","website","analysis","technology","detection"],"author":{"name":"Artem Yavorskyi","email":"aqson@me.com"},"scripts":{"build":"tsc && tsx scripts/build.ts","dev":"tsx scripts/build.ts --watch","lint":"eslint src"},"license":"MIT","dependencies":{"axios":"^1.6.2","chalk":"^4.1.2","boxen":"^8.0.1","p-queue":"^8.1.0","csv-parse":"^5.6.0","uuidv4":"^6.2.13","commander":"^11.1.0","playwright":"^1.48.1","console-table-printer":"^2.11.2","ora":"^5.4.1"},"devDependencies":{"@unbuilt/analyzer":"^*","@unbuilt/helpers":"^*","@types/node":"^20.5.7","@typescript-eslint/eslint-plugin":"^6.5.0","@typescript-eslint/parser":"^6.5.0","esbuild":"^0.19.5","esbuild-node-externals":"^1.8.0","ts-node":"^10.9.1","typescript":"^5.2.2"},"engines":{"node":">=20.0.0"},"gitHead":"d52ec2ded186930385a9dd755d707ab97419425d","_id":"@aquabx/unbuilt-cli@0.2.1","_nodeVersion":"25.8.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-OixYOse86hXfWgzkeJ05Jg6da1ADMeuhUtgHJWQVwYQnNsjmylkwfyxxjy6OlEnIZPr3kQlSQQieKo2VbqmfXg==","shasum":"ecad37e9f73c435ef766eb75f6060e725dcbd5ca","tarball":"https://registry.npmjs.org/@aquabx/unbuilt-cli/-/unbuilt-cli-0.2.1.tgz","fileCount":5,"unpackedSize":8863753,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCbDi1so+At/R37PfEjKW78JdtNYjAhHizpegIFBkQsEAIgDef+IQSu7hzVSkVPVhl+KTE9mnmcvwtdEHtMag9kYYw="}]},"_npmUser":{"name":"aquabx","email":"tom.chauvel@hotmail.com"},"directories":{},"maintainers":[{"name":"aquabx","email":"tom.chauvel@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/unbuilt-cli_0.2.1_1773065070046_0.6657281696114745"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-09T13:58:33.845Z","modified":"2026-03-09T14:04:30.465Z","0.2.0":"2026-03-09T13:58:34.154Z","0.2.1":"2026-03-09T14:04:30.341Z"},"author":{"name":"Artem Yavorskyi","email":"aqson@me.com"},"license":"MIT","keywords":["cli","website","analysis","technology","detection"],"description":"CLI tool to analyze technologies used on websites via unbuilt.app","maintainers":[{"name":"aquabx","email":"tom.chauvel@hotmail.com"}],"readme":"# Unbuilt CLI Documentation\n\n@unbuilt/cli is a command-line tool for analyzing the technologies used on websites. It can detect frameworks, libraries, and other technical details by analyzing the structure and content of web applications.\n\n## Installation\n\n```bash\nnpm install -g @unbuilt/cli\n```\n\n### Prerequisites\n\nFor local (default) analysis mode, Playwright is required:\n\n```bash\n# Install Playwright browsers\nnpx playwright install chromium\n```\n\nThis is necessary because Unbuilt uses a headless browser to visit websites and analyze their technology stack. The remote analysis mode doesn't require Playwright to be installed locally as it runs on the Unbuilt server.\n\n## Commands\n\nUnbuilt CLI provides three main commands:\n\n- `analyze`: Analyze a single website. (the analyze keyword can be omitted - ex. `unbuilt mysite.com`)\n- `batch`: Analyze multiple websites from a CSV file\n- `status`: Check the status of an ongoing remote analysis\n\n## Analyzing a Single Website\n\n### Basic Usage\n\n```bash\nunbuilt https://example.com\n```\n\nThis will analyze the website locally using a headless browser and display the detected technologies.\n\n### Options\n\n| Option | Description |\n|--------|-------------|\n| `-r, --remote` | Run analysis remotely via unbuilt server (runs locally by default) |\n| `-s, --save` | Saves the analysis results to the database, which serves as a cache for future runs. By default, CLI analyses are executed without caching results. Available only for admins (you need to set UNBUILT_API_KEY env variable when running). |\n| `-n, --async` | Enable asynchronous execution - returns a job ID immediately instead of waiting for the result. This ID can be used to check status or retrieve results later with the `unbuilt status` command. Only available when using `--remote`. |\n| `-r, --refresh` | Force a fresh analysis by bypassing the cache. Ignores any previously saved results and rebuilds the cache with new data. |\n| `-t, --timeout <seconds>` | Max time to wait for analysis to complete (default: 120) |\n| `-j, --json` | Output results in JSON format |\n| `--session` | Use a copy of the current user's Chrome profile data for authentication and session preservation. This allows the analysis to be performed with the user's existing login sessions and cookies without modifying the original profile. The temporary profile copy is automatically cleaned up when the browser context is closed. |\n\n### Examples\n\n```bash\n# Run a local analysis\nunbuilt https://example.com\n\n# Run a local analysis with user's session data (logged-in state)\nunbuilt https://example.com --session\n\n# Run a remote analysis\nunbuilt https://example.com --remote\n\n# Run a local analysis and save the results to DB (cache).\nunbuilt https://example.com --save\n\n# Run a local analysis with longer timeout\nunbuilt https://example.com --timeout 30000\n\n# Get JSON output\nunbuilt https://example.com --json\n\n# Run a remote analysis asynchronously. Will return <analysisId>.\nunbuilt https://example.com --remote --async\n\n# Use <analysisId> to get results.\nunbuilt status <analysisId>\n```\n\n## Analyzing Multiple Websites (Batch Mode)\n\nThe batch command allows you to analyze multiple websites from a CSV file.\n\n### CSV File Format\n\nCreate a CSV file with a list of URLs to analyze. The file should have a column header named `url` (or the first column will be used if there's no header).\n\nExample `websites.csv`:\n```\nurl\nhttps://example.com\nhttps://example.org\nhttps://example.net\n```\n\n### Basic Usage\n\n```bash\nunbuilt batch websites.csv\n```\n\n### Options\n\n| Option | Description |\n|--------|-------------|\n| `-j, --json` | Output results in JSON format |\n| `-s, --save` | Save the analysis results to the database |\n| `-o, --output <file>` | Save results to a specified output file |\n| `-t, --timeout <seconds>` | Max time to wait for each analysis (default: 120) |\n| `-c, --concurrent <number>` | Maximum number of concurrent analyses (default: 1) |\n\n### Examples\n\n```bash\n# Analyze all websites in the CSV file\nunbuilt batch websites.csv\n\n# Analyze multiple websites concurrently (4 at a time)\nunbuilt batch websites.csv --concurrent 4\n\n# Save the results to a CSV file\nunbuilt batch websites.csv --output results\n\n# Save the results to a JSON file\nunbuilt batch websites.csv --output results.json --json\n\n# Analyze websites and save to database\nunbuilt batch websites.csv --save\n\n# Set a longer timeout for each analysis\nunbuilt batch websites.csv --timeout 300\n```\n\n## Checking Analysis Status\n\nWhen using remote analysis in async mode, you can check the status of an ongoing analysis using the `status` command.\n\n### Basic Usage\n\n```bash\nunbuilt status <analysisId>\n```\n\n### Options\n\n| Option | Description |\n|--------|-------------|\n| `-j, --json` | Output results in JSON format |\n\n### Example\n\n```bash\nunbuilt status abc123-def456-ghi789\n```\n\n## User Session Workflow\n\nWhen using the `--session` option, the CLI implements the following workflow:\n\n1. Creates a temporary copy of the user's Chrome profile data directory\n2. Removes any lock files from the temporary copy\n3. Launches a browser context using this temporary profile copy\n4. Performs the website analysis with all the user's existing cookies, login sessions, and authentication tokens\n5. Automatically cleans up the temporary profile directory when the browser context closes\n\nThis approach allows for secure and efficient analysis of authenticated websites **without**:\n- Modifying the user's original Chrome profile\n- Requiring users to manually log in during analysis\n- Storing sensitive credentials in the CLI tool\n\nThe session option is particularly useful for analyzing:\n- Authenticated web applications\n- Sites with login-only content\n- Applications that behave differently for logged-in users\n\n## Output Format\n\nBy default, Unbuilt displays the analysis results in a human-readable format, showing the detected technologies grouped by category.\n\nWhen using the `--json` flag, the output will be in JSON format, which is useful for programmatic processing or integration with other tools.\n\n## Performance Considerations\n\n- Local analysis is faster for analyzing a single website.\n- Remote analysis is more resource-efficient for your local machine.\n- Batch analysis with multiple concurrent processes is the fastest way to analyze many websites.\n- Increasing the `--concurrent` parameter will speed up batch analysis, but requires more system resources.\n\n## Using with Database Storage\n\nWhen using the `--save` option, analysis results are stored in a database for future reference. This allows for:\n\n- Faster retrieval of previously analyzed websites\n- Building historical data about technology usage\n- Sharing analysis results with team members\n\nAvailable only for admins (you need to set `UNBUILT_API_KEY` env variable when running. Contact aqson@me.com in order to get access).\n\n## Examples of Common Workflows\n\n### Quick Technology Check\n\n```bash\nunbuilt https://example.com\n```\n\n### Analysis of Authentication-Required Website\n\n```bash\nunbuilt https://app.example.com --session\n```\n\n### In-depth Analysis with JSON Output for Further Processing\n\n```bash\nunbuilt https://example.com --json > analysis.json\n```\n\n### Batch Analysis of Many Sites with Results Saved to CSV\n\n```bash\nunbuilt batch websites.csv --concurrent 4 --output tech-analysis\n```\n\n### Batch Analysis with Database Storage\n\n```bash\nUNBUILT_API_KEY=\"xxxxx\" unbuilt batch websites.csv --concurrent 4 --save\n```\n\n\n\n## Troubleshooting\n\nIf you encounter issues with the tool, try the following:\n\n- Ensure you have a stable internet connection\n- For batch analysis, start with a smaller number of concurrent processes\n- Check that the URL format in your CSV file is correct (should include http:// or https://)\n- For local (default) mode, ensure Playwright is properly installed (`npx playwright install chromium`)\n- For websites with complex security measures, try using remote analysis mode instead\n- When using `--session` with the analyze command, ensure Chrome is not currently running to avoid profile lock issues\n- In case of loading resources error, check redirects following the resource and try final URL.","readmeFilename":"README.md"}