All Projects → sindresorhus → Capture Website Cli

sindresorhus / Capture Website Cli

Licence: mit
Capture screenshots of websites from the command-line

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Capture Website Cli

Capture Website
Capture screenshots of websites
Stars: ✭ 1,075 (+97.25%)
Mutual labels:  screenshots, npm-package, puppeteer
Fast Cli
Test your download and upload speed using fast.com
Stars: ✭ 2,178 (+299.63%)
Mutual labels:  cli-app, npm-package
Ohshitgit
⁉️Oh shit! A cli tool to help you unfuck your git mistakes
Stars: ✭ 135 (-75.23%)
Mutual labels:  cli-app, npm-package
Terminal Image Cli
Display images in the terminal
Stars: ✭ 234 (-57.06%)
Mutual labels:  cli-app, npm-package
Wait For Localhost Cli
Wait for localhost to be ready from the command-line
Stars: ✭ 101 (-81.47%)
Mutual labels:  cli-app, npm-package
Doge Seed Cli
Generate dank mnemonic seed phrases in the terminal
Stars: ✭ 118 (-78.35%)
Mutual labels:  cli-app, npm-package
Do Not Disturb Cli
Control the macOS `Do Not Disturb` feature from the command-line
Stars: ✭ 205 (-62.39%)
Mutual labels:  cli-app, npm-package
Slugify Cli
Slugify a string
Stars: ✭ 49 (-91.01%)
Mutual labels:  cli-app, npm-package
web-ext-deploy
A tool for deploying WebExtensions to multiple stores.
Stars: ✭ 28 (-94.86%)
Mutual labels:  cli-app, puppeteer
MinifyAllCli
📦 A lightweight, simple and easy npm tool to 𝗺𝗶𝗻𝗶𝗳𝘆 JSON/C, HTML and CSS! Also known as MinifyAll core! ⭐ Usable as 𝑪𝑳𝑰 tool or 𝒊𝒎𝒑𝒐𝒓𝒕𝒂𝒃𝒍𝒆 in TS/JS as a 𝑴𝑶𝑫𝑼𝑳𝑬 🥰
Stars: ✭ 21 (-96.15%)
Mutual labels:  npm-package, cli-app
docker-google-lighthouse-puppeteer
Google Lighthouse + Puppeteer / Docker Image
Stars: ✭ 29 (-94.68%)
Mutual labels:  npm-package, puppeteer
Forge Node App
🛠📦🎉 Generate Node.js boilerplate with optional libraries & tools
Stars: ✭ 90 (-83.49%)
Mutual labels:  cli-app, npm-package
Delay Cli
Delay execution for a given amount of seconds
Stars: ✭ 74 (-86.42%)
Mutual labels:  cli-app, npm-package
Replace In Files Cli
Replace matching strings and regexes in files
Stars: ✭ 129 (-76.33%)
Mutual labels:  cli-app, npm-package
Term Img Cli
Display images in iTerm
Stars: ✭ 70 (-87.16%)
Mutual labels:  cli-app, npm-package
Run Electron
Run Electron without all the junk terminal output
Stars: ✭ 187 (-65.69%)
Mutual labels:  cli-app, npm-package
Conduct
🖖 Generate a Code of Conduct for your project
Stars: ✭ 360 (-33.94%)
Mutual labels:  cli-app, npm-package
Np
A better `npm publish`
Stars: ✭ 6,401 (+1074.5%)
Mutual labels:  cli-app, npm-package
Github Spray
Draw on your GitHub contribution graph ░▒▓█
Stars: ✭ 908 (+66.61%)
Mutual labels:  cli-app, npm-package
Unsplash Wallpaper
Use an image from unsplash.com as your background image from a simple command.
Stars: ✭ 238 (-56.33%)
Mutual labels:  cli-app, npm-package

capture-website-cli

Capture screenshots of websites from the command-line

It uses Puppeteer (Chrome) under the hood.

Install

$ npm install --global capture-website-cli

Note to Linux users: If you get a "No usable sandbox!" error, you need to enable system sandboxing.

Usage

$ capture-website --help

  Usage
    $ capture-website <url|file>
    $ echo "<h1>Unicorn</h1>" | capture-website

  Options
    --output                 Image file path (writes it to stdout if omitted)
    --width                  Page width  [default: 1280]
    --height                 Page height  [default: 800]
    --type                   Image type: png|jpeg  [default: png]
    --quality                Image quality: 0...1 (Only for JPEG)  [default: 1]
    --scale-factor           Scale the webpage `n` times  [default: 2]
    --list-devices           Output a list of supported devices to emulate
    --emulate-device         Capture as if it were captured on the given device
    --full-page              Capture the full scrollable page, not just the viewport
    --no-default-background  Make the default background transparent
    --timeout                Seconds before giving up trying to load the page. Specify `0` to disable.  [default: 60]
    --delay                  Seconds to wait after the page finished loading before capturing the screenshot  [default: 0]
    --wait-for-element       Wait for a DOM element matching the CSS selector to appear in the page and to be visible before capturing the screenshot
    --element                Capture the DOM element matching the CSS selector. It will wait for the element to appear in the page and to be visible.
    --hide-elements          Hide DOM elements matching the CSS selector (Can be set multiple times)
    --remove-elements        Remove DOM elements matching the CSS selector (Can be set multiple times)
    --click-element          Click the DOM element matching the CSS selector
    --scroll-to-element      Scroll to the DOM element matching the CSS selector
    --disable-animations     Disable CSS animations and transitions  [default: false]
    --no-javascript          Disable JavaScript execution (does not affect --module/--script)
    --module                 Inject a JavaScript module into the page. Can be inline code, absolute URL, and local file path with `.js` extension. (Can be set multiple times)
    --script                 Same as `--module`, but instead injects the code as a classic script
    --style                  Inject CSS styles into the page. Can be inline code, absolute URL, and local file path with `.css` extension. (Can be set multiple times)
    --header                 Set a custom HTTP header (Can be set multiple times)
    --user-agent             Set the user agent
    --cookie                 Set a cookie (Can be set multiple times)
    --authentication         Credentials for HTTP authentication
    --debug                  Show the browser window to see what it's doing
    --dark-mode              Emulate preference of dark color scheme
    --launch-options         Puppeteer launch options as JSON
    --overwrite              Overwrite the destination file if it exists
    --inset                  Inset the screenshot relative to the viewport or \`--element\`. Accepts a number or four comma-separated numbers for top, right, left, and bottom.

  Examples
    $ capture-website https://sindresorhus.com --output=screenshot.png
    $ capture-website index.html --output=screenshot.png
    $ echo "<h1>Unicorn</h1>" | capture-website --output=screenshot.png
    $ capture-website https://sindresorhus.com | open -f -a Preview

  Flag examples
    --width=1000
    --height=600
    --type=jpeg
    --quality=0.5
    --scale-factor=3
    --emulate-device="iPhone X"
    --timeout=80
    --delay=10
    --wait-for-element="#header"
    --element=".main-content"
    --hide-elements=".sidebar"
    --remove-elements="img.ad"
    --click-element="button"
    --scroll-to-element="#map"
    --disable-animations
    --no-javascript
    --module=https://sindresorhus.com/remote-file.js
    --module=local-file.js
    --module="document.body.style.backgroundColor = 'red'"
    --header="x-powered-by: capture-website-cli"
    --user-agent="I love unicorns"
    --cookie="id=unicorn; Expires=Wed, 21 Oct 2018 07:28:00 GMT;"
    --authentication="username:password"
    --launch-options='{"headless": false}'
    --dark-mode
    --inset=10,15,-10,15
    --inset=30

FAQ

Click here.

Related

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].