Show HN: Cloudwatch Insights tool for CLI users and agents
The author developed a CLI tool called cloudwatch-insights to streamline log querying from AWS CloudWatch Insights, tailored for both personal and agent-assisted workflows. The tool uses templated queries with contextual variables from the current project directory, executes them, and saves results locally in JSONL format for easy analysis or processing. It supports seamless integration with AI agents and includes features like opening queries in the AWS console via clickable terminal links.
- ▪The tool runs CloudWatch Insights queries from the command line and stores results in JSONL format.
- ▪Queries are templated and auto-filled using context from the current service repository.
- ▪Results are saved locally, with a symlink to the latest run for quick access.
- ▪The tool supports bidirectional conversion between local queries and AWS console URLs via copy-link and paste-link commands.
- ▪It integrates well with AI agents like Claude Code, enabling automated log analysis and error fixing.
Opening excerpt (first ~120 words) tap to expand
Small tools, shared with agents: a CloudWatch Insights exampleMay 1, 2026I've always enjoyed making small tools for myself to improve daily life as a software developer. Most of the time they are CLI tools, since the command line is where I live most of my life. With the advent of agentic coding, this tendency of mine has multiplied. I'm writing more tools now. Agents are really good at writing small, self-contained tools, and you can kick one off from the Claude app on the phone as you sit on the loo. That's nice. But it has also multiplied in another way, because agents love to use CLI tools as much as I do. So I don't just build them for my own direct use; I also use them indirectly, through Claude Code (mostly). Some people would advocate the use of MCP for that type of integration.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Skagedal.