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

abra-actions

v1.0.39

Published

**abra** is a TypeScript SDK that enables natural language interaction with your application's functions. Import the functions you'd like to expose into the action registry and run a single command to enable execution via natural language commands — all o

Readme

abra – AI-Powered Function Discovery and Execution

🚀 Overview

abra is a TypeScript SDK that enables natural language interaction with your application's functions. Import the functions you'd like to expose into the action registry and run a single command to enable execution via natural language commands — all on your own infrastructure.


✨ Features

  • TypeScript Integration – Automatically extracts type information from your functions
  • LLM-Powered – Uses OpenAI's GPT models to understand user intent
  • Zero Boilerplate – Just import functions into the registry, no annotations or decorators
  • Type Safety – Validates and transforms user input based on your type definitions
  • No Data Leakage – Only function names and descriptions are sent to the LLM; your code and data stay private
  • Executes Locally – All actions are run through your code, on your infra, with your auth and security context

🛠️ Installation

npm install abra-actions

🔗 Quick Start

1. Initialize abra

npx abra-actions init

This command sets up the abra scaffold in your /src directory:

  • actionRegistry.ts – Import and register your callable functions here
  • actions.json – Generated manifest of all actions and types
  • abra-executor.ts – Lightweight wrapper to execute actions via the registry

2. Register your functions

// src/abra-actions/__generated__/actionRegistry.ts

import { 
  addToCart, 
  searchProducts, 
  filterProducts, 
  sortProducts 
} from './handlers';

export const actionRegistry = {
  addToCart,
  searchProducts,
  filterProducts,
  sortProducts
};

3. Generate the actions

npx abra-actions generate

This command:

  • Populates actions.json with metadata about your functions
  • Infers parameter types
  • Updates the abra-executor.ts file for secure local execution

4. Use the assistant in your UI

import { AbraAssistant } from '../abra-actions/AbraAssistant';

function MyComponent() {
  return (
    <div>
      <h1>My App</h1>
      <AbraAssistant />
    </div>
  );
}

🧩 Using Abra via API (Custom Components)

If you prefer to connect your own UI to Abra’s backend without using the built-in assistant, you can call the API directly and pass the result to executeAction.

The API requires an environment variable:

REACT_APP_ABRA_API_KEY=your-key-here

⚡ Minimal Example

import { useState } from 'react';
import { executeAction } from '../abra-actions/__generated__/abra-executor';
import actions from '../abra-actions/__generated__/actions.json';

const BACKEND_URL = 'abra-api';

export default function AbraInput() {
  const [input, setInput] = useState('');

  const handleSubmit = async (e) => {
    e.preventDefault();

    const res = await fetch(`${BACKEND_URL}/api/resolve-action`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'x-api-key': process.env.ABRA_PUBLIC_API_KEY,
      },
      body: JSON.stringify({ userIntent: input, actions }),
    });

    const { action, params } = await res.json();
    await executeAction(action, params);
  };

  return (
    <form onSubmit={handleSubmit}>
      <input value={input} onChange={e => setInput(e.target.value)} />
      <button type="submit">Run</button>
    </form>
  );
}

This gives you full control over the UI while still leveraging Abra’s core LLM routing and function execution.


📄 License

MIT


🤝 Contributing

Contributions are welcome! Please feel free to submit a pull request.