allure-kit
v0.2.3
Published
Standalone CLI toolkit for bootstrapping and maintaining an Allure 3 setup in JavaScript/TypeScript and Python projects
Maintainers
Readme
allure-kit
A standalone CLI that sets up and maintains Allure Report 3 in a JavaScript/TypeScript or Python project — the equivalent of npm init for Allure.
Why
Allure 3 is a fast, plugin-based reporting engine, but wiring it into a project by hand means a handful of separate steps: figure out which test framework(s) the project uses, install the matching adapter package for each one, hand-write an allurerc config, pick and configure report plugins, and — if you want reports published automatically — set up CI and GitHub Pages. It's easy to get one of those steps wrong or out of sync as the project evolves.
allure-kit automates all of that:
- detects test frameworks in use and installs the matching Allure adapters,
- generates and maintains
allurercconfig files (json,yaml, ormjs), - manages report plugins (add/remove/list),
- diagnoses a broken or incomplete setup (
doctor), - keeps all installed Allure packages up to date (
update), - scaffolds a GitHub Actions workflow that publishes reports to GitHub Pages.
Detected frameworks: Vitest, Playwright, Jest, Mocha, Cypress, Cucumber.js, Jasmine, CodeceptJS, Newman (Postman), and WebdriverIO (WDIO) for JS/TS; Behave, pytest, Pytest-BDD, and Robot Framework for Python.
How it works
- Framework detection reads
package.jsondependencies (or, for Python,requirements*.txt/pyproject.toml/Pipfile) and looks for known test-framework config files (playwright.config.ts,vitest.config.ts,wdio.conf.ts,pytest.ini,behave.ini, etc.) to figure out which frameworks are actually in play, then maps each one to its Allure adapter package (e.g.playwright→allure-playwright,pytest→allure-pytest). - Package manager detection looks at the lockfile —
package-lock.json/pnpm-lock.yaml/yarn.lock/bun.lock(b)for JS/TS, orpoetry.lock/pdm.lock/Pipfile.lock/requirements.txtfor Python — to install adapters with the right tool and flags. A project is treated as Python when--lang=pythonis passed or nopackage.jsonis found but a Python manifest is present. - Config generation writes an
allurercfile (JSON/YAML/ESM) wiring up the selected report plugins, defaulting to theawesomeHTML report plugin. doctorre-runs detection and cross-checks it against what's actually installed and configured, flagging missing adapters, unconfigured plugins, or an unused/stale adapter.updatefinds everyallure*/@allurereport/*package already inpackage.jsonand bumps it to latest via the detected package manager.gh-pages initwrites a.github/workflows/allure-gh-pages.ymlthat runs your tests, generates the report withallure generate, and publishes it to thegh-pagesbranch viapeaceiris/actions-gh-pages.
Everything is additive and non-destructive: init refuses to run if an allurerc already exists, and gh-pages init asks before overwriting an existing workflow.
Run
Use without installing:
npx allure-kit --helpQuick Start
# 1) Initialize Allure in your project
npx allure-kit init
# 2) Run tests so they produce allure-results
npm test
# 3) Build the report
npx allure generateIf an allurerc file already exists, init exits early and points you at allure-kit doctor / allure-kit update — it never overwrites an existing config.
For a fully non-interactive setup:
npx allure-kit init --yesFor a one-shot install of a specific framework:
npx allure-kit init --lang=js --framework=playwright
npx allure-kit init --lang=python --framework=pytestAllure 3's report generator (allure generate) is a Node.js CLI regardless of the test framework's language, so Python projects still need Node.js available to run npx allure generate — init only installs the Python-side adapter package(s) via the detected Python package manager, it doesn't add a package.json to a pure Python project.
Commands
init
allure-kit init [--lang js|ts|python] [--framework <id>] [--format json|yaml|mjs] [--yes] [--cwd <path>]Detects test frameworks (by dependencies, config files, and existing tests), installs matching adapters, and creates an allurerc config. init does not generate any demo tests — it only configures Allure. Sample tests live in a separate repository.
Flags:
--lang— project language:js/ts(treated the same) orpython/py. Without this flag,initauto-detects:package.jsonpresent → JS/TS, otherwise a Python manifest (pyproject.toml,requirements*.txt,Pipfile,setup.py/setup.cfg) present → Python, otherwise defaults to JS/TS.--framework— force-pick a single framework by id or package name (playwright,vitest,wdio,pytest,behave, ...). Implies non-interactive mode with the defaultawesomeplugin.--format—json(default),yaml, ormjsconfig format.--yes— accept defaults without prompts.--cwd— working directory.
update
allure-kit update [--yes] [--cwd <path>]Finds every installed Allure package (CLI, adapters, plugins) and updates them all to latest via your package manager.
doctor
allure-kit doctor [--cwd <path>]Checks: package manager detection, allurerc presence and validity, adapter packages for each detected framework, the allure CLI package, configured plugin packages, and adapters that are installed but no longer match a detected framework.
gh-pages init
Creates a GitHub Actions workflow that generates an Allure report and publishes it to GitHub Pages via the gh-pages branch.
allure-kit gh-pages init [--yes] [--branch <name>] [--config <path>] [--test-command <cmd>] [--cwd <path>]plugin list
allure-kit plugin list [--cwd <path>]plugin add
allure-kit plugin add <name> [--skip-options] [--cwd <path>]Prompts for confirmation before overwriting a plugin that is already configured.
plugin edit
allure-kit plugin edit <name> [--cwd <path>]Updates the options of a plugin that is already configured, pre-filled with its current values.
plugin remove
allure-kit plugin remove <name> [--uninstall] [--cwd <path>]Supported frameworks
| Framework | Adapter package |
|---|---|
| Vitest | allure-vitest |
| Playwright | allure-playwright |
| Jest | allure-jest |
| Mocha | allure-mocha |
| Cypress | allure-cypress |
| Cucumber.js | allure-cucumberjs |
| Jasmine | allure-jasmine |
| CodeceptJS | allure-codeceptjs |
| Newman (Postman) | newman-reporter-allure |
| WebdriverIO (WDIO) | @wdio/allure-reporter |
Python:
| Framework | Adapter package |
|---|---|
| Behave | allure-behave |
| pytest | allure-pytest |
| Pytest-BDD | allure-pytest-bdd |
| Robot Framework | allure-robotframework |
Python package managers pip, Poetry, PDM, and Pipenv are auto-detected the same way as the npm-family managers. pip install doesn't update any manifest on its own, so when pip is the resolved manager init also appends the installed adapter(s) to requirements.txt.
doctor and gh-pages init are JS/TS-only for now — they don't yet verify Python adapter installs or scaffold a Python CI workflow.
Report plugins
All plugins are official Allure 3 report plugins. awesome is installed by default.
| Plugin | Package | Description |
|---|---|---|
| awesome (default) | @allurereport/plugin-awesome | Interactive HTML report |
| classic | @allurereport/plugin-classic | Classic Allure HTML report |
| dashboard | @allurereport/plugin-dashboard | Summary dashboard |
| csv | @allurereport/plugin-csv | CSV export |
| log | @allurereport/plugin-log | Console log output |
| slack | @allurereport/plugin-slack | Slack notifications |
| jira | @allurereport/plugin-jira | Jira integration |
| testops | @allurereport/plugin-testops | Allure TestOps integration |
| allure2 | @allurereport/plugin-allure2 | Allure 2 compatible report format |
| testplan | @allurereport/plugin-testplan | Generates testplan.json for selective test execution |
| progress | @allurereport/plugin-progress | Shows report generation progress in console |
Manage them any time with allure-kit plugin add|remove|list.
Packages
This repo is an npm workspaces monorepo, split for internal organization — only allure-kit is published. packages/core, packages/npm, and packages/python are private and get bundled directly into allure-kit's dist/cli.cjs at build time, so installing allure-kit never pulls them in as separate packages.
| Package | What it is |
|---|---|
| allure-kit | The CLI itself — commands, prompts, bin/allure-kit.js. The only package published to npm. |
| @todti/allure-kit-core | Shared kernel: config I/O, exec, fs helpers, the report-plugin registry, and the EcosystemAdapter contract |
| @todti/allure-kit-npm | JS/TS framework detection, npm/yarn/pnpm/bun integration, and reporter-config wiring |
| @todti/allure-kit-python | Python framework detection + pip/poetry/pdm/pipenv integration |
Adding support for another language (e.g. Java) means implementing one more EcosystemAdapter package (in packages/<language>) against @todti/allure-kit-core and registering it as a devDependency of packages/cli in packages/cli/src/ecosystems.ts — no changes to init's control flow, and no new package to publish.
Development
npm install
npm run build # builds all packages in dependency order (TS project references)
npm test # runs every package's tests in one vitest run
npm run typecheckOrigin
allure-kit started as the allure kit subcommand proposed for the Allure 3 CLI in allure-framework/allure3#556. It's extracted here into a self-contained, independently publishable CLI, decoupled from the allure3 monorepo release cycle so it can ship and iterate on its own.
For the reporting engine itself, adapters, and plugins, see:
- allure-framework/allure3 — the Allure 3 monorepo
- allurereport.org — official docs
- allure-framework/allure3#556 — the original PR this project was extracted from
