Skip to content
GitHub

Your first report

This guide walks through creating a new report bundle, previewing it in the browser, and exporting a PDF. It assumes you have bino installed and available on your PATH.

  1. Create a new workdir

    A workdir is the root directory of a report bundle. Run bino init to scaffold a new project. By default, it creates a directory named rainbow-report.

    bino init

    Without flags, bino init asks a few questions (target directory, report name, title, language). Use -y / --yes to accept defaults non-interactively.

  2. Inspect the generated files

    Navigate into the newly created directory:

    cd rainbow-report

    After initialization, the workdir contains YAML manifests, data files, and helper files. Typical contents include:

    • A bino.toml project configuration file marking the project root
    • One or more ReportArtefact manifests describing the report outputs
    • DataSource and DataSet manifests defining input data and SQL transforms
    • At least one LayoutPage describing page layout
    • ComponentStyle and Internationalization manifests for styling and translations
    • A .bnignore file tuned for bino caches and build artefacts

    Use your editor to explore these files. The manifests all share apiVersion: bino.bi/v1alpha1 and a kind that selects the spec.

  3. Preview the report

    Start a live preview server from the workdir:

    bino preview

    bino scans the directory for manifests, starts a local HTTP server (by default http://127.0.0.1:45678/), and opens your default browser. As you edit YAML or data files, it reloads the preview automatically.

  4. Build a PDF

    When you are happy with the preview, export a PDF:

    bino build

    This runs schema validation, executes datasets in the embedded query engine, renders HTML for each report artefact, and converts the pages to PDF using the rendering engine. By default, PDFs are written into a dist/ directory under the workdir.

    Example using a custom output directory:

    bino build --out-dir dist/reports