@graphysdk/data-import-utils
Parse CSV, TSV, JSON, and spreadsheet files into the { columns, rows } shape used by Graphy charts and agents.
Learn more at graphy.dev.
Install
npm install @graphysdk/data-import-utils
Docs
Usage
import { fromFile } from '@graphysdk/data-import-utils/file';
const data = await fromFile('sales.csv');
const spreadsheet = await fromFile('report.xlsx', { sheet: 'Revenue' });
import { fromURL } from '@graphysdk/data-import-utils/url';
const data = await fromURL('https://example.com/sales.csv');
Each format also has its own entry, so you only bundle what you need:
import { fromCSV } from '@graphysdk/data-import-utils/csv';
import { fromTSV } from '@graphysdk/data-import-utils/tsv';
import { fromXLSX } from '@graphysdk/data-import-utils/xlsx';
import { fromXLS } from '@graphysdk/data-import-utils/xls';
import { fromODS } from '@graphysdk/data-import-utils/ods';
With the Agents SDK
import { fromFile } from '@graphysdk/data-import-utils/file';
import { GraphyAiSdk } from '@graphysdk/agents-sdk';
const data = await fromFile('revenue.csv');
const ai = new GraphyAiSdk({ apiKey: process.env.GRAPHY_API_KEY });
const result = await ai.generateGraph({
config: { data },
userPrompt: 'bar chart of revenue by company',
});
Formats
| Format | Function | Input |
|---|---|---|
| CSV | fromCSV() | string |
| TSV | fromTSV() | string |
| XLSX | fromXLSX() | ArrayBuffer |
| XLS | fromXLS() | ArrayBuffer |
| ODS | fromODS() | ArrayBuffer |
Agent skills
Install the Graphy agent skills from github.com/graphysdk/skills to set up the SDK and author charts from Cursor, Claude Code, and other coding agents.
Licence
This package is available under PolyForm Noncommercial, Small Business, or a 32-day Free Trial. Free Trial is local or internal evaluation only — it does not cover a public page. See what you can do under the trial.
For a commercial licence, talk to us.
Support
Questions and community help: Discord.