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

lendctl-ai

v0.2.2

Published

Autonomous lending decision agent powered by LendCtl CLI suite

Downloads

841

Readme

LendCtl AI

🏦 Autonomous Lending Decision Agent — Ask lending questions in plain English. Get instant, compliant decisions.

npm version License

npm install -g lendctl-ai
lendctl-ai ask 'Can I qualify for a $400k mortgage with $90k income and 720 credit?'

⚠️ Note: Use single quotes around questions with $ signs to prevent shell variable expansion.

✅ Fully Standalone

v0.2.2+: All 8 calculators run as pure JavaScript — no external CLI dependencies. Just npm install and go.

Features

  • 🤖 Natural Language Interface — Ask lending questions like you'd ask a loan officer
  • 📋 Autonomous Planning — Decomposes complex questions into calculations
  • Self-Validation — Verifies calculations and compliance automatically
  • 📊 8 Built-in Calculators — Income, credit, mortgage, auto, personal, card, compliance, audit
  • 📝 Audit Trail — Every decision logged for regulatory compliance
  • 🔌 Multi-Channel — CLI, REST API, WhatsApp, Telegram

Quick Start

# Install globally
npm install -g lendctl-ai

# Set your OpenAI API key
export OPENAI_API_KEY=sk-...

# Ask a question (use single quotes for $ signs!)
lendctl-ai ask 'I make $85,000/year with a 720 credit score. Can I afford a $350,000 house?'

# Interactive chat
lendctl-ai chat

# Start API server
lendctl-ai serve

Example

$ lendctl-ai ask 'I make $85,000/year and want to buy a $350,000 home with 10% down. I have a 720 credit score and $400/month in car payments.'

Output:

╔═══════════════════════════════════════════════════════════╗
║  LendCtl AI - Autonomous Lending Decision Agent           ║
╚═══════════════════════════════════════════════════════════╝

📋 Question: I make $85,000/year and want to buy...

📝 Report:

**Summary**: ✅ You likely qualify for this mortgage

**Key Numbers**:
- Gross Monthly Income: $7,083
- Est. Housing Payment: $2,100 (PITI)
- Front-end DTI: 29.6%
- Back-end DTI: 35.3%
- LTV: 90% (PMI required)

**Analysis**:
Your debt-to-income ratios are within acceptable limits for conventional
financing. With a 720 credit score, you qualify for competitive rates.
The 10% down payment means you'll need PMI until you reach 20% equity.

**Recommendation**:
Approved for conventional financing. Consider:
1. Increasing down payment to 20% to eliminate PMI
2. Shopping multiple lenders for best rate with your credit profile

**Compliance Notes**:
- QM Safe Harbor: ✓ (DTI under 43%)
- ATR: Income and debts verified

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Session: lendctl-abc123
Iterations: 1 | Time: 4823ms

Built-in Calculators

All calculations run locally — no external CLI tools required.

| Calculator | Description | |------------|-------------| | finctl | Income analysis, DTI calculation | | creditctl | Credit score analysis, risk tier, rescore simulation | | mortctl | Mortgage qualification, LTV, PMI, amortization | | autoloanctl | Auto loan calculations, GAP insurance recommendations | | persctl | Personal loan eligibility, debt consolidation analysis | | cardctl | Credit limit estimation, balance transfer analysis | | compctl | QM/ATR validation, TRID timing, adverse action notices | | auditctl | In-memory audit trail, compliance exports |

API Server

Start the server:

lendctl-ai serve --port 5055

Query endpoint:

curl -X POST http://localhost:5055/api/v1/query \
  -H "Content-Type: application/json" \
  -d '{
    "question": "Can I qualify for a 400k mortgage with 90k income?",
    "model": "gpt-4o",
    "stream": false
  }'

Response:

{
  "sessionId": "lendctl-abc123",
  "success": true,
  "iterations": 1,
  "totalDurationMs": 4823,
  "plan": {
    "understanding": "User wants to know if they qualify for a $400,000 mortgage...",
    "steps": [...]
  },
  "results": [...],
  "validation": {
    "isValid": true,
    "issues": []
  },
  "report": "**Summary**: ✅ You likely qualify..."
}

Architecture

User Query → Planner (LLM) → Executor (Calculators) → Validator → Reporter
                                    ↓
                        ┌──────────────────────┐
                        │   Built-in Tools     │
                        │ finctl · creditctl   │
                        │ mortctl · autoloanctl│
                        │ persctl · cardctl    │
                        │ compctl · auditctl   │
                        └──────────────────────┘

Configuration

| Variable | Description | Default | |----------|-------------|---------| | OPENAI_API_KEY | OpenAI API key (required) | - | | ANTHROPIC_API_KEY | Anthropic API key (optional) | - | | PORT | API server port | 5055 |

Evaluation

Run the test suite:

lendctl-ai eval

# Run subset
lendctl-ai eval --sample 5

Related

  • LendCtl Skill — AI agent skill with 6 workflows
  • finctl — Standalone income & DTI CLI
  • creditctl — Standalone credit analysis CLI
  • mortctl — Standalone mortgage underwriting CLI

License

Apache-2.0 © Satyan Avatara


Built with ❤️ by Avatara Consulting