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

@geenius/ai-magic

v0.10.0

Published

Geenius AI Magic — Ambient, context-aware AI integration (React + SolidJS)

Readme

@geenius/ai-magic

Ambient AI helpers, prompt builders, and UI primitives for context-aware product workflows.

Install

pnpm add @geenius/ai-magic

Import Surface

import {
  DEFAULT_WAND_CONFIG,
  buildMagicPrompt,
  configureMagic,
  detectMode,
  generateActions,
} from "@geenius/ai-magic";
import { configureMagic as configureSharedMagic } from "@geenius/ai-magic/shared";
import { useSummarizer } from "@geenius/ai-magic/shared/react";
import { createSummarizer } from "@geenius/ai-magic/shared/solidjs";
import {
  AIMagicProvider,
  CommandPalette,
  ContentWriter,
  SummaryCard,
} from "@geenius/ai-magic/react";
import {
  AIMagicProvider as ReactCssAIMagicProvider,
  SummaryCard as ReactCssSummaryCard,
} from "@geenius/ai-magic/react-css";
import {
  AIMagicProvider as SolidAIMagicProvider,
  CommandPalette as SolidCommandPalette,
} from "@geenius/ai-magic/solidjs";
import {
  AIMagicProvider as SolidCssAIMagicProvider,
  SummaryCard as SolidCssSummaryCard,
} from "@geenius/ai-magic/solidjs-css";
import { magicSchema, magicTables } from "@geenius/ai-magic/convex";

@geenius/ai-magic and @geenius/ai-magic/shared resolve to the same framework-agnostic shared contract.

Basic Usage

import {
  configureMagic,
  detectMode,
  generateActions,
  type FieldMeta,
} from "@geenius/ai-magic";

const schema: FieldMeta[] = [
  { name: "title", type: "string", label: "Title", required: true },
  { name: "summary", type: "textarea", label: "Summary" },
];

const context = {
  mode: detectMode(schema),
  schema,
};

const config = configureMagic({
  autoShowActions: true,
  hotkey: "Ctrl+Shift+M",
});

const actions = generateActions(context);

Provider-Backed Pages

import { AIMagicProvider, AiPlayground } from "@geenius/ai-magic/react";

async function callAI(systemPrompt: string, userPrompt: string) {
  const response = await fetch("/api/ai-magic", {
    method: "POST",
    headers: { "content-type": "application/json" },
    body: JSON.stringify({ systemPrompt, userPrompt }),
  });

  return response.json() as Promise<{ content: string; tokens?: number }>;
}

async function loadBackendActivity() {
  const response = await fetch("/api/ai-magic/activity");
  return response.json();
}

export function PlaygroundRoute() {
  return (
    <AIMagicProvider
      callAI={callAI}
      loadBackendActivity={loadBackendActivity}
    >
      <AiPlayground />
    </AIMagicProvider>
  );
}

Package Surface

  • @geenius/ai-magic / @geenius/ai-magic/shared: shared types, mode detection, action generation, prompt builders, and safety/cost utilities.
  • @geenius/ai-magic/shared/react: React hooks and AI workflow state primitives shared by the styled React variants.
  • @geenius/ai-magic/shared/solidjs: SolidJS primitives shared by the styled SolidJS variants.
  • @geenius/ai-magic/react: React hooks, components, and the playground page.
  • @geenius/ai-magic/react-css: React components, provider helpers, and pages with static CSS output.
  • @geenius/ai-magic/solidjs: SolidJS primitives, provider helpers, components, and the playground page.
  • @geenius/ai-magic/solidjs-css: SolidJS components, provider helpers, and pages with static CSS output.
  • @geenius/ai-magic/convex: Convex schema, queries, mutations, and compatibility table exports.

Storybook

React and SolidJS Storybook apps are included for local review and expose Tailwind and static CSS variants side by side.

License

MIT