百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

siteaudit

> 编程语言
开源

从终端对您的站点进行站点审计

392 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

从终端对您的站点进行站点审计

Siteaudit: Generate audit benchmark for your site

Siteaudit will analyze your site and generate audit for:

  • Pagespeed
  • Lighthouse
  • A11y

Installation

Use nodejs

You can use siteaudit from your terminal using the npm package and run it as a binary

bash
npm -g i siteaudit

siteaudit --url https://canellariccardo.it

or you can use siteadit inside your node application

javascript
const SiteAudit = require('siteaudit/lib/node');

SiteAudit.start('https://canellariccardo.it', {
  pagespeed: true,
  lighthouse: false,
  a11y: true,
  outputFolder: '/output',
  customAppenName: `-${Date.now()}`,
});

Use docker

You can also use the docker image to generate the reports

Passing no configuration

bash
docker run -t \
-v "$(pwd)/.testoutput":"/app/output" \
thecreazy/siteaudit:latest \
--url https://canellariccardo.it \
--headless

Passing configuration

bash
docker run -t \
-v "$(pwd)/.testoutput":"/app/output" \
-v "$(pwd)/.siteaudit.json":"/.siteaudit.json"
thecreazy/siteaudit:latest \
--url https://canellariccardo.it \
--no-lighthouse \
--config /.siteaudit.json \
--headless

Runtime options

  • --url specify the base url to test
  • --output specify the output directory (where your assets will be generated)
  • --config specify a JSON file containing an extension to the configuration
  • --no-pagespeed no pagespeed audit will be generated
  • --no-lighthouse no lighthouse audit will be generated
  • --no-a11y start without a11y audit
  • --headless use chrome headless

Using ENV

You can also use environments for passing the options

  • SITEAUDIT_NOLIGHTHOUSE no lighthouse audit will be generated
  • SITEAUDIT_NOPAGESPEED no pagespeed audit will be generated
  • SITEAUDIT_CONFIG specify a JSON file containing an extension to the configuration
  • SITEAUDIT_URL pass the url for running the audit
  • SITEAUDIT_A11Y no a11y audit will be generated
  • SITEAUDIT_HEADLESS use chrome headless
  • SITEAUDIT_USINGENV force the use of the environments

Configuration

If you pass to siteaudit an additional JSON file, it will be merged with initial config.

bash
siteaudit --url https://canellariccardo.it --config ./config.json

Example:

json
{
  "pagespeed": {
    "pages": ["/", "/404"]
  }
}

config.son

You can also pass a custom config json, there are some examples:

  • pagespeed
javascript
{
  "pagespeed":{
    "strategy" :  [ "mobile", "desktop"], // Strategy to use when analyzing the page. this is the base settings, you can only use mobile | desktop
    "locale": "en_US", // Locale results should be generated in.
    "threshold": "70", // Threshold score to pass the PageSpeed test. Useful for setting a performance budget.
    "pages": ["/"]. //Array of relative pages to analyze, default is only / (please, use relative path)
  }
}
  • lighthouse

For full list of settings options see here.

…

Using in gitlab-ci

You can also use siteaudit in your gitlabci.yml

yaml
stages:
  - audit

audit:
  image:
    name: thecreazy/siteaudit:latest
    entrypoint: ['']
  stage: audit
  variables:
    SITEAUDIT_URL: 'https://canellaricardo.it'
  script:
    - echo "started siteaudit"
    - /usr/local/bin/siteaudit --url=${SITEAUDIT_URL} --headless
  artifacts:
    paths:
      - output

Output

siteaudit will generate this output:

  • lighthouse-audit.html: contains the classic html result of lighthouse
  • pagespeed-audit.md: a markdown format result of the pagespeed api
  • a11y-audit.md: a markdown format result of the a11y api

Output examples

Contributing

Reporting bugs

  • Open a GitHub issue

Contributing with patches and bug fixes

  • Open a new GitHub pull request with the patch.
  • Ensure the PR description clearly describes the problem and solution.

Contributors

  • Riccardo Canella @thecreazy

License

MIT

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScripthacktoberfesthacktoberfest2021

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言