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

@loftyai/lofty-cli

v0.3.9

Published

CLI for the Lofty CRM API - manage leads, agents, listings, tasks, and more

Readme

lofty-cli

CLI for the Lofty CRM API. Made with api2cli.dev.

Install

npm i @loftyai/lofty-cli

Authentication

lofty-cli supports multiple authentication methods. Choose the one that fits your use case.

Method 1: Browser Authorization (Recommended)

The simplest way to authenticate — open a browser, log in, and you're done.

lofty-cli auth login-browser

The browser opens the Lofty login page. After you log in and authorize, the CLI saves the token locally and auto-refreshes it when it expires.

Method 2: OAuth2 Client Credentials

For server-to-server integrations. Requires three credentials.

Step 1: Configure vendor credentials

export LOFTY_CLIENT_ID="your_client_id"
export LOFTY_CLIENT_SECRET="your_client_secret"

Register a developer account at Lofty Vendor Portal to obtain these.

Step 2: Configure customer key

Option A — Environment variable:

export LOFTY_CUSTOMER_KEY="eyJhbGciOiJIUzI1NiJ9..."

Option B — Save to local file:

lofty-cli auth set "eyJhbGciOiJIUzI1NiJ9..."

Log in to Lofty CRM → Settings > Integrations > API to find your Customer Key.

Method 3: Direct Access Token

If you already have an access_token (e.g., from CI/CD or another system):

export LOFTY_ACCESS_TOKEN="your_access_token"
export LOFTY_REFRESH_TOKEN="your_refresh_token"

Verify Authentication

lofty-cli auth status   # Show authentication status
lofty-cli auth test     # Verify with a real API call

Environment Variables

| Variable | Required | Description | |---|---|---| | LOFTY_ACCESS_TOKEN | No | Direct access token (skips other auth methods) | | LOFTY_REFRESH_TOKEN | No | Refresh token (used with LOFTY_ACCESS_TOKEN) | | LOFTY_CLIENT_ID | For OAuth mode | Vendor client ID | | LOFTY_CLIENT_SECRET | For OAuth mode | Vendor client secret | | LOFTY_CUSTOMER_KEY | For OAuth mode | User's customer key | | LOFTY_BASE_URL | No | Override API base URL (default: https://api.lofty.com) |

Usage

# View all available resources
lofty-cli --help

# Examples
lofty-cli leads list
lofty-cli leads get --id "lead_id"
lofty-cli leads create --body '{"first_name":"John","last_name":"Doe"}'

lofty-cli transaction list
lofty-cli communication list
lofty-cli tasks-appointments-v2 list --lead-id "lead_id"
lofty-cli calendar-v2 list --lead-id "lead_id"

Note: The tasks resource is deprecated. Use tasks-appointments-v2 for task/appointment management and calendar-v2 for calendar/meeting management instead.

Resources

| Resource | Description | |---|---| | leads | Lead management (list, get, create, update, delete, etc.) | | transaction | Transaction/deal management | | communication | Email, SMS, and communication logs | | tasks-appointments-v2 | Task & appointment management (replaces tasks) | | calendar-v2 | Calendar event & meeting slot management | | notes | Note management | | calls | Call records | | alerts | Alert/notification management | | members | Team member management | | listings | Property listing management | | webhooks | Webhook management | | lead-routing | Lead routing/assignment rules | | team-features | Team feature toggles | | agent-org | Agent organization management | | agent-user | Agent user management | | log-type | Log type definitions | | system-logs | System audit logs | | opportunity | Opportunity management | | vendor | Vendor management |

Run lofty-cli <resource> --help for detailed commands and options.

Auth Commands

| Command | Description | |---|---| | lofty-cli auth set <key> | Save customer key to local file | | lofty-cli auth show | Display current customer key (masked) | | lofty-cli auth show --raw | Display full customer key | | lofty-cli auth remove | Delete customer key and OAuth cache | | lofty-cli auth logout | Clear all credentials (PKCE, OAuth cache, customer key) | | lofty-cli auth login | Manually obtain OAuth access_token | | lofty-cli auth login-browser | Authorize via browser (OAuth PKCE) | | lofty-cli auth status | Show authentication status overview | | lofty-cli auth test | Verify auth by making a test API call |

Update Notifications

lofty-cli checks for new versions in the background (at most once every 24 hours). If a newer version is available, a one-line upgrade hint is shown:

Update available: 0.3.1 → 0.4.0
Run: npm install -g @loftyai/lofty-cli

Global Flags

All commands support:

| Flag | Description | |---|---| | --json | Output as JSON | | --format <type> | Output format: text, json, csv, yaml | | --verbose | Enable verbose/debug logging | | --no-color | Disable colored output | | --no-header | Omit table headers |