st.1•12.6 kB
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.TH st 1 "st "
.SH NAME
st \- Smart Tree \- An intelligent directory visualization tool. Not just a tree, it\*(Aqs a smart\-tree!
.SH SYNOPSIS
\fBst\fR [\fB\-\-cheet\fR] [\fB\-\-completions\fR] [\fB\-\-man\fR] [\fB\-\-mcp\fR] [\fB\-\-mcp\-tools\fR] [\fB\-\-mcp\-config\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fB\-\-terminal\fR] [\fB\-\-rename\-project\fR] [\fB\-\-input\fR] [\fB\-m\fR|\fB\-\-mode\fR] [\fB\-\-find\fR] [\fB\-\-type\fR] [\fB\-\-entry\-type\fR] [\fB\-\-min\-size\fR] [\fB\-\-max\-size\fR] [\fB\-\-newer\-than\fR] [\fB\-\-older\-than\fR] [\fB\-d\fR|\fB\-\-depth\fR] [\fB\-\-no\-ignore\fR] [\fB\-\-no\-default\-ignore\fR] [\fB\-a\fR|\fB\-\-all\fR] [\fB\-\-show\-ignored\fR] [\fB\-\-everything\fR] [\fB\-\-show\-filesystems\fR] [\fB\-\-no\-emoji\fR] [\fB\-z\fR|\fB\-\-compress\fR] [\fB\-\-mcp\-optimize\fR] [\fB\-\-compact\fR] [\fB\-\-path\-mode\fR] [\fB\-\-color\fR] [\fB\-\-ai\-json\fR] [\fB\-\-stream\fR] [\fB\-\-sse\-server\fR] [\fB\-\-sse\-port\fR] [\fB\-\-search\fR] [\fB\-\-semantic\fR] [\fB\-\-mermaid\-style\fR] [\fB\-\-no\-markdown\-mermaid\fR] [\fB\-\-no\-markdown\-tables\fR] [\fB\-\-no\-markdown\-pie\-charts\fR] [\fB\-\-focus\fR] [\fB\-\-relations\-filter\fR] [\fB\-\-sort\fR] [\fB\-\-top\fR] [\fB\-\-show\-private\fR] [\fB\-\-view\-diffs\fR] [\fB\-\-cleanup\-diffs\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIPATH\fR]
.SH DESCRIPTION
Smart Tree \- An intelligent directory visualization tool. Not just a tree, it\*(Aqs a smart\-tree!
.SH OPTIONS
.TP
\fB\-\-cheet\fR
Show the cheatsheet
.TP
\fB\-\-completions\fR=\fISHELL\fR
Generate shell completion scripts
.br
.br
[\fIpossible values: \fRbash, elvish, fish, powershell, zsh]
.TP
\fB\-\-man\fR
Generate the man page
.TP
\fB\-\-mcp\fR
Run `st` as an MCP (Model Context Protocol) server
.TP
\fB\-\-mcp\-tools\fR
List the tools `st` provides when running as an MCP server
.TP
\fB\-\-mcp\-config\fR
Show the configuration snippet for the MCP server
.TP
\fB\-V\fR, \fB\-\-version\fR
Show version information and check for updates
.TP
\fB\-\-terminal\fR
Launch Smart Tree Terminal Interface (STTI) \- Your coding companion! This starts an interactive terminal that anticipates your needs
.TP
\fB\-\-rename\-project\fR=\fIOLD NEW\fR
Rename project \- elegant identity transition (format: "OldName" "NewName")
.TP
\fB\-\-input\fR=\fITYPE\fR
Specify input type explicitly (filesystem, qcp, sse, openapi, mem8)
.TP
\fB\-m\fR, \fB\-\-mode\fR=\fIMODE\fR [default: auto]
Choose your adventure! Selects the output format. From classic human\-readable to AI\-optimized hex, we\*(Aqve got options
.br
.br
\fIPossible values:\fR
.RS 14
.IP \(bu 2
auto: Auto mode \- smart default selection based on context
.IP \(bu 2
classic: Classic tree format, human\-readable with metadata and emojis (unless disabled). Our beloved default
.IP \(bu 2
hex: Hexadecimal format with fixed\-width fields. Excellent for AI parsing or detailed analysis
.IP \(bu 2
json: JSON output. Structured data for easy programmatic use
.IP \(bu 2
ls: Unix ls \-Alh format. Familiar directory listing with human\-readable sizes and permissions
.IP \(bu 2
ai: AI\-optimized format. A special blend of hex tree and statistics, designed for LLMs
.IP \(bu 2
stats: Directory statistics only. Get a summary without the full tree
.IP \(bu 2
csv: CSV (Comma Separated Values) format. Spreadsheet\-friendly
.IP \(bu 2
tsv: TSV (Tab Separated Values) format. Another spreadsheet favorite
.IP \(bu 2
digest: Super compact digest format. A single line with a hash and minimal stats, perfect for quick AI pre\-checks
.IP \(bu 2
quantum: MEM|8 Quantum format. The ultimate compression with bitfield headers and tokenization
.IP \(bu 2
semantic: Semantic grouping format. Groups files by conceptual similarity (inspired by Omni!)
.IP \(bu 2
mermaid: Mermaid diagram format. Perfect for embedding in documentation!
.IP \(bu 2
markdown: Markdown report format. Combines mermaid, tables, and charts for beautiful documentation!
.IP \(bu 2
summary: Interactive summary mode (default for humans in terminal)
.IP \(bu 2
summary\-ai: AI\-optimized summary mode (default for AI/piped output)
.IP \(bu 2
relations: Code relationship analysis
.IP \(bu 2
quantum\-semantic: Quantum compression with semantic understanding (Omni\*(Aqs nuclear option!)
.IP \(bu 2
waste: Waste detection and optimization analysis (Marie Kondo mode!)
.IP \(bu 2
marqant: Marqant \- Quantum\-compressed markdown format (.mq)
.IP \(bu 2
sse: SSE \- Server\-Sent Events streaming format for real\-time monitoring
.IP \(bu 2
function\-markdown: Function documentation in markdown format \- living blueprints of your code!
.RE
.TP
\fB\-\-find\fR=\fIFIND\fR
Feeling like a detective? Find files/directories matching this regex pattern. Example: \-\-find "README\\\\.md"
.TP
\fB\-\-type\fR=\fIFILTER_TYPE\fR
Filter by file extension. Show only files of this type (e.g., "rs", "txt"). No leading dot needed, just the extension itself
.TP
\fB\-\-entry\-type\fR=\fIENTRY_TYPE\fR
Filter to show only files (f) or directories (d)
.br
.br
[\fIpossible values: \fRf, d]
.TP
\fB\-\-min\-size\fR=\fIMIN_SIZE\fR
Only show files larger than this size. Accepts human\-readable sizes like "1M" (1 Megabyte), "500K" (500 Kilobytes), "100B" (100 Bytes)
.TP
\fB\-\-max\-size\fR=\fIMAX_SIZE\fR
Only show files smaller than this size. Same format as \-\-min\-size. Let\*(Aqs find those tiny files!
.TP
\fB\-\-newer\-than\fR=\fINEWER_THAN\fR
Time traveler? Show files newer than this date (YYYY\-MM\-DD format)
.TP
\fB\-\-older\-than\fR=\fIOLDER_THAN\fR
Or perhaps you prefer antiques? Show files older than this date (YYYY\-MM\-DD format)
.TP
\fB\-d\fR, \fB\-\-depth\fR=\fIDEPTH\fR [default: 0]
How deep should we dig? Limits the traversal depth. Default is 0 (auto) which lets each mode pick its ideal depth. Set explicitly to override: 1 for shallow, 10 for deep exploration
.TP
\fB\-\-no\-ignore\fR
Daredevil mode: Ignores `.gitignore` files. See everything, even what Git tries to hide!
.TP
\fB\-\-no\-default\-ignore\fR
Double daredevil: Ignores our built\-in default ignore patterns too (like `node_modules`, `__pycache__`). Use with caution, or you might see more than you bargained for!
.TP
\fB\-a\fR, \fB\-\-all\fR
Show all files, including hidden ones (those starting with a `.`). The `\-a` is for "all", naturally
.TP
\fB\-\-show\-ignored\fR
Want to see what\*(Aqs being ignored? This flag shows ignored directories in brackets `[dirname]`. Useful for debugging your ignore patterns or just satisfying curiosity
.TP
\fB\-\-everything\fR
SHOW ME EVERYTHING! The nuclear option that combines \-\-all, \-\-no\-ignore, and \-\-no\-default\-ignore. This reveals absolutely everything: hidden files, git directories, node_modules, the works! Warning: May produce overwhelming output in large codebases
.TP
\fB\-\-show\-filesystems\fR
Show filesystem type indicators in output (e.g., X=XFS, 4=ext4, B=Btrfs). Each file/directory gets a single character showing what filesystem it\*(Aqs on. Great for understanding storage layout and mount points!
.TP
\fB\-\-no\-emoji\fR
Not a fan of emojis? This flag disables them for a plain text experience. (But Trish loves the emojis, just saying!) 🌳✨
.TP
\fB\-z\fR, \fB\-\-compress\fR
Compress the output using zlib. Great for sending large tree structures over the wire or for AI models that appreciate smaller inputs. Output will be base64 encoded
.TP
\fB\-\-mcp\-optimize\fR
MCP/API optimization mode. Automatically enables compression, disables colors/emoji, and optimizes output for machine consumption. Perfect for MCP servers, LLM APIs, and tools. Works with any output mode to make it API\-friendly!
.TP
\fB\-\-compact\fR
For JSON output, this makes it compact (one line) instead of pretty\-printed. Saves space, but might make Trish\*(Aqs eyes water if she tries to read it directly
.TP
\fB\-\-path\-mode\fR=\fIPATH_MODE\fR [default: off]
Controls how file paths are displayed in the output
.br
.br
\fIPossible values:\fR
.RS 14
.IP \(bu 2
off: Show only filenames (default). Clean and simple
.IP \(bu 2
relative: Show paths relative to the scan root. Good for context within the project
.IP \(bu 2
full: Show full absolute paths. Leaves no doubt where things are
.RE
.TP
\fB\-\-color\fR=\fICOLOR\fR [default: auto]
When should we splash some color on the output? `auto` (default) uses colors if outputting to a terminal
.br
.br
\fIPossible values:\fR
.RS 14
.IP \(bu 2
always: Always use colors, no matter what. Go vibrant!
.IP \(bu 2
never: Never use colors. For the minimalists
.IP \(bu 2
auto: Use colors if the output is a terminal (tty), otherwise disable. This is the default smart behavior
.RE
.TP
\fB\-\-ai\-json\fR
For AI mode, wraps the output in a JSON structure. Makes it easier for programmatic consumption by our AI overlords (just kidding... mostly)
.TP
\fB\-\-stream\fR
Stream output as files are scanned. This is a game\-changer for very large directories! You\*(Aqll see results trickling in, rather than waiting for the whole scan to finish. Note: Compression is disabled in stream mode for now
.TP
\fB\-\-sse\-server\fR
Start SSE server mode for real\-time directory monitoring (experimental). This starts an HTTP server that streams directory changes as Server\-Sent Events. Example: st \-\-sse\-server \-\-sse\-port 8420 /path/to/watch
.TP
\fB\-\-sse\-port\fR=\fISSE_PORT\fR [default: 8420]
Port for SSE server mode (default: 8420)
.TP
\fB\-\-search\fR=\fISEARCH\fR
Search for a keyword within file contents. Best used with `\-\-type` to limit search to specific file types (e.g., `\-\-type rs \-\-search "TODO"`). This is like having X\-ray vision for your files!
.TP
\fB\-\-semantic\fR
Group files by semantic similarity (inspired by Omni\*(Aqs wisdom!). Uses content\-aware tokenization to identify conceptually related files. Perfect for understanding project structure at a higher level. Example groups: "tests", "documentation", "configuration", "source code"
.TP
\fB\-\-mermaid\-style\fR=\fIMERMAID_STYLE\fR [default: flowchart]
Mermaid diagram style (only used with \-\-mode mermaid). Options: flowchart (default), mindmap, gitgraph
.br
.br
\fIPossible values:\fR
.RS 14
.IP \(bu 2
flowchart: Traditional flowchart (default)
.IP \(bu 2
mindmap: Mind map style
.IP \(bu 2
gitgraph: Git graph style
.IP \(bu 2
treemap: Treemap style (shows file sizes visually)
.RE
.TP
\fB\-\-no\-markdown\-mermaid\fR
Exclude mermaid diagrams from markdown report (only used with \-\-mode markdown)
.TP
\fB\-\-no\-markdown\-tables\fR
Exclude tables from markdown report (only used with \-\-mode markdown)
.TP
\fB\-\-no\-markdown\-pie\-charts\fR
Exclude pie charts from markdown report (only used with \-\-mode markdown)
.TP
\fB\-\-focus\fR=\fIFILE\fR
Focus analysis on specific file (for relations mode). Shows all relationships for a particular file
.TP
\fB\-\-relations\-filter\fR=\fITYPE\fR
Filter relationships by type (for relations mode). Options: imports, calls, types, tests, coupled
.TP
\fB\-\-sort\fR=\fISORT\fR
Sort results by: a\-to\-z, z\-to\-a, largest, smallest, newest, oldest, type Examples: \-\-sort largest (biggest files first), \-\-sort newest (recent files first) Use with \-\-top to get "top 10 largest files" or "20 newest files"
.br
.br
\fIPossible values:\fR
.RS 14
.IP \(bu 2
a\-to\-z: Sort alphabetically A to Z
.IP \(bu 2
z\-to\-a: Sort alphabetically Z to A
.IP \(bu 2
largest: Sort by size, largest files first
.IP \(bu 2
smallest: Sort by size, smallest files first
.IP \(bu 2
newest: Sort by modification date, newest first
.IP \(bu 2
oldest: Sort by modification date, oldest first
.IP \(bu 2
type: Sort by file type/extension
.IP \(bu 2
name: Legacy aliases for backward compatibility
.IP \(bu 2
size
.IP \(bu 2
date
.RE
.TP
\fB\-\-top\fR=\fIN\fR
Show only the top N results (useful with \-\-sort) Examples: \-\-sort size \-\-top 10 (10 largest files) \-\-sort date \-\-top 20 (20 most recent files)
.TP
\fB\-\-show\-private\fR
Include private functions in function documentation (for function\-markdown mode) By default, only public functions are shown
.TP
\fB\-\-view\-diffs\fR
View diffs stored in the .st folder (Smart Edit history) Shows all diffs for files modified by Smart Edit operations
.TP
\fB\-\-cleanup\-diffs\fR=\fIN\fR
Clean up old diffs in .st folder, keeping only last N per file Example: \-\-cleanup\-diffs 5 (keep last 5 diffs per file)
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help (see a summary with \*(Aq\-h\*(Aq)
.TP
[\fIPATH\fR]
Path to the directory or file you want to analyze. Can also be a URL (http://), QCP query (qcp://), SSE stream, or MEM8 stream (mem8://)
.SH AUTHORS
8bit\-wraith, Claude, Omni, 8b\-is Team