{"slug": "show-hn-brytlog-ai-logger", "title": "Show HN: Brytlog – AI logger", "summary": "Developer released Brytlog, an open-source AI logger that replaces raw terminal output with concise AI summaries to save developers time and money. The tool acts as a pre-processor for agentic workflows and supports multiple LLM providers while being platform-agnostic and privacy-minded.", "body_md": "Brytlog replaces raw logs with AI summary, **thus saving developers time, trouble and money.**\n\nIn agentic workflows brytlog acts as a cheap, fast pre-processor to the chief agent.\n\nFor example, Claude Opus 4.8 (chief agent) might run `brytlog python run.py`\n\n, rather than the plain `python run.py`\n\n. This way, instead of having to process the entire raw output on its own (slow, expensive, bloats context), it will only get a concise summary, generated by a cheaper, faster model, such as Gemini-3-flash.\n\n- As a fail-safe, raw logs are saved so they can be accessed by the chief agent or developer if still needed (this is a toggleable feature in config).\n- Even the cheaper model doesn't get the full raw dump, just the important parts, thus saving even more time and money.\n\nIn non-agentic, dev-driven workflows, brytlog simply saves the developer the time and trouble of analyzing raw output by himself, or copy-pasting lines into a coding assistant.\n\n- free\n- open source\n- platform, language and llm vendor agnostic\n- minimal setup (just bring your own key, or run locally)\n- no need to change existing code (just add a couple of lines to AGENTS.md)\n- lightweight (~50 KB, ~1,400 lines of code)\n- customizable\n- privacy-minded (brytlog doesn't collect any data, and it redacts sensitive information before passing it to the LLM)\n\n| Without brytlog | With brytlog | With brytlog --json |\n|---|---|---|\n## demo-no-brytlog.mp4 |\n## demo-with-brytlog.mp4 |\n## demo-json-output.mp4 |\n\n```\npip install brytlog\n```\n\nAfter installation either run a command using brytlog (e.g. `brytlog node main.js`\n\n), which will launch an on-boarding config process in the terminal, or run `brytlog --config`\n\nto open a json configuration file in your default editor.\n\n- LLM provider (e.g. Anthropic)\n- Model (e.g. claude-haiku-4-5)\n- API key (e.g. JQ.Ab9RN6W6QW7cmcnY92DIuoVtjCpKm_qfmO5T5oGzQmnwe5fjhw)\n\n- Google Gemini: Use keys from Google AI Studio (\n[https://aistudio.google.com/]). Google Cloud Vertex AI is not natively supported yet.- Custom Providers: Supports OpenAI-compatible endpoints (Ollama, vLLM, etc.) via standard\n`Authorization: Bearer`\n\nheaders. Azure OpenAI is not natively supported yet.\n\n- Base URL (e.g.\n[http://localhost:11434/v1](http://localhost:11434/v1))\n\nSimply prefix any command with `brytlog`\n\n.\n\nSyntax: `brytlog [options] <command>`\n\n.\n\nExamples:\n\n```\nbrytlog python run.py \nbrytlog --api-key xyz... node build.js\nbrytlog --model claude-haiku-4-5 ./deploy.sh\n```\n\nWrap the entire string in quotes to run multiple commands together.\n\n```\nbrytlog \"pip install -r requirements.txt && python run.py\"\n\nbrytlog \"node main.js\n         npm run serve\"\n```\n\nEither prompt inline at the beginning of a session or add this or similar to AGENTS.md:\n\n```\nbrytlog replaces raw terminal output with a concise AI summary.\n\nUse it for interpreters (e.g.`python`, `node`), compilers, build tools (e.g. `npm`, `make`), and test runners (e.g. `pytest`). Do not use it for standard OS utilities (e.g.` ls`, `cat`), version control (e.g.` git`), or interactive CLI tools (e.g.` htop`).\n\nSyntax: `brytlog [options] <command>` (e.g., `brytlog --json python run.py`).\n```\n\nInstead of raw log, a short report is outputted to the terminal.\n\n```\n                                   ────────────────────────────────────────────────────────────\n\n                                                     🧠📜 brytlog crash report\n\nProblem\nThe program crashed due to a TypeError when attempting to divide an integer by a string. The 'items' value from the configuration is a string and needs to be converted to an integer for arithmetic operations.\n\nFix\nConvert payload['items'] to an integer before division in /var/folders/ys/zfg72rwd661dn0cnrsqth5sh0000gn/T/tmph1e0wuse.py, line 6:\naverage = payload['total'] / int(payload['items'])\n\nFull report → /path/to/project/brytlog-reports/2026-06-15T14-11-51.log\nFull raw log → /path/to/project/brytlog-raw/2026-06-15T14-11-51.txt\n\n                                   ────────────────────────────────────────────────────────────\n```\n\n| Flag | Description |\n|---|---|\n`--version` |\nShow program's version number and exit |\n`--config` |\nOpen the configuration file |\n`--reset` |\nReset configuration to defaults |\n`--upgrade` |\nUpgrade brytlog to the latest version on PyPI |\n`--test` |\nRun a simulated crash to test the LLM configuration |\n`--logs` |\nList recent logs from the local `brytlog-reports/` directory |\n`--provider` |\nLLM provider (`google` , `openai` , `anthropic` , `grok` , `ollama` , `custom` ) |\n`--model` |\nLLM model to use (e.g., `gpt-4o-mini` ) |\n`--api-key` |\nPass API key inline |\n`--api-base-url` |\nBase URL for `custom` or `ollama` providers |\n`--json` |\nOutput the report as JSON |\n`--no-log` |\nDisable writing AI reports to the local `brytlog-reports/` directory |\n`--no-raw-log` |\nDisable writing raw logs to the local `brytlog-raw/` directory |\n`--quiet` |\nSuppress the live stream of raw logs in the terminal (default) |\n`--no-quiet` |\nDisplay the live stream of raw logs in the terminal (override quiet default) |\n\n| Variable | Default | Description |\n|---|---|---|\n`BRYTLOG_API_KEY` |\n— | Required for crash reports (unless using local llm) |\n`BRYTLOG_PROVIDER` |\n— | LLM provider |\n`BRYTLOG_MODEL` |\n— | LLM model |\n`BRYTLOG_API_BASE_URL` |\n— | Required for `custom` provider |\n`BRYTLOG_SAVE_REPORT` |\n`true` |\nSet to `false` to disable AI report files |\n`BRYTLOG_SAVE_RAW_LOG` |\n`true` |\nSet to `false` to disable raw log files |\n`BRYTLOG_QUIET` |\n`true` |\nSet to `true` to mute live terminal output |\n`BRYTLOG_MAX_INPUT` |\n`4000` |\nMax tokens (approximate) of terminal output to keep |\n`BRYTLOG_SYSTEM_PROMPT` |\n(built-in) | Custom system prompt for the crash report |\n`BRYTLOG_TEMPERATURE` |\n`0.2` |\nModel temperature |\n`BRYTLOG_MAX_OUTPUT` |\n`1000` |\nMax tokens for the report. Note: API token limits are automatically padded (min 2048) to accommodate reasoning models. |\n\nbrytlog runs a given command as a child process, diverts its `stdout`\n\nand `stderr`\n\naway from the terminal by default, and instead only outputs a concise AI summary of the run.\n\nPossible scenarios:\n\n**Clean success**(exit`0`\n\n, no warning-like keywords): reports success and sends nothing to the LLM.**Success with warnings**(exit`0`\n\n, keywords such as`warning`\n\n,`deprecated`\n\n, or`skipped`\n\ndetected): sends a sampled head / warnings / tail excerpt to the chosen LLM for a short summary of the run.**Crash**(non-zero exit): sends a token-bounded head-and-tail excerpt of the output to the LLM and prints a concise problem/fix report.\n\nBecause brytlog wraps the process rather than hooking into it, it works for **any language or runtime** with no changes to the program being run.\n\n``` php\nflowchart TD\n    A[Run command] --> B[Capture output and exit code]\n    B --> C{Success}\n\n    C -- Yes --> D{Warnings detected}\n    C -- No --> F[Build excerpt]\n\n    D -- No --> E[Print success]\n    D -- Yes --> F\n\n    F --> G[Send to LLM]\n    G --> H[Print AI report]\n\n    B -.-> I[\"Save raw log (optional)\"]\n    H -.-> J[\"Save AI report (optional)\"]\n```\n\n- CLI flags take precedence over environment variables, which in turn take precedence over the config file.\n- Configuration is saved globally to\n`~/.brytlog.json`\n\n(`C:\\Users\\Name\\.brytlog.json`\n\non Windows). You can edit this file directly or run`brytlog --config`\n\nto open it.- Logs are saved locally to\n`brytlog-reports/`\n\nand`brytlog-raw/`\n\nin the current working directory. You may want to add`brytlog-*/`\n\nto your`.gitignore`\n\n.- To be clear: raw command output is muted (run in quiet mode) to humans and AI agents by default to save tokens and prevent context bloat. In quiet mode,\n`stdin`\n\nis redirected to`/dev/null`\n\n, meaning any interactive prompt will instantly crash the program (e.g.`EOFError`\n\n) to generate a helpful AI report rather than hanging indefinitely. Brytlog only prints the concise AI report if a command fails. To display the live stream of raw logs in the terminal as usual and answer interactive prompts, use`--no-quiet`\n\n.- Reasoning models (e.g., Gemini Flash-3-Preview): These models spend a large portion of their output budget on \"thinking\" tokens. Brytlog automatically enforces a 2048-token floor at the API level to ensure these models have room to think, while still instructing them to keep the visible report under your\n`MAX_OUTPUT`\n\nlimit.- Enforcing agent use of brytlog, rather than relying on AGENTS.md or direct prompting, is also possible (e.g. via subprocess shim on PATH), but out of scope in this version.\n\nMIT", "url": "https://wpnews.pro/news/show-hn-brytlog-ai-logger", "canonical_source": "https://github.com/Guy-Sela/brytlog", "published_at": "2026-06-27 08:06:02+00:00", "updated_at": "2026-06-27 08:36:05.954830+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "large-language-models", "ai-agents"], "entities": ["Brytlog", "Claude Opus", "Gemini-3-flash", "Anthropic", "Google AI Studio", "Ollama", "vLLM"], "alternates": {"html": "https://wpnews.pro/news/show-hn-brytlog-ai-logger", "markdown": "https://wpnews.pro/news/show-hn-brytlog-ai-logger.md", "text": "https://wpnews.pro/news/show-hn-brytlog-ai-logger.txt", "jsonld": "https://wpnews.pro/news/show-hn-brytlog-ai-logger.jsonld"}}