返回排行榜

TylerBrock/saw

Go

Fast, multi-purpose tool for AWS CloudWatch Logs

awscloudwatch-logslogsstreamingstreamercolorjsonclitailwatch
Star 增长趋势
Star
1.4k
Forks
85
周增长
Issues
36
5001k
2017年8月2020年7月2023年7月2026年7月
制品库Go Modulesgo get github.com/TylerBrock/saw
README

Saw

saw is a multi-purpose tool for AWS CloudWatch Logs

Saw Gif

Go Report Card

Features

  • Colorized output that can be formatted in various ways

    • --expand Explode JSON objects using indenting
    • --rawString Print JSON strings instead of escaping ("\n", ...)
    • --invert Invert white colors to black for light color schemes
    • --raw, or --pretty, for watch and get commands respectively, toggles display of the timestamp and stream name prefix.
  • Filter logs using CloudWatch patterns

    • --filter foo Filter logs for the text "foo"
  • Watch aggregated interleaved streams across a log group

    • saw watch production Stream logs from production log group
    • saw watch production --prefix api Stream logs from production log group with prefix "api"

Usage

  • Basic

    # Get list of log groups
    saw groups
    
    # Get list of streams for production log group
    saw streams production
    
  • Watch

    # Watch production log group
    saw watch production
    
    # Watch production log group streams for api
    saw watch production --prefix api
    
    # Watch production log group streams for api and filter for "error"
    saw watch production --prefix api --filter error
    
  • Get

    # Get production log group for the last 2 hours
    saw get production --start -2h
    
    # Get production log group for the last 2 hours and filter for "error"
    saw get production --start -2h --filter error
    
    # Get production log group for api between 26th June 2018 and 28th June 2018
    saw get production --prefix api --start 2018-06-26 --stop 2018-06-28
    

Profile and Region Support

By default Saw uses the region and credentials in your default profile. You can override these to your liking using the command line flags:

# Use personal profile
saw groups --profile personal

# Use us-west-1 region
saw groups --region us-west-1

Installation

Run from Docker

docker run --rm -it -v ~/.aws:$HOME/.aws tbrock/saw

Mac OS X

brew tap TylerBrock/saw
brew install saw

Linux

Arch Linux (source)

# Using yay
yay saw

# Using makepkg
git clone https://aur.archlinux.org/saw.git
cd saw
makepkg -sri

Red Hat Based Distributions (Fedora/RHEL/CentOS/Amazon Linux)

rpm -i <link_to_rpm_you_need_from_releases>

Debian Based Distributions (Debian/Ubuntu)

wget <link_to_deb_you_need_from_releases>
sudo dpkg -i <the_deb_name>

Manual Install/Update

  • Install go
  • Configure your GOPATH and add $GOPATH/bin to your path
  • Run go install github.com/TylerBrock/saw@latest

Windows Specifics

  • Add %GOPATH%/bin to your path (optional)
  • Run from gopath/bin (If not in your path)
    cd %GOPATH%/bin
    saw ...
    

Alternatively you can hard code these in your shell's init scripts (bashrc, zshrc, etc...):

# Export profile and region that override the default
export AWS_PROFILE='work_profile'
export AWS_REGION='us-west-1'

Run Tests

From root of repository: go test -v ./...

TODO

  • Bash + ZSH completion of log groups + (streams?)
  • Create log streams and groups
  • Delete log streams and groups
  • Basic tests
相关仓库
ByteByteGoHq/system-design-101

Explain complex systems using visuals and simple terms. Help you prepare for system design interviews.

Otherawscloud-computing
bytebytego.com/guides
86.3k9.6k
bregman-arie/devops-exercises

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

PythonPyPIOtherdevopsaws
83.3k19.8k
localstack/localstack

💻 A fully functional local AWS cloud stack. Develop and test your cloud & Serverless apps offline

PythonPyPIOtherawslocalstack
localstack.cloud
65.1k4.8k
serverless/serverless

⚡ Serverless Framework – Effortlessly build apps that auto-scale, incur zero costs when idle, and require minimal maintenance using AWS Lambda and other managed cloud services.

JavaScriptnpmOtherserverlessserverless-framework
serverless.com
46.9k5.7k
danny-avila/LibreChat

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

TypeScriptnpmMIT Licenseaichatgpt
librechat.ai
41.1k8.4k
donnemartin/data-science-ipython-notebooks

Data science Python notebooks: Deep learning (TensorFlow, Theano, Caffe, Keras), scikit-learn, Kaggle, big data (Spark, Hadoop MapReduce, HDFS), matplotlib, pandas, NumPy, SciPy, Python essentials, AWS, and various command lines.

PythonPyPIOtherpythonmachine-learning
29.3k8k
pulumi/pulumi

Pulumi - Infrastructure as Code in any programming language 🚀

GoGo ModulesApache License 2.0infrastructure-as-codeserverless
pulumi.com
25.5k1.4k
getsops/sops

Simple and flexible tool for managing secrets

GoGo ModulesMozilla Public License 2.0securitysecret-distribution
getsops.io
22.6k1.1k
milanm/DevOps-Roadmap

DevOps Roadmap for 2026. with learning resources

Apache License 2.0awsazure
newsletter.techworld-with-milan.com
19.9k3.4k
kubernetes-sigs/kubespray

Deploy a Production Ready Kubernetes Cluster

JinjaApache License 2.0kubernetes-clusteransible
18.6k6.9k
aws/aws-cli

Universal Command Line Interface for Amazon Web Services

PythonPyPIOtherawscloud
17.1k4.6k
floci-io/floci

Light, fluffy, and always free - The AWS Local Emulator alternative

JavaMavenMIT Licenseawsaws-emulation
floci.io/floci/
17k1.7k