open-index/open-npm huggingface dataset:
npm package: @hyperaide/ai-provider
Description: OpenAI-compatible provider package for Hyperaide using the Vercel AI SDK.
Latest version: 0.1.0

# @hyperaide/ai-provider

OpenAI-compatible provider package for Hyperaide using the Vercel AI SDK.

## Install

This package is part of the Hyperaide monorepo workspace.

## Environment Variables

- `AI_BASE_URL`: Base URL for the Hyperaide AI worker (no `/v1` suffix). Defaults to `http://127.0.0.1:8787`.
- `AI_API_KEY`: Bearer token sent to the Hyperaide AI worker.

## Usage

```ts
import { generateText } from "ai";
import { aiProvider } from "@hyperaide/ai-provider";

const { text } = await generateText({
  model: aiProvider.chatModel("openai/gpt-4.1-mini"),
  prompt: "Write a short product update.",
});
```

You can also create a custom instance:

```ts
import { createAiProvider } from "@hyperaide/ai-provider";

const customProvider = createAiProvider({
  baseURL: "https://ai.example.com",
  apiKey: process.env.AI_API_KEY,
});
```
npm package: @hyperaide/cli
Description: Hyperaide command line tooling.
Latest version: 0.1.11

# @hyperaide/cli

Hyperaide command line tooling.

## Commands

- `npx @hyperaide/cli login`
- `npx @hyperaide/cli logout`
- `npx @hyperaide/cli apps init`
- `npx @hyperaide/cli apps migrate`
- `npx @hyperaide/cli apps deploy`

The existing top-level `init`, `migrate`, and `deploy` commands remain available as compatibility aliases.

### migrate

Loads `hyperaide.app.ts` and, if it defines a non-empty `database` section (`entities` / `links`), compares it to **your** Hyperaide user database schema (the one tied to your account). It prints **planned additions** (new entities, new attributes on existing entities, new links) and asks for confirmation before applying.

- If the API reports **conflicts** (e.g. an attribute already exists with a different type or indexed flag), the command exits with an error and does not apply changes. Fix the manifest or your existing schema, then run again.
- If there is nothing to change, it exits successfully with no changes.

### deploy

If the manifest includes a non-empty `database` section, **deploy runs a non-interactive schema sync first** (same additive merge as migrate). If that step returns conflicts, deploy **fails** with a message to run `hyperaide apps migrate` interactively to review. Then it builds the bundle and uploads as before.

## Config

`apps deploy` loads `hyperaide.app.ts` from the current working directory.
`apps init` requires CLI auth, lets you choose an existing app from your account or create a new one, and then scaffolds this file from the canonical server app record.

Minimal config:

```ts
export default {
  id: "11111111-1111-4111-8111-111111111111",
  slug: "my-app",
  name: "My App",
  actions: {
    create: {
      name: "Create",
      path: "/api/create",
    },
  },
  database: {
    entities: [
      {
        name: "tasks",
        attributes: [
          { name: "title", type: "string", indexed: true },
          { name: "done", type: "boolean" },
        ],
      },
    ],
    links: [],
  },
};
```

Optional `database` describes entities and links to merge **additively** into your user database via `migrate` / `deploy`. Attribute types `object` and `array` in the manifest are stored as `json` on the server.

`build` is optional. Today the CLI only uses `build.command` before it creates the deployment tarball.

## Auth storage

Credentials are stored at `~/.hyperaide/credentials`:

```json
{
  "token": "hype_access_xxx"
}
```

## Environment overrides

- `HYPERAIDE_APP_URL` overrides the `web-app` origin used by the CLI, for example `https://app.dev.hyperaide.com` or `http://127.0.0.1:3002`
- `HYPERAIDE_API_URL` is still accepted as a deprecated alias for `HYPERAIDE_APP_URL`
- `HYPERAIDE_ACCESS_TOKEN` provides a raw access token (`hype_access_...`) directly, so `apps init`, `apps migrate`, and `apps deploy` can run without `login`
- `HYPERAIDE_CONFIG_DIR` overrides the directory used for local credential storage

`login` stays browser-based, but the approval page is intentionally minimal: open the link, sign in if needed, approve the request, and return to the terminal.
npm package: @hyperaide/db
Description: Thin runtime-specific wrappers around InstantDB packages.
Latest version: 0.1.6

# @hyperaide/db

Thin runtime-specific wrappers around InstantDB packages.

## Usage

```ts
import { init } from "@hyperaide/db/react";

const db = init();
```

```ts
import { init } from "@hyperaide/db/server";

const db = init({
  // Optional: include for privileged backend operations.
  adminToken: process.env.INSTANT_APP_ADMIN_TOKEN,
});
```

`databaseId` maps to Instant's `appId`. `accessToken` is injected as `ruleParams.accessToken`.
By default `init()` resolves them from:

- `NEXT_PUBLIC_HYPERAIDE_DATABASE_ID`
- `PUBLIC_HYPERAIDE_DATABASE_ID`
- `VITE_HYPERAIDE_DATABASE_ID`
- `HYPERAIDE_DATABASE_ID`
- `NEXT_PUBLIC_HYPERAIDE_ACCESS_TOKEN`
- `PUBLIC_HYPERAIDE_ACCESS_TOKEN`
- `VITE_HYPERAIDE_ACCESS_TOKEN`
- `HYPERAIDE_ACCESS_TOKEN`

Explicit `databaseId` / `accessToken` arguments override env fallbacks.

Subpath mappings:

- `@hyperaide/db/react` -> `@instantdb/react`
- `@hyperaide/db/server` -> `@instantdb/admin`

Wrapper behavior:

- `useQuery`/`query` automatically merge `ruleParams.accessToken` from `accessToken`
- `transact` automatically applies `.ruleParams({ accessToken })` on tx objects

## Development

```bash
pnpm --filter @hyperaide/db build
```

## Publish

This package is configured for public npm publishing:

```bash
pnpm --filter @hyperaide/db prepublishOnly
npm publish --access public
```
npm package: @hyperaide/integrations
Description: Thin execution client for Hyperaide-managed integrations.
Latest version: 0.1.0

# @hyperaide/integrations

Thin execution client for Hyperaide-managed integrations.

```ts
import { init } from "@hyperaide/integrations";

const integrations = init({
  accessToken: process.env.HYPERAIDE_INTEGRATIONS_TOKEN!,
});

await integrations.perform({
  integrationId: "int_123",
  action: "GITHUB_CREATE_ISSUE",
  input: {
    owner: "acme",
    repo: "app",
    title: "Bug report",
  },
});
```