🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

llm-lean-log-core

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

llm-lean-log-core

Core library for llm-lean-log

latest
Source
npmnpm
Version
0.2.5
Version published
Weekly downloads
25
177.78%
Maintainers
1
Weekly downloads
 
Created
Source

llm-lean-log-core

📦 Core library for llm-lean-log - Logging for LLMs, but we cut the fat.

llm-lean-log is a format for logging that is optimized for LLM token usage, using a simple CSV-based structure.

For more information, see the main repository.

This package contains the core logic for parsing, saving, and visualizing logs in the llm-lean-log format.

🚀 Installation

bun add llm-lean-log-core

📦 Usage

Managing Logs

import { loadLogs, addLogEntry, saveLogs } from "llm-lean-log-core";

// Load logs
let entries = await loadLogs("logs.csv");

// Add an entry
entries = addLogEntry(entries, {
  name: "My Log",
  problem: "Something happened",
  tags: "tag1,tag2"
});

// Save logs
await saveLogs("logs.csv", entries);

Visualizing Logs

import { visualizeTable, visualizeEntry } from "llm-lean-log-core";

// Get LLM-optimized CSV output (omits empty columns)
const llmTable = visualizeTable(entries, { llm: true });

// Get Human-friendly formatted output (with colors and boxes)
const humanEntry = visualizeEntry(entries[0], { colors: true });

Advanced CSV Export

import { logEntriesToCSVMinimal } from "llm-lean-log-core";

// Export entries to CSV, automatically removing columns that are empty for all rows
const minimalCsv = logEntriesToCSVMinimal(entries);

📄 License

MIT

Keywords

llm

FAQs

Package last updated on 22 Jan 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