GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - koki-develop/gat: 🐱 cat alternative written in Go.

BranchesTags
Open more actions menu

Latest commit

 

History

587 Commits
587 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
assets
assets
 
 
cmd
cmd
 
 
docs
docs
 
 
internal
internal
 
 
scripts
scripts
 
 
tapes
tapes
 
 
.gitignore
.gitignore
 
 
.goreleaser.yaml
.goreleaser.yaml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CLAUDE.md
CLAUDE.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
main.go
main.go
 
 
mise.toml
mise.toml
 
 
renovate.json
renovate.json
 
 

Repository files navigation

cat alternative written in Go.

GitHub release (latest by date) GitHub all releases GitHub Workflow Status LICENSE

Contents

  • Installation
  • Usage
  • LICENSE

Installation

Homebrew Tap (Recommended)

$ brew install koki-develop/tap/gat

Homebrew

$ brew install gat

go install

$ go install github.com/koki-develop/gat@latest

Releases

Download the binary from the releases page.

Usage

$ gat --help
cat alternative written in Go.

Usage:
  gat [file]... [flags]

Flags:
  -b, --force-binary       force binary output
  -c, --force-color        force colored output
  -f, --format string      output format (default "terminal256")
  -h, --help               help for gat
  -l, --lang string        language for syntax highlighting
      --list-formats       print a list of supported output formats
      --list-langs         print a list of supported languages for syntax highlighting
      --list-themes        print a list of supported themes with preview
      --mask-secrets       mask sensitive information (API keys, tokens)
      --no-resize          do not resize images
  -p, --pretty             whether to format a content pretty
  -M, --render-markdown    render markdown
  -A, --show-all           equivalent to -vET
  -E, --show-ends          display $ at end of each line
  -v, --show-nonprinting   use ^ and M- notation, except for LFD and TAB
  -T, --show-tabs          display TAB characters as ^I
  -t, --theme string       highlight theme (default "monokai")
      --version            version for gat

-l, --lang

Explicitly set the language for syntax highlighting.
See languages.md for valid languages.

-f, --format

Set the output format ( default: terminal256 ).
Alternatively, it can be set using the GAT_FORMAT environment variable. See formats.md for valid formats.

-t, --theme

Set the highlight theme ( default: monokai ).
Alternatively, it can be set using the GAT_THEME environment variable. See themes.md for valid themes.

-p, --pretty

Format a content pretty. For unsupported languages, this flag is ignored.

--mask-secrets

Mask sensitive information such as API keys and tokens. Matched patterns are replaced with * characters of the same length.

$ echo 'AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE' | gat --mask-secrets
AWS_ACCESS_KEY_ID=********************

Patterns come from mask-go, which covers:

  • Anthropic API Keys
  • AWS Access Key IDs / Secret Access Keys
  • Cloudflare API Tokens / API Keys
  • GitHub Tokens
  • GitLab Tokens
  • Google API Keys
  • Grafana Service Account Tokens
  • HashiCorp Vault Tokens
  • JSON Web Tokens
  • Linear API Keys
  • Notion API Tokens
  • npm Access Tokens
  • OpenAI API Keys
  • OpenRouter API Keys
  • Private Keys
  • PyPI API Tokens
  • RubyGems API Keys
  • SendGrid API Keys
  • Sentry Auth Tokens
  • Slack Tokens
  • Stripe API Keys / Webhook Signing Secrets
  • Supabase Access Tokens

-v, --show-nonprinting

Display non-printing characters using ^ and M- notation, except for LFD (line feed) and TAB. This is equivalent to cat -v.

$ printf 'hello\x01world\n' | gat -v
hello^Aworld

-E, --show-ends

Display $ at the end of each line. This is equivalent to cat -E.

$ echo 'hello' | gat -E
hello$

-T, --show-tabs

Display TAB characters as ^I. This is equivalent to cat -T.

$ printf 'hello\tworld\n' | gat -T
hello^Iworld

-A, --show-all

Equivalent to -vET. Display non-printing characters, line endings, and tabs. This is equivalent to cat -A.

-M, --render-markdown

Render markdown documents.

-c, --force-color

gat disables colored output when piped to another program.
Settings the --force-color forces colored output to be enabled.
This is useful, for example, when used in combination with the less -R command.

It is also useful to declare the following function to allow gat to be used with a pager.

function gess() {
  gat --force-color "$@" | less -R
}

Print Image

If your terminal supports Sixel, you can print images.

Supported image formats include:

  • JPEG
  • PNG
  • GIF (animation not supported)

☕ Buy me a coffee

If you like this project, please consider buying me a coffee.

Buy Me A Coffee

LICENSE

MIT

About

🐱 cat alternative written in Go.

Topics

cligolangterminal

Resources

Readme
MIT license
Activity

Stars

237 stars

Watchers

1 watching

Forks

8 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.