npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@maschinenlesbar.org/bundesrat-cli

v0.0.4

Published

TypeScript API client and CLI for the Bundesrat's public data feeds — plenary sessions, agenda items, members and vote distribution

Readme

bundesrat-cli

CI Release npm

Follow Germany's Bundesrat — the chamber of the sixteen Länder — from your terminal. bundesrat is a command-line tool over the Bundesrat's public data feeds (the data behind the official Bundesrat app): the current plenary sitting's agenda and its Drucksachen, the members, and committee dates — as clean JSON you can pipe straight into jq.

  • The current sitting's agenda — every Tagesordnungspunkt (TOP) with its Drucksache number, in one command.
  • The members — all Bundesrat members with party and Land, filterable by --state / --party.
  • Open data only — the CLI surfaces just the openly-licensed facts (names, parties, Länder, TOP/Drucksache numbers, dates). The feeds' copyright editorial text and images are deliberately not exposed — see DATA_LICENSE.md.
  • No API key — the feeds are public.
  • Clean JSON output — pretty by default, --compact for scripting, -o <file> to write to disk.

Want to use this as a TypeScript library, or curious how it parses the XML feeds with zero dependencies? See DEVELOPING.md.

Install

npm i -g @maschinenlesbar.org/bundesrat-cli

This installs the bundesrat command. Requires Node.js 20+. No API key.

Check it works:

bundesrat session | jq '.title'

Quickstart

# The current plenary sitting: title + agenda items with their Drucksachen
bundesrat session | jq '{title, tops: [.tops[] | {toptitle, topdrucksache, topheader}]}'

# Every member from Bavaria
bundesrat members --state Bayern | jq -r '.[] | "\(.firstname) \(.name) — \(.party)"'

# All Green members across the Länder
bundesrat members --party grüne | jq length

# Committee appointments with their dates
bundesrat appointments | jq -r '.[] | "\(.startdate // "")\t\(.title)"'

Commands

| Command | What it shows | | --- | --- | | session | Current plenary sitting: title, date and agenda items (TOPs) with their Drucksachen | | members | Members of the Bundesrat (--state <Land>, --party <text>) | | appointments | Committee appointments and dates (Termine) |

New to terms like TOP, Drucksache or Land? The Glossary decodes every one.

Why only three commands? The Bundesrat feeds also carry news/press items, the BundesratKOMPAKT editorial summaries, the Stimmverteilung graphic, and the Präsidium / next-sitting HTML pages. Those return copyright-protected editorial text and images, not open data, so this CLI doesn't expose them (and strips the editorial fields — HTML detail, biographies, images — from the three it keeps). See DATA_LICENSE.md.

members filters

| Option | Meaning | | --- | --- | | --state <Land> | Only members of that federal state — case-insensitive, exact Land match (e.g. Bayern, Baden-Württemberg) | | --party <text> | Only members whose party contains this text — case-insensitive substring (e.g. grüne, CDU) |

Filtering happens client-side (the feed returns everyone), so both filters compose and an unmatched filter yields [] rather than the full list.

Output & scripting

Every command prints JSON to stdout; diagnostics go to stderr, so piping into jq stays clean.

# How many agenda items in the current sitting?
bundesrat session | jq '.tops | length'

# Drucksachen on the agenda
bundesrat session | jq -r '.tops[].topdrucksache | select(.)'

# Members grouped by party
bundesrat members | jq -r 'group_by(.party)[] | "\(.[0].party): \(length)"'

Use --compact for single-line JSON and -o <file> to write to a file — both are global options that work before or after the command.

Exit codes make the CLI easy to use in scripts:

| Code | Meaning | | --- | --- | | 0 | Success (also --help / --version) | | 2 | Bad usage / invalid argument (nothing was sent) | | 4 | Not found (404 from the server) | | 6 | Network / transport failure (DNS, connection, timeout, size cap) | | 1 | Any other error — including a non-XML response (the feed returned the website's HTML shell) |

Troubleshooting

  • command not found: bundesrat — the global npm bin directory isn't on your PATH. Run npm bin -g to find it and add it, or run via npx @maschinenlesbar.org/bundesrat-cli ….
  • Exit 1 / "received an HTML page" — the feed returned the website's HTML shell instead of XML (it may have moved). The CLI already adds the required ?view=renderXml render parameter; if this persists, the upstream feed changed.
  • Empty tops between sittings — outside an active sitting the agenda feed can be sparse: tops may be [] and session's title/header may be absent (both are optional), so guard for them in scripts.
  • A field you expected is missing — the CLI surfaces only openly-licensed factual fields; the feeds' HTML detail/abstract bodies, biographies and images are stripped on purpose (see DATA_LICENSE.md).

Global options

Given before or after the command, e.g. bundesrat --compact session:

| Option | Description | | --- | --- | | -V, --version | Print the version number | | -h, --help | Show help for the program or a command | | --compact | Print JSON on a single line instead of pretty-printed | | -o, --output <file> | Write output to this file instead of stdout | | --base-url <url> | API base URL (default https://www.bundesrat.de) | | --timeout <ms> | Per-request timeout (default 30000) | | --user-agent <ua> | User-Agent header value | | --max-retries <n> | Retries for transient 429/503 responses (0..10, default 2) | | --max-response-bytes <n> | Cap response body size in bytes (0 = unlimited; default 100 MiB) |

Learn more

  • SKILLS.md — Claude Code Agent Skills that drive this CLI.
  • Usage.md — full use-case-driven cookbook.
  • GLOSSARY.md — every domain term explained.
  • DEVELOPING.md — TypeScript library usage, the XML parser, architecture, testing, CI.

Data license

This CLI is a client — it accesses data it does not own or redistribute. The upstream data is © the Bundesrat and licensed separately from this tool's code. See DATA_LICENSE.md.

Bundesrat — website content is copyright-protected (personal use only; commercial use / redistribution need permission), so cite "Quelle: Bundesrat" and don't republish editorial text or images without asking. The Drucksachen and Plenarprotokolle are amtliche Werke (§ 5 Abs. 2 UrhG) — free to reuse unaltered and with a source citation.

License

Dual-licensed — use it under either:

  • AGPL-3.0-or-later (default, free). Note the AGPL's §13 network clause: if you run a modified version as a network service, you must offer that modified source to the service's users.
  • Commercial license (paid), for closed-source / proprietary or SaaS use without the AGPL's obligations.

See LICENSING.md for details, and CONTRIBUTING.md for the contribution policy (this project does not accept external code contributions). Commercial enquiries: [email protected].