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

frai

v1.1.4

Published

FRAI - Framework of Responsible Artificial Intelligence

Downloads

40

Readme

FRAI · Framework of Responsible Artificial Intelligence

npm version

FRAI (Framework of Responsible Artificial Intelligence) is an open-source toolkit that helps any team — from solo developers to compliance officers — ship AI features responsibly. It walks you through quick questions, scans your code, and generates documentation you can actually hand to stakeholders: implementation checklists, model cards, risk files, evaluation reports, and policy-aware RAG indexes.

Think of FRAI as a safety net for AI launches: it collects the right facts, highlights blind spots, and keeps evidence tidy so production reviews stop feeling like guesswork.

🚀 Getting Started

1. Install FRAI globally:

npm install -g frai

2. Set up your OpenAI API key (required for AI-powered tips):

frai --setup

You only need to do this once per machine or project. Your key is stored securely and never shared.

3. Run FRAI in your project:

frai

Tip: frai is available globally after installing the published npm package. If you're working from a local clone, follow the steps in Local Development to run the CLI from source.


🛠️ CLI Commands & Features

| Command | Description | |------------------------|-------------| | frai | Interactive mode for documenting an AI feature (8-question progressive system) | | frai --scan | Scan codebase for AI/ML code and generate docs | | frai --setup | Set up your OpenAI API key (local/global) | | frai --ci | Run in CI mode (non-interactive) | | frai --help, -h | Show help and usage info | | frai --version, -v | Show current version | | frai --update | Check for new versions of FRAI | | frai --list-docs | List generated documentation files | | frai --clean | Remove generated documentation files | | frai --export-pdf | Export documentation markdown files as PDFs | | frai --show-config | Show API key config status | | frai --key=API_KEY | Provide OpenAI API key directly (one-off use) | | frai --global | Use with --setup to save API key globally | | frai rag index | Index compliance docs into a local vector store | | frai eval | Run baseline evaluation metrics and write reports |

RAG Indexing

frai rag index --input docs/policies --output .frai/compliance-index.json --chunk-size 400
  • Scans .md, .txt, .json, .yaml files recursively.
  • Generates a lightweight JSON vector store consumable by SDKs and future connectors.

Evaluation Harness

frai eval --outputs runs/outputs.json --references runs/golden.json --report reports/eval --format markdown
  • Runs baseline metrics (exact match, toxicity keyword scan, length variance).
  • Produces JSON and/or Markdown summaries for CI and governance reviews.

Docs generated:

  • checklist.md — Implementation checklist
  • model_card.md — Model card
  • risk_file.md — Risk & compliance

💡 Features

  • Progressive 8-question system: Context-aware, fast, and actionable
  • AI-powered recommendations: Get tailored tips for responsible AI
  • Comprehensive documentation: Checklist, model card, and risk file
  • PDF export: Convert docs to PDF with one command
  • Codebase scanning: Detects AI/ML code and generates relevant docs
  • Easy setup: One-time API key configuration
  • Compliance-aware RAG: Build vector stores from policies for knowledge-grounded guardrails
  • Evaluation harness: Run baseline metrics and capture auditable reports

Monorepo Layout

frai/
├─ packages/
│  ├─ frai-cli/      # CLI entry point and command wiring
│  └─ frai-core/     # Reusable services (config, questionnaire, documents, scanners, RAG, eval)
├─ docs/             # Roadmaps, design notes, and feature backlogs
└─ examples/         # Sample AI projects used in tests and demos

🔑 API Key Setup

FRAI requires an OpenAI API key for generating AI-powered tips and documentation. Run:

frai --setup

If you skip this step, FRAI will prompt you to set up your key on first use.


🧑‍💻 Local Development

Run FRAI directly from this repository without publishing:

pnpm install
pnpm --filter frai run build
node packages/frai-cli/dist/index.js --help

Configure an OpenAI key from source

  • Interactive CLI:
    node packages/frai-cli/dist/index.js --setup YOUR_KEY
  • Manual .env:
    OPENAI_API_KEY=YOUR_KEY

To test the global binary locally (without npm publishing), install the workspace package:

pnpm install --global ./packages/frai-cli
# then:
frai --setup

📖 Learn More


Generated by FRAI - Responsible AI in Minutes