Coder Social home page Coder Social logo

cueitup's Introduction

cueitup

✨ Overview

cueitup lets you inspect messages in an AWS SQS queue in a simple and deliberate manner. It was built to simplify the process of investigating the contents of messages being pushed to an SNS topic. You can pull one or more messages on demand, peruse through them in a list, and, if needed, persist them to your local filesystem.

Usage

Demo video:

Demo Video

Install

homebrew:

brew install dhth/tap/cueitup

go:

go install github.com/dhth/cueitup@latest

⚡️ Usage

Consuming JSON messages

Basic usage

cueitup \
    -aws-profile="<PROFILE>" \
    -aws-region="<REGION>" \
    -queue-url="https://sqs.eu-central-1.amazonaws.com/<ABC>/<XYX>" \
    -msg-format=json

Viewing a subset of the full payload

To only view the nested object with the key 'Message' in the JSON payload below, use 👇

{
  "Type": "Notification",
  "MessageId": "f7bbec51-1cd1-4630-8eb3-7b124de6d6f4",
  "TopicArn": "arn:aws:sns:eu-central-1:123:queue-name",
  "Message": {
    "companyId": "af8e74b2-82db-4349-b861-c1d9d1a3033f",
    "resourceId": "611a709e-2b96-41e3-9274-8bbd4e191334",
    "aggregateId": "93422d4d-90ec-4a20-a794-3f835d7605cf",
    "sequenceNr": 59,
    "dateTime": "b5692ca5-e060-4318-8a40-e2b806a4018a",
    "type": "com.some.kind.of.event",
    "version": 1
  },
  "Timestamp": "5f0244d6-e640-43f4-86d0-5b9aa639c7df",
  "SignatureVersion": "1",
  "Signature": "XYZ",
  "SigningCertURL": "https://sns.eu-central-1.amazonaws.com/SimpleNotificationService-ABC",
  "UnsubscribeURL": "https://sns.eu-central-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-central-1:XYZ"
}
cueitup \
    -aws-profile="<PROFILE>" \
    -aws-region="<REGION>" \
    -queue-url="https://sqs.eu-central-1.amazonaws.com/<ABC>/<XYX>" \
    -msg-format='json' \
    -subset-key='Message'

Adding Context to Your List

You can provide a key, whose value will be shown as for context in the list.

cueitup \
    -aws-profile="<PROFILE>" \
    -aws-region="<REGION>" \
    -queue-url="https://sqs.eu-central-1.amazonaws.com/<ABC>/<XYX>" \
    -msg-format='json' \
    -subset-key='Message' \
    -context-key='resourceId'

Reference Manual

cueitup has 3 views:
- Message List View
- Message Value View
- Help View

Keyboard Shortcuts

General

   <tab>                          Switch focus to next section
   <s-tab>                        Switch focus to previous section
   1                              Maximize message value view
   ?                              Show help view

Message List View

   h/<Up>                         Move cursor up
   k/<Down>                       Move cursor down
   n                              Fetch the next message from the queue
   N                              Fetch up to 10 more messages from the queue
   }                              Fetch up to 100 more messages from the queue
   d                              Toggle deletion mode; cueitup will delete messages
                                      after reading them
   <ctrl+s>                       Toggle contextual search prompt
   <ctrl+f>                       Toggle contextual filtering ON/OFF
   <ctrl+p>                       Toggle queue message count polling ON/OFF; ON by default
   p                              Toggle persist mode (cueitup will start persisting
                                      messages, at the location
                                      messages/<topic-name>/<timestamp-when-cueitup-started>/<unix-epoch>-<message-id>.md
   s                              Toggle skipping mode; cueitup will consume messages,
                                      but not populate its internal list, effectively
                                      skipping over them

Message Value View

   q                              Minimize section, and return focus to list view
   [,h                            Show details for the previous entry in the list
   ],l                            Show details for the next entry in the list

TODO

  • Add ability to only save records with a chosen set of keys

Acknowledgements

cueitup is built using the awesome TUI framework bubbletea.

cueitup's People

Contributors

dependabot[bot] avatar dhth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.