Smart Tree is a directory visualization and AI context tool built with Rust, positioned as a "context-aware" replacement for the traditional tree command. It emphasizes performance and AI-friendliness, and is officially claimed to be 10-24 times faster than traditional tree.
Purpose and Positioning
Smart Tree is mainly used to quickly view and understand directory structures and to provide AI assistants with token-efficient codebase context. It offers multiple output modes such as classic tree view, AI-optimized compressed format, quantum compression (quantum), Markdown, JSON/CSV/TSV, and Mermaid, and is suitable for scenarios where codebase information is compressed and placed into an LLM context window.
Main Capabilities
- Multiple output formats: classic (classic tree view), ai (compression for LLM context), quantum (maximum compression using wave functions), markdown, JSON/CSV/TSV, mermaid flowcharts.
- Advanced capabilities: regex content search across files, inline Git repository status, streaming mode for handling massive numbers of files, MCP server, cross-session memory system.
- 30+ MCP tools: such as quick_tree (directory overview), project_overview (compressed project information), analyze_directory (multi-mode analysis), search_in_files, find_files, find_code_files, etc. It is officially claimed to achieve a 70-90% reduction in token usage, with the quantum compression format reaching up to 100:1 compression.
- Memory and consciousness: tools such as anchor_collaborative_memory, find_collaborative_memories, consciousness, and mega_session are used to save and retrieve cross-session insights, decisions, patterns, caveats, and to-dos, and to maintain session continuity through the .aye_consciousness.m8 file.
- Spicy TUI mode: interactive file browser, supporting / fuzzy search for file names, Ctrl+F search of file contents, tree navigation (h/l collapse and expand), syntax highlighting, image-to-ASCII (requires artem), hidden file toggle, etc.
- Web dashboard: provides a real PTY terminal, file browser, Markdown preview, by default limited to localhost only, and remote access can be opened with --allow; it also supports remote AI popping up interactive questions to the user.
- ST Daemon: a resident daemon std, providing a binary protocol, shared memory, Unix socket (/run/user/$UID/st.sock), and HTTP port 28428 (SSE), used to persist context and directory indexes between CLI calls; it supports memory verbs such as REMEMBER, RECALL, FORGET, and M8_WAVE.
- Security scanner: used to audit MCP integrations and detect supply chain attacks, such as IPFS/IPNS gateways, forged cryptographic verification, automatically executed hooks (PreToolUse, PostToolUse, SessionStart, UserPromptSubmit), volatile npm tags (@alpha, @latest, etc.), and several known malicious packages. It can scan certificate report subjects, issuers, serial numbers, SHA-256 fingerprints, validity periods, alternative names, and file offsets, but does not verify signatures, trust chains, or revocation status.
Usage
After installation, run st --cleanup to scan and remove malicious AI integrations. It provides an interactive menu, including options such as Basic Tree View, Spicy TUI, Terminal Interface, Web Dashboard, HTTP Daemon, MCP Server, Custom Command, etc. An official MCP auto-installer is provided, which can automatically locate the Claude Desktop configuration, create a timestamped backup, and write the Smart Tree MCP server into claude_desktop_config.json while preserving existing MCP servers. Basic commands include st --version, as well as the parameters for each output mode. Smart Tree can also serve as a Claude Code hook, automatically injecting directory context, MEM8 memory search, and Git status when a path is detected. All operations can be logged in JSONL format for transparency, debugging, and auditing.
Use Cases
Suitable for developers and teams who need to quickly understand large codebases within AI assistant sessions, compress context tokens, retain memory across sessions, and want to audit the security of MCP integrations. It is also suitable for interactive file browsing and searching scenarios in the terminal.
Limitations
The official text does not provide complete details on pricing, licensing agreements, or supported platform versions (beyond the Windows, macOS, and Linux/WSL listed under installation methods), nor specific performance testing methods and data sources; these facts are not currently available. The security scanner's certificate scanning does not verify signatures, trust chains, or revocation status, and may not cover all supply chain attacks. Some features (such as image-to-ASCII conversion) depend on the additional tool artem.