Sign In

@spfunctions/bi

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spfunctions/bi

Agent-friendly BI CLI: query, transform, and inspect tabular data with SQL. Powered by DuckDB.

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
4
300%
Maintainers
1
Weekly downloads
 
Created
Source

@spfunctions/bi

Agent-friendly BI CLI. Query, inspect, and convert tabular data with SQL — powered by DuckDB.

npm i -g @spfunctions/bi

After install, the binary is bi:

bi head sales.csv

Why

LLM agents need a fast, reliable way to work with CSV, JSON, and Parquet files without spinning up a notebook. bi gives them four primitives:

CommandWhat it does
bi head <file>Peek at the first N rows
bi schema <file>Show column names and types
bi query <file> --sql "..."Run any DuckDB SQL against the file
bi convert <file> -o <out>Convert between CSV / JSON / Parquet

Files are streamed via DuckDB's native readers — no full load into memory. CSV column types are auto-detected. Output is plain text by default, JSON/Markdown/CSV on demand for clean piping.

Examples

# Peek
bi head sales.csv -n 5

# Schema
bi schema sales.csv

# Query — use {t} as the table alias
bi query sales.csv --sql "SELECT region, SUM(amount) total FROM {t} GROUP BY region ORDER BY total DESC"

# Output as JSON for an agent to parse
bi query sales.csv --sql "SELECT * FROM {t} WHERE amount > 1000" -o json

# Convert CSV to Parquet
bi convert sales.csv -o sales.parquet

Install (from source)

git clone https://github.com/spfunctions/bi
cd bi
npm install
npm run build
node dist/cli.js head sample.csv

Output formats

FlagFormatUse case
table (default)Aligned columns, ANSI colorsHumans in a terminal
jsonJSON array of objectsPipe to jq, agents
csvRFC-4180 CSVPipe to other tools
markdownGFM tablePaste into docs/issues

Why DuckDB

  • Streams Parquet, CSV, JSON without loading into memory
  • ~10x faster than pandas for typical analytics
  • Zero config — no server, no schema definitions
  • Battle-tested SQL engine, open source

License

MIT — Sparkco. Built for agents at sparkco.ai.

Keywords

cli

FAQs

Package last updated on 07 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts