Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/batmac/ccat
cat on steroids
https://github.com/batmac/ccat
base64 cli command-line command-line-tool golang golang-application google-cloud-storage json libcurl lzfse-decompressor lzma lzma2 plist-extract s2 s3 syntax-highlighting sysadmin-tool yaml zstd
Last synced: about 1 month ago
JSON representation
cat on steroids
- Host: GitHub
- URL: https://github.com/batmac/ccat
- Owner: batmac
- License: mit
- Created: 2022-05-31T15:01:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-02T02:00:44.000Z (about 1 month ago)
- Last Synced: 2024-10-02T06:41:46.991Z (about 1 month ago)
- Topics: base64, cli, command-line, command-line-tool, golang, golang-application, google-cloud-storage, json, libcurl, lzfse-decompressor, lzma, lzma2, plist-extract, s2, s3, syntax-highlighting, sysadmin-tool, yaml, zstd
- Language: Go
- Homepage:
- Size: 14.3 MB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.header.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# ccat
[![Built with Mage](https://magefile.org/badge.svg)](https://magefile.org)
[![Go](https://github.com/batmac/ccat/actions/workflows/go.yml/badge.svg)](https://github.com/batmac/ccat/actions/workflows/go.yml)
![GitHub](https://img.shields.io/github/license/batmac/ccat)
[![Go Report Card](https://goreportcard.com/badge/github.com/batmac/ccat)](https://goreportcard.com/report/github.com/batmac/ccat)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fbatmac%2Fccat.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fbatmac%2Fccat?ref=badge_shield)
[![codecov](https://codecov.io/gh/batmac/ccat/branch/main/graph/badge.svg?token=PCD6DM6S75)](https://codecov.io/gh/batmac/ccat)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/batmac/ccat/main.svg)](https://results.pre-commit.ci/latest/github/batmac/ccat/main)cat on steroids.
Leveraging great go modules to ease my CLI life.## Install
### Homebrew
`brew install batmac/tap/ccatos`
### Manually
Get the latest release from
### Build from source with Mage
Run the zero-install code or use your mage binary:
```shell
$ git clone https://github.com/batmac/ccat
$ go run magefiles/mage.go -l # or 'mage -l'
Targets:
buildDefault
buildDefaultAndTest* buildDefault,test
buildFull tags: libcurl,crappy,plugins
buildMinimal tags: nohl,fileonly
clean
install put ccat to $GOPATH/bin/ccat
installDeps go mod download
test all
testCompressionGo
testGo go test ./...
updateREADME
verifyDeps go mod verify* default target
$ go run magefiles/mage.go # or 'mage'
```## Update
- You can update to the latest github release with `ccat --selfupdate`.
- You can check against your current installed version with `ccat --check`.## Build tags
available build tags:
- `libcurl`: build with the libcurl opener.
- `plugins`: build with the yaegi plugins engine.
- `fileonly`: build with the local file opener only.
- `nohl`: build without the syntax-highlighter.
- `crappy`: build with some crappy (but useful) openers/mutators.
- `keystore`: build with the OS keyring support (Mac,Linux,Windows).## Examples
```shell
$ ccat -m "x:kubectl get all" -i -w -t ready,Running --bg
NAME READY STATUS RESTARTS AGE
pod/busybox3 1/1 Running 1 17mNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.96.0.1 443/TCP 21d
```( "READY and "Running" have different background colors )
```shell
$ echo Hello: | ccat -m y2j,j2y,base64,hexdump
00000000 53 47 56 73 62 47 38 36 49 47 35 31 62 47 77 4b |SGVsbG86IG51bGwK|
``````shell
$ ccat -m zstd,base64 LICENSE
KLUv/WQwA+UUAGKyjCQQi1gA+Mu1uPH4trE1CdEhIptwP1oghhOOOP5rTRkCAKACAAdroEXGmA2Uz10inntYY97kIsI70zHae3CBb+DnAi4lAWNzxHPSRXalSceYEc4rc2FxPri8gX/QzYX9sT/32JzZHMbds2JzJmwIlmDMlYRjz/LGa8+BueftcBkb80Dn00G42FDA5RFeRujMBVvNmX8e5sjP1xLa4ftzH5ivJRriudg89+A789ibhIq4UDyyZ7G4GZni7BE2l7K96ZqlNKZ73IHNx5wltsQbeNlcc+bhPNOmS7jnE77PxeGI55jFszx3hWnuUSTcivBStqhQaFeY5xDeeOwNfGM+FiNjfC6gMx3jCoB0lwzgTGNcAoyKS/cWGWM2UL45c60B6ko+0c6WZuyo8Cl6249qdXyaqIRxSxnqfO0rw3XQV2mudYDt7dyRvdAhthvuNN3Hzc9QXbj4N6oSbktVj4U7cqWG33ycO0JVyW/+cW3JhdY0VXzqEkSWXpkcFb5Sc+VoKuOOrki4J0clqZErk0dHN3JFqbj6zQu/SrkjPUFsR9UE2b5ib2eoqYwr9VxdKXfDX6V822uiNRIAkACvUg44rlM/bm9nmm2NVNCNHtVMG7oY00eWvlK0IT8uPm4p/3HXRHKh00Ns26bZcW8vpqrkE0t/85UKoagE/XFfK/W4EtVsKQX5xFGpKh337W2MO0JVxVr2ZkuX14w7S+jhBgYFBheAAp4lSFMTyV3WqthWqJ9PlwgmAGYTiQo1Zi5cSUcnOBoEX3ev5YUMcVnvUrgx5HaCOLWhPcddUjOGZmX2yZFNAyB+ELmdEtsBPE17UsXU4fTV1jdNHpPl8KiAkC34tsZqWhxaa3RlIgn25jJkslDF+VBC8cW5mikplMUF0g==
```## Docker image
multi-arch container images with tags `libcurl,crappy,plugins` are automatically built by [Github Actions](https://github.com/batmac/ccat/actions/workflows/docker-images.yml) and made available on [Dockerhub](https://hub.docker.com/r/batmac/ccat) and [Github Packages](https://github.com/batmac/ccat/pkgs/container/ccat).
for instance:```shell
$ docker run --rm ghcr.io/batmac/ccat:latest -h
...
```or
```shell
$ kubectl run -i --tty ccat --image=batmac/ccat:latest -- /bin/sh
...
```## help