tlk

Crates.iotlk
lib.rstlk
version0.3.0
created_at2026-01-24 15:48:27.072975+00
updated_at2026-01-24 17:41:20.072294+00
descriptionProduction-ready file search and content analysis tool with compressed CLI flags
homepagehttps://github.com/truth-linked/tl
repositoryhttps://github.com/truth-linked/tl
max_upload_size
id2066904
size124,248
Truthlinked (truth-linked)

documentation

https://github.com/truth-linked/tl

README

TruthLinked File Tools (tl)

A production-ready file search and content analysis tool that combines file discovery and content searching with compressed, non-redundant command-line flags.

OVERVIEW

TL provides unified file and content search capabilities through a single binary. The tool emphasizes efficiency through compressed flag design, eliminating redundant options while maintaining full functionality.

Key characteristics:

  • File search equivalent to find with enhanced performance
  • Content search equivalent to grep with additional features
  • Compressed flag system reducing command complexity
  • Production-ready with comprehensive error handling

INSTALLATION

From crates.io: cargo install tlk

From source: git clone https://github.com/truth-linked/tl.git cd tl cargo build --release sudo cp target/release/tl /usr/local/bin/

BASIC USAGE

File search: tl "*.rs" /path/to/search

Content search: tl --content "function" /path/to/search

REGEX USAGE

Filename regex (--regex applies to filename patterns): tl --regex "..rs$" /path/to/search # Find .rs files tl --regex "test." /path/to/search # Files starting with "test"

Content regex (--regex + --content enables regex in content): tl --content "fn\s+\w+" --regex /path # Regex in file content tl --content "use std::" --regex /path # Find std imports

Fixed string content search (default, faster): tl --content "exact text" /path # Literal string search

Combined operations: tl --content "TODO" --output count . tl --time "modified:2024-01-01" .

COMPRESSED FLAG SYSTEM

Time filtering (consolidated from 4 separate flags): tl --time "modified:2024-01-01" # files modified after date tl --time "accessed:2024-01-15" # files accessed after date
tl --time "changed:2024-01-20" # files changed after date tl --time "newer:file.txt" # files newer than reference

Context lines (consolidated from 3 separate flags): tl --context 3 # 3 lines before and after tl --context "2:5" # 2 before, 5 after

Output modes (consolidated from 4 separate flags): tl --output files # filenames with matches only tl --output no-files # filenames without matches only tl --output count # count only tl --output long # detailed format

Quiet levels (consolidated from 2 separate flags): tl --quiet 0 # normal output tl --quiet 1 # suppress errors tl --quiet 2 # silent operation

Directory skipping (consolidated from 2 separate flags): tl --skip "node_modules,target" # skip specified directories tl --skip "" # search all directories

COMPLETE FEATURE SET

File search capabilities: --regex Pattern matching with regular expressions --glob Shell-style pattern matching --ignore-case Case-insensitive matching --size Size filtering ("+1M", "-500K") --time Time-based filtering (compressed) --perm Permission filtering --user Owner filtering --group Group filtering --entry-type Type filtering (file, directory, symlink) --max-depth Maximum directory depth --min-depth Minimum directory depth --one-filesystem Stay within filesystem boundaries --follow-links Follow symbolic links --empty Find empty files/directories --multiple-links Find files with multiple hard links --skip Directory exclusion (compressed)

Content search capabilities: --content Content pattern matching --fixed-strings Literal string matching --word-regexp Word boundary matching --line-regexp Full line matching --line-number Display line numbers --byte-offset Display byte offsets --only-matching Show matching portions only --context Context lines (compressed) --invert-match Invert matching logic --max-count Limit matches per file --output Output format control (compressed)

System control: --jobs Thread count control --quiet Output suppression (compressed) --null Null-separated output --text Force text processing --exec Execute commands on matches --delete Remove matched files --gitignore Respect .gitignore files --debug Enable diagnostic output

PRACTICAL EXAMPLES

Development workflow: tl --content "TODO" --context 2 --output files src/ tl --content "error" --output count logs/ tl --size "+10M" --time "modified:2024-01-20" . tl --exec "wc -l {}" "*.rs" src/

System administration: tl "*.log" /var/log --size "+10M" --time "modified:2024-01-15" tl --entry-type file --size "+100M" target/ --delete --quiet 1 tl --content "license" --output no-files --types "rs" src/

PERFORMANCE CHARACTERISTICS

The tool implements several optimization strategies:

  • Multi-threaded directory traversal
  • Memory-mapped file reading for large files
  • Streaming output for immediate results
  • Graceful pipe handling without crashes
  • Automatic binary file detection and skipping

CONFIGURATION

Environment variables: TL_DEBUG=1 Enable debug output

Recommended shell aliases: alias search='tl --content' alias findfile='tl --glob' alias findbig='tl --size "+100M"' alias count='tl --output count' alias silent='tl --quiet 2'

BUILD REQUIREMENTS

  • Rust 1.70 or later
  • Standard system libraries
  • No external dependencies for basic functionality

PRODUCTION STATUS

TL has undergone comprehensive testing including:

  • Verification of all 40+ command-line flags
  • Testing against real-world codebases
  • Edge case and error condition handling
  • Performance validation on large directory structures
  • Compressed flag system validation

The tool is considered production-ready and suitable for deployment in professional environments.

LICENSE

MIT License

DEVELOPMENT

The codebase is feature-complete and production-ready. Contributions are welcome for:

  • Performance optimizations
  • Platform-specific enhancements
  • Documentation improvements
  • Bug reports and fixes

Repository: https://github.com/truth-linked/tl

TruthLinked File Tools provides comprehensive file search and content analysis capabilities through a unified, efficient interface designed for professional use.

Commit count: 10

cargo fmt