Skip to content

bglgwyng/zat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

162 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zat

zat is a code outline viewer. It shows exported symbols and line numbers at a glance.

Works great as a tool for LLM coding agents — they can see the outline first, then Read only the parts they need.

The name comes from Japanese ざっと (zatto), meaning "roughly" or "at a glance".

Installation

Homebrew

brew install bglgwyng/tap/zat

Nix

nix profile install github:bglgwyng/zat

Or run directly:

nix run github:bglgwyng/zat -- <FILE>

Also available via llm-agents.nix.

Cargo

cargo install --git https://github.com/bglgwyng/zat

Pre-built binaries

Download from GitHub Releases. Available for macOS (aarch64, x86_64) and Linux (x86_64).

Usage

File outline

zat src/lib.rs
struct OutlineEntry { // L8-L12
  signature: String
  start_line: usize
  end_line: usize
}
struct ImportEntry { // L14-L18
  source_text: String
  start_line: usize
  end_line: usize
}
fn extract_outline(source: & str, path: & str) -> OutlineResult // L33-L196

Only public/exported symbols are shown. Visibility modifiers (pub, export) are stripped for brevity. Struct fields, enum variants, and interface members are included.

Supported Languages

Language Extensions
JavaScript .js, .jsx, .cjs, .mjs
TypeScript .ts, .tsx, .mts, .cts
Rust .rs
Python .py
Go .go
Java .java
C .c, .h
C++ .cpp, .cc, .cxx, .hpp, .hxx
C# .cs
Swift .swift
Kotlin .kt, .kts
Haskell .hs
Ruby .rb

All languages are parsed with tree-sitter.

For AI Agents

Add this to your CLAUDE.md or AGENTS.md:

## Tools

### zat

A code outline viewer that shows exported symbol signatures with line numbers.

Prefer `zat` over `cat`/`Read` when you need signatures, not full implementation. Use the line numbers in the output to `Read(offset, limit)` into specific sections.

Supported languages: C, C++, C#, Go, Haskell, Java, JavaScript, Kotlin, Markdown, Python, Ruby, Rust, Swift, TypeScript/TSX

`zat` exits with code 1 for unsupported languages.

About

zatto files and directories

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors