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

open-web-cli

v0.1.0

Published

Generate agent-ready CLI, SDK, Mastra, and Vue adapters from Vue 3 + axios applications.

Downloads

8

Readme

Open Web CLI

Open Web CLI hero

Open Web CLI is a source-driven generator that turns an existing Vue 3 + axios web application into an agent-ready adapter package.

It is designed for teams that already have a working web product and want to expose selected business capabilities to agents without rebuilding the product from scratch. The generated adapter can provide a local CLI, TypeScript SDK, Mastra tools, and Vue generative UI cards from the same capability contract.

What It Generates

Open Web CLI reads a target web project plus an open-web.config.ts file and emits an independent npm package:

web-agent-adapter/
  src/
    cli.ts
    sdk.ts
    manifest.ts
    capabilities/
    cards/
    adapters/
      mastra.ts
      vue.ts
    runtime/

The generated package is intended to support:

import { createSdk } from '@company/web-agent-adapter';
import { createMastraTools } from '@company/web-agent-adapter/mastra';
import { cardRegistry } from '@company/web-agent-adapter/vue';
import { serveOpenWebDocs } from '@company/web-agent-adapter/docs';

Core Ideas

  • Source-driven conversion: the primary input is a known Vue 3 + axios codebase, not an arbitrary website.
  • One capability contract: CLI commands, SDK methods, and agent tools expose the same selected capabilities.
  • Axios atoms first: the scanner discovers low-level API candidates, then release capabilities are explicitly allowlisted.
  • Agent-side UI decoupling: CLI/SDK results can include a prepared UI payload, while the agent backend only passes it through.
  • Generated Vue registry: UI cards ship with the adapter package and render from component + props.
  • Auth reuse: browser login captures the original web login flow and persists normalized auth state through a pluggable store.

Example Config

import { defineOpenWeb } from 'open-web-cli';

export default defineOpenWeb({
  output: {
    packageDir: '../demo-agent-adapter',
    packageName: '@demo/agent-adapter',
  },
  expose: {
    capabilities: {
      'user.list': {
        from: 'src/api/user.ts#listUsers',
        description: 'List users',
      },
    },
  },
  cards: {
    'user-list-card': {
      source: 'src/components/UserListCard.vue',
      capability: 'user.list',
    },
  },
});

Install And Run

Install the generator in a Vue 3 + axios project, then run it from that project directory:

npm install -D open-web-cli
open-web inspect --json
open-web generate
open-web build

open-web defaults --project to the current working directory. Use --project <path> when running from another directory, and --config <path> when the config file is not named open-web.config.ts.

The demo app in examples/demo-vue-axios references this package locally while developing:

npm run build
cd examples/demo-vue-axios
npm install
npm run open-web:inspect
npm run open-web:build

To verify the published shape before releasing:

npm test
npm pack --dry-run

Programmatic API

The primary integration path is library-first: export a map of existing axios/API functions and wrap it with axios2cli. The result can be used by a tiny CLI entry point without generating a second adapter project:

import { axios2cli } from 'open-web-cli';
import { listKanbanCards, moveKanbanCard } from './src/api/kanban';

export const cliMap = axios2cli({
  'board.listCards': {
    call: listKanbanCards,
    description: 'List kanban cards',
    ui: (cards) => ({
      kind: 'card',
      component: 'kanban-board-card',
      props: { data: cards },
    }),
  },
  'card.move': {
    call: moveKanbanCard,
    description: 'Move a kanban card',
    args: (input) => {
      const payload = input as { id: string; status: string };
      return [payload.id, payload.status];
    },
  },
});
#!/usr/bin/env node
import { runCliMap } from 'open-web-cli';
import { cliMap } from './cli-map';

runCliMap(cliMap).then((exitCode) => {
  process.exitCode = exitCode;
});

The installed CLI can then run capabilities directly:

web-agent board listCards --input '{"status":"ready"}'
web-agent card move --input '{"id":"task-102","status":"done"}'

The scanner/generator APIs still exist for discovery and migration workflows. Use them when an agent, CI job, editor extension, or internal tool needs richer configuration, structured progress events, or direct access to generated results:

import { buildAdapter } from 'open-web-cli';

const result = await buildAdapter({
  projectRoot: process.cwd(),
  configPath: 'open-web.config.ts',
  reporter: {
    event(event) {
      console.error(event.type);
    },
    diagnostic(diagnostic) {
      console.error(diagnostic.code, diagnostic.message);
    },
  },
});

console.log(result.packageDir);

The public API exposes both runtime wrapping and generator flows:

import { axios2cli, runCliMap, serveOpenWebDocs, inspectProject, generateAdapter, buildAdapter } from 'open-web-cli';

Use inspectProject for discovery, generateAdapter when another system will install/build the adapter, and buildAdapter for the full local conversion.

Commands

open-web inspect
open-web generate
open-web build

Generated adapter CLIs are expected to expose:

web-agent login
web-agent auth status
web-agent logout
web-agent docs
web-agent <resource> <action>

Capability commands output a stable JSON envelope by default so they can be used directly by agents and tool wrappers.

web-agent docs starts a local Swagger-like explorer for the converted CLI surface. It shows the total capability count, each command's parameters, HTTP source mapping, CLI usage, linked UI card, and a demo request runner that POSTs to the generated adapter:

web-agent docs --port 4317
web-agent docs --json
web-agent docs --html

The programmatic axios2cli path also includes the same docs base capability through runCliMap(cliMap, ['docs']).

Generative UI Result Shape

Capabilities can return data only, or data plus a frontend-ready UI payload:

{
  "ok": true,
  "capability": "user.list",
  "data": [],
  "summary": "Found 0 users.",
  "ui": {
    "kind": "card",
    "component": "user-list-card",
    "props": {
      "users": []
    }
  }
}

With Mastra + AI SDK, the adapter appends one unified data-open-web-ui message part. The model receives data and summary; the frontend receives the full UI payload and renders it through the generated Vue registry.

MVP Scope

The first milestone is tracked in MVP: Vue3 axios web-to-agent adapter generator.

MVP acceptance is based on a demo Vue 3 + axios app that proves the full vertical slice:

  1. Inspect axios atoms and card candidates.
  2. Generate an independent adapter package.
  3. Capture browser login auth state.
  4. Run a generated CLI capability command.
  5. Import and call the generated SDK.
  6. Expose Mastra tools.
  7. Emit data-open-web-ui.
  8. Render a generated Vue card registry.

See CONTEXT.md and docs/prd/mvp.md for the current architecture and product decisions.