🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

lawmaker-cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lawmaker-cli

latest
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

Lawmaker CLI

A command-line tool to feed legislator, topic, and speech data into Algolia indices.

🔧 Environment Variables

Create a .env file in the root directory with the following variables:

ALGOLIA_APP_ID=your_algolia_app_id
ALGOLIA_WRITE_KEY=your_algolia_write_key
HEADLESS_ACCOUNT_EMAIL=your_email@example.com
HEADLESS_ACCOUNT_PASSWORD=your_password
GRAPHQL_ENDPOINT=http://localhost:3000/api/graphql

Description

VariableDescription
ALGOLIA_APP_IDYour Algolia application ID
ALGOLIA_WRITE_KEYAlgolia Write API key
HEADLESS_ACCOUNT_EMAILEmail used for authenticating GraphQL access
HEADLESS_ACCOUNT_PASSWORDPassword used for authenticating GraphQL
GRAPHQL_ENDPOINTThe URL of lawmaker-cms GraphQL API

Use a library like dotenv (already included) to load these into runtime automatically.

Installation

Clone the repository and install dependencies:

git clone https://github.com/twreporter/congress-dashboard-monorepo.git
cd congress-dashboard-monorepo/packages/cronjobs
yarn install

Build

Compile TypeScript files to JavaScript:

yarn build

Usage

Development Mode

Use the development entry point with ts-node:

yarn dev feed-algolia [options]

Production Mode

After building:

yarn lawmaker feed-algolia [options]

You can also invoke it directly:

./lib/index.js feed-algolia [options]

Command: feed-algolia

Feed Algolia search indices with updated records.

Options

  • --meeting-term (required) Legislative meeting term. Required for all runs.

  • --session-term Legislative meeting session term. Only for updating speeches. Accepts numeric value or all to process every session in the specified meeting term.

  • --topics Only update topic records.

  • --legislators Only update legislator records.

  • --speeches Only update speech records.

  • --dryrun Do not upload to Algolia (default behavior).

  • --no-dryrun Actually upload data to Algolia.

Examples

# Dry run all data types in the meeting term 11
yarn lawmaker feed-algolia --meeting-term 11

# Dry run only topics in the meeting-term 10
yarn lawmaker feed-algolia --meeting-term 10 --topics

# Actually upload speeches in the meeting-term 11 and session-term 2
yarn lawmaker feed-algolia --meeting-term 11 --session-term 2 --speeches --no-dryrun

License

MIT License

FAQs

Package last updated on 20 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts