| Crates.io | photonos |
| lib.rs | photonos |
| version | 0.3.0 |
| created_at | 2025-04-16 14:06:42.099827+00 |
| updated_at | 2025-04-22 13:09:31.332738+00 |
| description | A wget-like CLI that renders JavaScript-powered pages using Chromium with pure Rust |
| homepage | |
| repository | https://github.com/4383/photonos |
| max_upload_size | |
| id | 1636483 |
| size | 101,092 |
Photonos is a wget-like tool that can render JavaScript-powered websites using a headless browser, allowing you to capture the fully rendered HTML content and take screenshots of modern web applications.
Once the requirements are met (see Requirements section below), you can install Photonos directly from crates.io:
cargo install photonos
Photonos works similar to wget, but with JavaScript rendering:
photonos https://example.com -o output.html --screenshot screenshot.png
Photonos has two main dependencies:
Chrome or Chromium is required as it's the browser engine used for rendering web pages. Install it for your distribution:
sudo apt-get update
sudo apt-get install -y chromium-browser
sudo dnf install -y chromium
sudo pacman -S chromium
Rust and Cargo are needed to build and install Photonos:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
Photonos uses chromiumoxide, a pure Rust library to control the Chrome/Chromium browser. This allows it to:
The pure Rust approach leverages the power of modern browser rendering while maintaining the performance benefits of Rust.
If you can't run Photonos after installation, make sure that Cargo's bin directory is in your PATH:
export PATH="$HOME/.cargo/bin:$PATH"
For persistent configuration, add this line to your ~/.bashrc, ~/.zshrc, or equivalent shell configuration file.