All apps/bat

bat

bat

A cat(1) clone with syntax highlighting and Git integration.

Runs as bat, batcat|macOS, Linux, Windows|github.com

Command form

ai-draft · 2 tasks · 11 fields

Print files with syntax highlighting, line numbers and Git markers. Theme and syntax listing, custom mappings and diagnostics are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui bat
View filesExample values, fixed in this page — nothing here reaches a terminal
Basic
Files*
file
Language
string
Line range
string
Highlight lines
string
TasksEach one presets the form for one job
View a file
fileslanguageline_rangehighlight_line
Print without pager
filespagingplain
ParametersOnly these flags are editable in the form
Files
Leave empty to read standard input.
path · positional 0 · repeatable
Language
Force a syntax for highlighting, for example json or rust.
string
--language-l
Line numbers only
boolean
--number-n
Plain output
No decorations.
boolean
--plain-p
Line range
Only print these lines, for example 10:20.
string
--line-range-r
Highlight lines
Highlight a line or range, for example 5:8.
string
--highlight-line-H
Show Git changes
boolean
--diff-d
Show non-printable characters
boolean
--show-all-A
Theme
string
--theme
Paging
enum
--pagingautoalwaysnever
Tab width
integer
--tabs
SourcesEvery flag above is checked against these
fig
completion

github.com

Before it fills your prompt, Otty checks the installed bat against its version. A form that does not match your version is not offered.