bl-log (Bun CLI)
Bun-only CLI tool 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.
Requirements
- Bun runtime (v1.3.5 or later)
🚀 Installation
bun add -g bl-log
💻 Usage
For LLMs viewing logs (default output is structured CSV):
l-log list ./logs/example.csv
l-log stats ./logs/example.csv
l-log view ./logs/example.csv 0
l-log view ./logs/example.csv --last
l-log search ./logs/example.csv "query"
l-log tags ./logs/example.csv tag1 tag2
l-log add ./logs/example.csv "Fix bug" --tags=bug,fix --problem="Problem description"
For human users viewing logs:
l-log list ./logs/example.csv --human
l-log stats ./logs/example.csv --human
l-log view ./logs/example.csv 0 --human
l-log search ./logs/example.csv "query" --human
l-log tags ./logs/example.csv tag1 tag2 --human
l-log add ./logs/example.csv "Fix bug" --tags=bug,fix --problem="Problem description"
🤖 Ask AI agent (LLMs) to write a log
use l-log CLI to save chat log above
Ask AI agent (LLMs) to read a log
read last chat logs from "./logs/example.csv" and tell me what should I do next
Example LLMs's response:
Based on the last entry in ./logs/example.csv and the current state of your repository, here is what you should do next:
### Current Status
The last task completed was "Make llm-lean-log packages public". This involved:
- Updating package.json for both llm-lean-log-core and l-log with repository info, files, and publishConfig.
- Adding LICENSE and README.md files.
- Configuring the CLI as an executable.
- Creating the guide at docs/public.md.
### Recommended Next Steps
1. Perform a Dry Run
Before pushing to NPM, ensure that the files being packaged are correct. Run this from the root:
...
Development
bun run build
Output: "dist/l-log" file.
Move "dist/l-log" to "/usr/local/bin/l-log-dev":
sudo mv dist/l-log /usr/local/bin/l-log-dev
📖 Additional information
This project was created using bun init in bun v1.3.5. Bun is a fast all-in-one JavaScript runtime.
💻 Use with VS Code base editor
- Install recommended extensions from
.vscode/extensions.json, which includes:
DavidAnson.vscode-markdownlint - Markdown linting
biomejs.biome - Code formatting and linting
oven-sh.bun - Bun runtime support
jeff-hykin.better-csv-syntax - CSV syntax highlighting (with color coding)
YoavBls.pretty-ts-errors - Pretty TypeScript errors
📄 License
MIT