Categorygithub.com/derricw/cwl
modulepackage
0.0.0-20250226060940-225d31fffc91
Repository: https://github.com/derricw/cwl.git
Documentation: pkg.go.dev

# README

cwl

Simple CLI and TUI for browsing Cloudwatch logs in the terminal.

Aims to be as simple as possible but no simpler.

Made with VHS

Install

go install github.com/derricw/cwl@latest

Use

Basic

List log groups:

cwl groups

List streams for a group:

cwl streams /my/log/group

Write events from a stream to stdout:

cwl events arn:aws:logs:us-west-2:12345657890:log-group:/aws/batch/job:log-stream:my_batch_job_12345

Use a specific AWS profile (otherwise uses default credential chain):

cwl -p testProfile groups

Query a log group using cloudwatch query language:

cwl query /my/log/group -q "fields @timestamp, @message | sort @timestamp desc | limit 5"

Omit the arg to query all log groups:

cwl query -q "fields @timestamp, @message | sort @timestamp desc | limit 5"

Using in a pipeline

Each command can read input from stdin, so you can compose with other tools like fzf or grep:

cwl streams /aws/batch/job | fzf | cwl events

Start searching many log streams for a keyword and dump to file:

cwl streams /aws/batch/job | cwl events | grep "ERROR" > errors.log

TUI

Use with no arguments to start a TUI:

cwl

# Packages

No description provided by the author
No description provided by the author
No description provided by the author