Posts for: #Automation

mail-app-cli: Scriptable Email for Emacs and AI Agents

mail-app-cli: Scriptable Email for Emacs and AI Agents

Email clients have GUIs. AI agents need APIs. Emacs users need text interfaces. macOS Mail.app has neither.

mail-app-cli solves this by wrapping Mail.app in a scriptable command-line interface. Complete access to accounts, mailboxes, messages, and attachments. JSON output. No OAuth dance. No API tokens. If it’s in Mail.app, you can script it.

The Problem It Solves

For Emacs users: Read and manage email without leaving your editor. mail-app-wrap provides the Emacs interface. mail-app-cli provides the engine.

[Read more]

Monitoring File Handles with 1975 Technology

Monitoring File Handles with 1975 Technology

Your process is leaking file handles. You need to track which processes are consuming handles over time, spot anomalies, and correlate with system behavior. Modern observability platforms want you to install 200MB Docker images, connect to cloud services, and pay subscription fees.

Or you could use six shell scripts totaling 150 lines.

The Tools

collect - Sample file handle counts every 5 minutes avg - Calculate statistics (count, average, min, max) graph - ASCII chart of handle counts over time spikes - Find anomalies (2x average or custom threshold) top - Show processes by handle consumption timeline - Aggregate by time buckets (hourly, daily)

[Read more]

Testing AI Systems: Beyond Unit Tests

Testing AI Systems: Beyond Unit Tests

Unit tests verify deterministic behavior. AI systems are probabilistic. Traditional assertions fail when correct outputs vary. “Generate a product description” has infinite valid responses.

Testing AI requires different approaches. Behavioral verification over exact matching. Property-based testing over example-based. Visual validation for UI outputs. Integration testing across the entire pipeline.

Testing Model Outputs

Problem: Non-Deterministic Results

# This test will fail randomly
def test_generate_description():
    description = model.generate("laptop")
    assert description == "A portable computer for work and entertainment"
    # Fails when model outputs equally valid: "Lightweight computing device for productivity"

Solution: Property Testing

[Read more]

direnv: Tree-Based Environment State for Your Terminal

direnv: Tree-Based Environment State for Your Terminal

Every project needs different environment variables. GitHub credentials for personal projects. GitHub Enterprise for work. Different AWS profiles. Different API keys. Different Node.js versions.

The traditional approach: manually export variables, or source project-specific shell scripts, or maintain complex .zshrc configurations that load everything globally.

direnv automates this. Drop a .envrc file in any directory. direnv loads it when you cd in, unloads it when you cd out. Tree-based: child directories inherit parent .envrc settings. Works with any shell.

[Read more]

FFmpeg for AI Training Data: Jump-Cut Automation

FFmpeg for AI Training Data: Jump-Cut Automation

Video data represents one of the richest sources for training AI models, from action recognition to content moderation systems. However, raw video often contains significant noise - dead air, redundant frames, and irrelevant segments. Here’s a production-tested approach to automated video processing that has streamlined our training data preparation.

The Challenge: Extracting Signal from Video Noise

When building datasets for video understanding models, we frequently encounter:

  • Long pauses that add no informational value
  • Redundant segments that can skew model training
  • Inconsistent formats that break processing pipelines
  • Massive file sizes that inflate storage costs

The solution? Automated jump-cut processing with intelligent backup strategies.

[Read more]