@cside.dev/cli

0.0.23 • Public • Published

@cside.dev/cli

A CLI tool for securing script paths in your HTML output by proxying them through https://proxy.csidetm.com/.

Usage

To run the latest version of this tool, use the following command:

npm_config_yes=true npx @cside.dev/cli@latest example.com

A little breakdown of what this command means:

  • npx – Executes the CLI tool without requiring a global install.
  • @cside.dev/cli@latest – Ensures you're using the most up-to-date version.
  • npm_config_yes=true– Suppresses the installation confirmation prompt, making it CI-friendly.
  • example.com– Replace with your actual domain to correctly resolve relative paths.

How it works

This CLI processes all script paths in your HTML files and prefixes them with https://proxy.csidetm.com/, ensuring they are proxied server-side.

Additionally, it injects a script that protects dynamically added scripts.

Available Options

To see a list of available options, simply run:

npx @cside.dev/cli --help

which will return all the available options:

Usage: @cside.dev/cli <domain> [options]

Positionals:
  domain  The domain to process                                         [string]

Options:
      --version                        Show version number             [boolean]
  -d, --dir                            Directory which include html files to pro
                                       cess. By default we'll try to look for a
                                       `.next` and `dist` folder.       [string]
  -f                                   Use a single file instead of a dir.
                                                                        [string]
  -s, --silent                         Disable outputting processed html files.
                                                      [boolean] [default: false]
      --enable-first-party-proxy       Enable first party proxy
                                                      [boolean] [default: false]
      --enable-script-tracking         Enable script tracking
                                                       [boolean] [default: true]
      --enable-security-headers-check  Enable security headers check
                                                       [boolean] [default: true]
      --excluded-scripts               Excluded scripts    [array] [default: []]
  -h, --help                           Show help                       [boolean]

Readme

Keywords

none

Package Sidebar

Install

npm i @cside.dev/cli

Weekly Downloads

102

Version

0.0.23

License

ISC

Unpacked Size

120 kB

Total Files

3

Last publish

Collaborators

  • martijn.cuppens
  • devlooskie