https://github.com/danielsss/cw.js
AWS CloudWatch log streams could be read by terminal.
https://github.com/danielsss/cw.js
Last synced: 4 months ago
JSON representation
AWS CloudWatch log streams could be read by terminal.
- Host: GitHub
- URL: https://github.com/danielsss/cw.js
- Owner: danielsss
- License: mit
- Created: 2021-01-09T16:34:52.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2026-01-25T11:02:02.000Z (4 months ago)
- Last Synced: 2026-01-26T01:58:31.585Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 2.84 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://opensource.org/licenses/MIT)

# 🔥Reading log streams from AWS CloudWatch 🔥
`cw.js` is written by `Typescript` and based on [AWS SDK](https://github.com/aws/aws-sdk-js) CloudWatchLogs and ECS.
It supports
reading logs in a cluster mode
which means you can read all tasks in a window and has also supported local cache for group names.
# Usage
Installing the `cw.js` as a global package.
```shell script
$ npm i -g cw.js
```
```shell script
$ cw --profile en --region us-east-1
```
```shell
cw --help
Usage: cw [Options]
Options:
-V, --version output the version number
-a, --access-key-id specify aws access key id
-c, --cluster ECS cluster numbers
-d, --debug output extra debugging
-g, --group-name specify group name of cloud-watch service
-p, --profile aws credential profile
-r, --region specify aws region
-s, --secret-access-key specify aws secret access key
-lc, --local-cache use local cache, if data are stored in local environment
-h, --help display help for command
Example:
$cw -a ${awsAccessKeyId} -s ${awsSecretAccessKey} -r ${awsRegion} -g ${groupName}
$cw -p ${awsCredentialProfile} -r ${awsRegion} -g ${groupName}
```
There is a thing you need to know which makes sure the [credentials](https://docs.amazonaws.cn/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html) are stored to local configuration if you are going to use `--profile`.