Skip to content

shan8851/parliament-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›๏ธ parliament-cli

npm version License: MIT Node.js

UK Parliament in your terminal. Built for AI agents, still pleasant for humans.

parliament bill 3973
parliament bill "renters rights"
parliament search bills "energy"
parliament member "Keir Starmer"
parliament divisions "budget"
parliament votes 2211
parliament questions "transport"

Install

npm install -g @shan8851/parliament-cli

Auth

No API key or auth required. parliament-cli uses public UK Parliament endpoints by default.

Or from source:

git clone https://github.com/shan8851/parliament-cli.git
cd parliament-cli
npm install && npm run build
npm link

Commands

  • parliament bill <query-or-id>
  • parliament search bills <query>
  • parliament divisions <query-or-id>
  • parliament votes <query-or-id> (alias of divisions)
  • parliament member <query-or-id>
  • parliament questions <query-or-id>

Agent Integration

The CLI defaults to text in a TTY and JSON when piped.

parliament bill "renters rights" --json
parliament search bills budget | jq

All responses use a stable envelope:

{
  "ok": true,
  "schemaVersion": "1",
  "command": "bill",
  "requestedAt": "2026-04-19T00:00:00.000Z",
  "data": { ... }
}

Errors return ok: false with error.code, error.message, and error.retryable.

Ambiguous queries

When a text query matches multiple records, the CLI returns an AMBIGUOUS_QUERY error and candidate hints in error.details.

Official data sources

Dev

npm install
npm run typecheck
npm run lint
npm test
npm run build

License

MIT

About

๐Ÿ›๏ธ UK Parliament CLI โ€” bills, divisions, members, and written questions. Built for AI agents.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors