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

influx-vue

v0.3.3

Published

A Vue 3 + TypeScript workbench for exploring InfluxDB buckets, schema, Flux queries, and visualizations.

Downloads

53

Readme

Influx Vue

influx-vue is a Vue 3 + TypeScript workbench for exploring InfluxDB from the UI, switching into raw Flux when needed, and turning query results into charts, tables, and YAML snapshots.

Try The Sample Page

The sample page is the fastest way to understand the component.

Influx Vue sample page

pnpm install
pnpm db:up
pnpm db:seed
pnpm dev

Open the Vite URL shown in the terminal. The sample page auto-fills a local demo connection and auto-connects when the local InfluxDB container is running.

Local demo credentials:

  • URL: the same origin as the app, for example http://localhost:5173
  • Org: influx-vue
  • Bucket: demo-metrics
  • Token: influx-vue-admin-token
  • Username: influx
  • Password: influx-password-123

Notes:

  • The dev and preview servers proxy /api to the local InfluxDB container.
  • Token auth works directly against the component.
  • Username/password auth signs in through the current app origin, issues a token from the active session, and then uses that token for the workbench.

To reset the local demo data:

pnpm db:down
pnpm db:up
pnpm db:seed

What It Does

  • Explore bucket -> measurement -> field -> tags without starting from Flux.
  • Toggle between explorer-driven query building and raw Flux editing.
  • Auto-complete Flux from the current schema context.
  • Visualize results in a chart or table.
  • Export the current state as YAML.
  • Run against a real InfluxDB container in integration tests.

Install

pnpm add influx-vue
import { InfluxWorkbench } from 'influx-vue'
import 'influx-vue/style.css'

influx-vue expects Vue 3.5+ in the host app.

Basic Usage

Token-based initialization:

<script setup lang="ts">
import { InfluxWorkbench } from 'influx-vue'

const initialConnection = {
  url: window.location.origin,
  org: 'influx-vue',
  bucket: 'demo-metrics',
  authMethod: 'token' as const,
  token: 'influx-vue-admin-token',
}
</script>

<template>
  <InfluxWorkbench
    :initial-connection="initialConnection"
    auto-connect
    auto-run-query
  />
</template>

Username/password initialization:

<script setup lang="ts">
import { InfluxWorkbench } from 'influx-vue'

const initialConnection = {
  url: window.location.origin,
  org: 'influx-vue',
  bucket: 'demo-metrics',
  authMethod: 'password' as const,
  username: 'influx',
  password: 'influx-password-123',
}
</script>

<template>
  <InfluxWorkbench
    :initial-connection="initialConnection"
    auto-connect
  />
</template>

If you want to own the auth handshake yourself, you can override it:

<script setup lang="ts">
import { InfluxWorkbench } from 'influx-vue'

async function authenticateConnection(config) {
  return {
    ...config,
    authMethod: 'token',
    token: await fetchMyToken(config),
  }
}
</script>

<template>
  <InfluxWorkbench
    :initial-connection="{ url: window.location.origin, org: 'influx-vue' }"
    :authenticate-connection="authenticateConnection"
  />
</template>

Public API

Props

| Prop | Type | Description | | --- | --- | --- | | initialConnection | Partial<InfluxConnectionConfig> | Prefills the connection state before the workbench connects. Supports both token and username/password auth fields. | | autoConnect | boolean | Attempts to connect on mount. | | autoRunQuery | boolean | Runs the current query after a successful auto-connect. | | hiddenSections | InfluxWorkbenchSectionKey[] | Hides top-level sections such as hero, connection, explorer, results. | | createDataSource | (config) => InfluxExplorerDataSource | Advanced override for custom transports. | | authenticateConnection | (config) => Promise<InfluxConnectionConfig> | Optional override for custom sign-in or token issuance before the workbench creates its data source. |

Events

| Event | Payload | Description | | --- | --- | --- | | connect | { connection, health, bucketCount } | Fired after a successful connection and bucket load. | | connect-error | { error, connection, phase } | Fired when validation, auth, ping, or schema loading fails. | | disconnect | { connection } | Fired when the workbench disconnects. |

Exposed Methods

  • applyConnection(connection)
  • connect()
  • disconnect()
  • runQuery()

Auth Notes

  • authMethod: 'token' uses the provided token.
  • authMethod: 'password' uses username and password, signs into InfluxDB through the browser, and attempts to issue a token from the active session.
  • Username/password mode requires a same-origin path that can reach InfluxDB from the browser.
  • If the signed-in account cannot write authorizations, token issuance fails and the workbench surfaces that error through connect-error.

Development

pnpm install
pnpm dev

Build

pnpm build

Tests

pnpm test:unit
pnpm test:integration

Notes:

  • test:integration starts a real InfluxDB container with seeded sample data.
  • The integration setup works with Docker and local colima environments.

Publishing

Before the first npm publish, review PUBLISHING.md.

pnpm release:check

Repository Layout

  • src/components/InfluxWorkbench.vue: public workbench component
  • src/composables/useInfluxWorkbench.ts: state and orchestration logic
  • src/demo/App.vue: sample page entry
  • src/services/influx/browserDataSource.ts: browser auth and data transport
  • scripts/seed-influx.mts: local demo seeding
  • tests/integration/influxExplorer.integration.spec.ts: container-backed integration coverage