gilchrist is your essential multi-command utility suite that brings the power of Unix/Linux command-line tools directly to Windows environments. While Windows users struggle with limited native text processing and file management capabilities, gilchrist provides familiar wc
, find
, and rm
commands with full feature parity to their Unix counterparts.
Whether you're counting lines in log files, searching through directory hierarchies, or safely removing files and directories, gilchrist delivers consistent Unix-like behavior optimized for Windows workflows. No more wrestling with PowerShell's verbose syntax or missing your favorite Linux tools - get the familiar command experience you know and love.
- Windows 7.0 or later
- No additional dependencies required
- Single portable executable
- Golang ( if you want to build from source )
- Git clone this repo
git clone https://github.com/gigachad80/Gilchrist
cd Gilchrist
- Now build Go executable :
go build -o gilchrist.exe
- Run Powershell ISE as administrator and Go to the direcctory where you have cloned the repo then run this command :
.\install-gilchrist.ps1
-
Go to releases section and download the exe file as per your architecture.
-
Now , Run Powershell ISE as administrator and Go to the direcctory where you have cloned the repo then run this command .
.\install-gilchrist.ps1
- β
wc
- Word, line, character, and byte counting (GNU wc compatible) - β
find
- File and directory search with powerful filtering - β
rm
- Safe file and directory removal with confirmation options
- β Windows native - Works in Command Prompt and PowerShell
- β Unix compatibility - Familiar syntax and behavior
- β Stdin support - Seamless pipe integration
- β Error handling - Robust error reporting and recovery
- β Help system - Built-in help for all commands
Count lines, words, characters, and bytes in files or stdin input.
gilchrist wc [OPTIONS] [FILE...]
Option | Description |
---|---|
-l |
Print newline counts |
-w |
Print word counts |
-c |
Print byte counts |
-m |
Print character counts |
-L |
Print maximum line length (character count) |
-h |
Display help |
When no options are specified, wc
shows lines, words, and bytes (equivalent to -l -w -c
).
# Count lines, words, and bytes (default)
gilchrist wc file.txt
150 842 5234 file.txt
# Count only lines
gilchrist wc -l *.txt
150 file1.txt
200 file2.txt
350 total
# Count characters (Unicode-aware)
gilchrist wc -m unicode.txt
1250 unicode.txt
# Find longest line
gilchrist wc -L code.js
89 code.js
# Process from stdin
type largefile.txt | gilchrist wc -l
5000
# Multiple files with totals
gilchrist wc -lwc *.log
100 500 2500 app.log
250 1200 6000 error.log
350 1700 8500 total
# Combined flags
gilchrist wc -lwcmL report.txt
42 156 892 856 78 report.txt
Search for files and directories with powerful filtering and action capabilities.
gilchrist find [PATH...] [EXPRESSION...]
Option | Description |
---|---|
-name <pattern> |
File name pattern (glob, case-sensitive) |
-iname <pattern> |
File name pattern (glob, case-insensitive) |
-type <f|d> |
File type: 'f' for files, 'd' for directories |
-delete |
Delete found files/directories (USE WITH CAUTION!) |
-maxdepth <n> |
Maximum directory descent level |
-mindepth <n> |
Minimum directory descent level |
-h |
Display help |
*
- Matches any sequence of characters?
- Matches any single character[abc]
- Matches any character in brackets- Case sensitivity controlled by
-name
vs-iname
# Find all .txt files in current directory and subdirectories
gilchrist find . -name "*.txt"
./documents/readme.txt
./logs/debug.txt
./temp/backup.txt
# Find directories case-insensitively
gilchrist find C:\Users -iname "*temp*" -type d
C:\Users\Admin\AppData\Local\Temp
C:\Users\Admin\Documents\Templates
# Limit search depth
gilchrist find . -maxdepth 2 -name "*.log"
./app.log
./logs/error.log
# Find and delete (DANGEROUS - use with care!)
gilchrist find ./temp -name "*.tmp" -delete
gilchrist find: deleted ./temp/cache.tmp
gilchrist find: deleted ./temp/session.tmp
# Find files not in immediate directory
gilchrist find . -mindepth 2 -name "*.js"
./src/components/app.js
./src/utils/helper.js
# Complex search: JavaScript files in src, max 3 levels deep
gilchrist find ./src -maxdepth 3 -iname "*.js" -type f
./src/index.js
./src/components/Header.js
./src/utils/api.js
# Find empty directories (no pattern matches everything)
gilchrist find . -type d -maxdepth 1
./
./empty_folder
./src
Remove files and directories with safety features and confirmation options.
gilchrist rm [OPTIONS] FILE...
Option | Description |
---|---|
-r , -R |
Remove directories recursively |
-f |
Force removal, ignore nonexistent files |
-i |
Interactive mode - prompt before removal |
-v |
Verbose mode - explain what's being done |
-h |
Display help |
- Directory protection: Won't remove directories without
-r
- Interactive confirmation:
-i
flag prompts for each removal - Non-destructive by default: Fails safely on errors
- Force override:
-f
suppresses most errors and prompts
# Remove a single file
gilchrist rm oldfile.txt
# (silently removes if successful)
# Remove with confirmation
gilchrist rm -i important.txt
gilchrist rm: remove 'important.txt'? y
removed 'important.txt'
# Remove directory recursively
gilchrist rm -r old_project/
# (removes entire directory tree)
# Verbose removal
gilchrist rm -v *.tmp
removed 'cache.tmp'
removed 'session.tmp'
removed 'backup.tmp'
# Force removal (ignore errors)
gilchrist rm -f nonexistent.txt
# (no error message, continues)
# Interactive recursive removal
gilchrist rm -ri temp_folder/
gilchrist rm: remove directory 'temp_folder/'? y
# (removes after confirmation)
# Combined flags - force recursive verbose
gilchrist rm -rfv old_logs/
removed 'old_logs/app.log'
removed 'old_logs/error.log'
removed 'old_logs/'
# Remove multiple files interactively
gilchrist rm -i *.backup
gilchrist rm: remove 'file1.backup'? y
gilchrist rm: remove 'file2.backup'? n
not removing 'file2.backup'
removed 'file1.backup'
# Count total log entries
gilchrist wc -l *.log
1500 app.log
2300 error.log
3800 total
# Find all log files in subdirectories
gilchrist find . -name "*.log" -type f
./logs/app.log
./logs/error.log
./archive/old.log
# Clean up old temporary logs
gilchrist find ./temp -name "*.log" -delete
gilchrist find: deleted ./temp/debug.log
gilchrist find: deleted ./temp/trace.log
# Remove log files older than certain pattern
gilchrist rm -v ./archive/*.log
removed './archive/2023-01.log'
removed './archive/2023-02.log'
# Count lines of code in project
gilchrist wc -l *.go *.js *.py
450 main.go
320 utils.go
680 app.js
200 helper.py
1650 total
# Find all source files
gilchrist find . -name "*.go" -o -name "*.js"
./main.go
./utils.go
./frontend/app.js
# Clean build artifacts
gilchrist find . -name "*.exe" -o -name "*.tmp" -delete
# Remove node_modules safely
gilchrist rm -rf node_modules/
# Find large directories
gilchrist find C:\Users -type d -maxdepth 2
C:\Users\AppData
C:\Users\Documents
C:\Users\Downloads
# Count files in Downloads
gilchrist find C:\Users\%USERNAME%\Downloads -type f | gilchrist wc -l
156
# Clean temporary files
gilchrist find %TEMP% -name "*.tmp" -delete
gilchrist rm -f %TEMP%\*.log
# Find configuration files
gilchrist find . -iname "*.config" -o -iname "*.ini"
./app.config
./settings.ini
Task | Windows Native π€‘ | gilchrist πΏ | Winner |
---|---|---|---|
Count Lines | Get-Content file.txt | Measure-Object -Line |
gilchrist wc -l file.txt |
πΏ Familiar Unix syntax |
Count Words | (Get-Content file.txt | Out-String | Measure-Object -Word).Words |
gilchrist wc -w file.txt |
πΏ Single command |
Find Files | Get-ChildItem -Recurse -Filter "*.txt" |
gilchrist find . -name "*.txt" |
πΏ Shorter, clearer |
Remove Directory | Remove-Item -Recurse -Force folder\ |
gilchrist rm -rf folder/ |
πΏ Unix familiarity |
Interactive Delete | Remove-Item -Confirm folder\ |
gilchrist rm -i folder |
πΏ Simpler flag |
Case-insensitive Search | Get-ChildItem -Recurse | Where-Object {$_.Name -like "*PATTERN*"} |
gilchrist find . -iname "*pattern*" |
πΏ Built-in flag |
Operation | Windows PowerShell π€‘ | gilchrist πΏ | Complexity |
---|---|---|---|
Count + Find Pattern Files | Get-ChildItem -Recurse -Filter "*.log" | ForEach-Object { Get-Content $_ | Measure-Object -Line } |
gilchrist find . -name "*.log" | xargs gilchrist wc -l |
PS: Pipeline hell vs WG: Simple pipe |
Find + Delete with Confirmation | Get-ChildItem -Recurse -Filter "*.tmp" | Remove-Item -Confirm |
gilchrist find . -name "*.tmp" -delete |
PS: Two commands vs WG: One action |
Recursive Verbose Removal | Remove-Item -Recurse -Verbose -Force folder\ |
gilchrist rm -rfv folder/ |
PS: Long flags vs WG: Compact flags |
Multi-level Directory Search | Get-ChildItem -Recurse -Depth 2 -Directory | Where-Object {$_.Name -like "*cache*"} |
gilchrist find . -maxdepth 2 -type d -iname "*cache*" |
PS: Complex pipeline vs WG: Clear flags |
Task: Count lines of code in all JavaScript files
PowerShell π€‘ | gilchrist πΏ |
---|---|
Get-ChildItem -Recurse -Filter "*.js" |<br>ForEach-Object {<br> $lines = (Get-Content $_.FullName | Measure-Object -Line).Lines<br> Write-Output "$($_.Name): $lines lines"<br>} |
bash<br>gilchrist find . -name "*.js" -exec gilchrist wc -l {} +<br># or simply:<br>gilchrist wc -l $(gilchrist find . -name "*.js")<br> |
Complex looping logic | Simple command composition |
Task: Find and interactively delete .tmp files in subdirectories
PowerShell π€‘ | gilchrist πΏ |
---|---|
Get-ChildItem -Recurse -Filter "*.tmp" |<br>ForEach-Object {<br> $response = Read-Host "Delete $($_.Name)? (y/n)"<br> if ($response -eq 'y') {<br> Remove-Item $_.FullName<br> Write-Host "Deleted $($_.Name)"<br> }<br>} |
bash<br>gilchrist find . -name "*.tmp" -delete<br># or for manual confirmation:<br>gilchrist rm -i $(gilchrist find . -name "*.tmp")<br> |
Custom interactive loop | Built-in interactive mode |
Task: Find log files, count total lines, show file with most lines
PowerShell π€‘ | gilchrist πΏ |
---|---|
$logs = Get-ChildItem -Recurse -Filter "*.log"<br>$totalLines = 0<br>$maxLines = 0<br>$maxFile = ""<br>foreach ($log in $logs) {<br> $lines = (Get-Content $log | Measure-Object -Line).Lines<br> $totalLines += $lines<br> if ($lines -gt $maxLines) {<br> $maxLines = $lines<br> $maxFile = $log.Name<br> }<br>}<br>Write-Host "Total: $totalLines lines"<br>Write-Host "Largest: $maxFile ($maxLines lines)" |
bash<br>gilchrist find . -name "*.log" | xargs gilchrist wc -l<br># Output shows individual counts AND total<br># Largest file is easily visible in output<br> |
20+ lines of scripting | 1 line with automatic totals |
Aspect | Windows Native π€‘ | gilchrist πΏ |
---|---|---|
Startup Time | ~2-3 seconds (PowerShell load) | ~10ms (native binary) |
Memory Usage | ~50-100MB (PowerShell session) | ~2-5MB (Go runtime) |
Learning Curve | PowerShell object model + cmdlet syntax | Familiar Unix command syntax |
Cross-Platform Knowledge | Windows-specific | Transferable to Linux/macOS |
Pipeline Efficiency | Object-heavy processing | Text-based streaming |
Error Handling | Complex try-catch blocks | Built-in Unix-style error codes |
Windows Problems π€‘ | gilchrist Solutions πΏ |
---|---|
Verbose cmdlets: Get-ChildItem -Recurse -Filter |
Concise: find . -name |
Object pipeline complexity | Simple text-based pipes |
No interactive delete by default | Built-in -i flag |
Complex filtering with Where-Object |
Direct pattern matching |
Inconsistent parameter naming | Standard Unix flag conventions |
Heavy memory usage for simple tasks | Lightweight native binaries |
Platform-specific knowledge | Universal Unix command knowledge |
Complex error handling required | Automatic error reporting |
- Windows: Learn PowerShell's unique object model and verbose syntax
- gilchrist: Use the same commands you know from Linux/macOS/Unix
- Windows:
Get-ChildItem -Recurse -Filter "*.txt" | ForEach-Object { (Get-Content $_ | Measure-Object -Line).Lines }
- gilchrist:
find . -name "*.txt" | xargs wc -l
- Native Go binaries vs PowerShell's .NET overhead
- Text streaming vs object processing
- Instant startup vs PowerShell initialization
- Standard Unix behavior across all commands
- Consistent flag naming (
-r
,-i
,-v
) - Predictable exit codes and error handling
Windows Native π€‘: "Let me write a 15-line PowerShell script with object manipulation, error handling, and hope it doesn't consume all my RAM..."
gilchrist πΏ: "Three commands, five flags, job done. Next!"
gilchrist gives you the Unix command-line power you're used to, while Windows native tools make you feel like you're learning a new programming language just to count files π
# Find large log files and count their lines
gilchrist find . -name "*.log" -type f | xargs gilchrist wc -l
# Count total source code files
gilchrist find . -name "*.go" -o -name "*.js" | gilchrist wc -l
# Clean and verify cleanup
gilchrist find . -name "*.tmp" -delete && echo "Cleanup complete"
# Process multiple directories
for /d %i in (*) do gilchrist wc -l "%i\*.txt"
# Conditional removal
gilchrist find . -name "*.backup" -type f -exec gilchrist rm -i {} +
# Statistics gathering
gilchrist find . -type f | gilchrist wc -l > file_count.txt
# Combine with DIR
dir /b *.txt | xargs gilchrist wc -l
# Process command output
tasklist | gilchrist find - -name "*chrome*"
# Log analysis
type server.log | gilchrist wc -l
Create test environment:
mkdir test_env
cd test_env
echo Line 1 > file1.txt
echo Line 2 >> file1.txt
echo Single line > file2.txt
mkdir subdir
echo Nested content > subdir\nested.txt
# Test wc functionality
gilchrist wc -l *.txt
2 file1.txt
1 file2.txt
3 total
# Test find functionality
gilchrist find . -name "*.txt"
.\file1.txt
.\file2.txt
.\subdir\nested.txt
# Test rm functionality (be careful!)
gilchrist rm -v file2.txt
removed 'file2.txt'
- Always test with
-v
(verbose) when usingrm
command - Use
-i
(interactive) for important file removals - Combine commands with pipes for powerful workflows
- Use
-h
flag to get command-specific help - Test find patterns before adding
-delete
- Use
-maxdepth
to limit find searches in large directories - Process large files with
wc
instead of loading into memory - Batch operations are more efficient than individual commands
- Use specific patterns rather than wildcards when possible
- Never use
rm -rf
without verification - Test find commands without
-delete
first - Use
-f
flag sparingly - it suppresses important warnings - Keep backups before bulk operations
- Use
-mindepth 1
to avoid operating on current directory
As a developer who switches between Windows and Linux environments, I was tired of the cognitive overhead of remembering PowerShell's verbose cmdlet syntax for simple file operations. When I need to count lines in a file, I want to type wc -l file.txt
, not Get-Content file.txt | Measure-Object -Line
.
gilchrist brings the familiar Unix command experience to Windows without requiring WSL, Git Bash, or other emulation layers. It's a single executable that provides the essential file utilities with the exact syntax and behavior you expect from Unix systems.
Instead of learning PowerShell's object-oriented approach for basic file operations, you can use the same muscle memory and command patterns that work across Linux, macOS, and now Windows.
Approx 30 min
Features Implemented:
- β Complete argument parsing with flag package
- β Error handling and exit codes
- β Stdin/stdout pipe support
- β Unicode-aware character counting
- β Glob to regex pattern conversion
- β Safe recursive directory operations
- β Interactive confirmation prompts
- β Comprehensive help system
π§ Email: [email protected]
Initially, I thought of naming it Goutils, but it felt a bit boring β I wanted something with a cooler vibe. Thatβs when the name Adam Gilchrist popped into my mind. So, I decided to rename Goutils into gilchrist β and that's how the I came up with this .
Licensed under GNU Affero General Public License
Need help? Run gilchrist help
or gilchrist <command> -h
for quick reference!
π Last Updated: June 19, 2025