A beautiful terminal UI (TUI) for exploring Composer autoload files in PHP projects. Navigate PSR-4 namespaces, autoload files, and namespaces with syntax highlighting and an intuitive interface.
-
Three View Modes:
- PSR-4 autoloading (namespace → directories)
- Autoload files (file list)
- Namespaces (PSR-0 autoloading)
-
Interactive Navigation:
- Browse namespaces and files in a split-pane interface
- View file contents with syntax highlighting and line numbers
- Filter namespaces/files with real-time search
-
Beautiful TUI:
- Syntax highlighting for PHP files
- Dark theme optimized for terminals
- Responsive layout that adapts to terminal size
- Item count display on left pane
-
File Watching:
- Automatically refreshes when autoload files change
- No need to restart the application
go install github.com/dwjordan/autoloadx/cmd/autoloadx@latestMake sure $GOPATH/bin or $GOBIN is in your PATH.
git clone https://github.com/dwjordan/autoloadx.git
cd autoloadx
go build -o autoloadx cmd/autoloadx/main.goLinux:
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o autoloadx-linux cmd/autoloadx/main.goWindows:
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o autoloadx.exe cmd/autoloadx/main.goRun autoloadx from within a Composer project directory (one that has a vendor/composer directory):
autoloadxThe application will automatically find the project root by searching for vendor/composer in the current directory and parent directories.
-v,--version- Display version information and exit
1/F1- Switch to PSR-4 autoload mode2/F2- Switch to autoload files mode3/F3- Switch to namespaces (PSR-0) modeq/Ctrl+C- Quit?- Show help popup
↑/w- Move up↓/s- Move down/- Filter items
↑/k- Scroll up↓/j- Scroll downh/a- Scroll leftl/d- Scroll right
Press ESC or q to close the help popup.
- Go 1.25.1 or later (for building from source)
- A PHP project with Composer autoload files (
vendor/composer/autoload_*.php) - A terminal that supports ANSI colors and 256-color mode
# Build for current platform
go build -ldflags="-s -w" -o autoloadx cmd/autoloadx/main.go
# Build optimized (smaller binary)
go build -ldflags="-s -w" -trimpath -o autoloadx cmd/autoloadx/main.goThe application reads Composer's autoload files:
vendor/composer/autoload_psr4.php- PSR-4 namespace mappingsvendor/composer/autoload_files.php- File-based autoloadingvendor/composer/autoload_namespaces.php- PSR-0 namespace mappings
It then provides an interactive interface to explore these mappings, view file contents, and navigate the autoload structure.
Make sure you're running autoloadx from within a Composer project directory, or in a subdirectory of one. The tool searches upward from the current directory to find the project root.
Ensure your terminal supports 256-color mode. Most modern terminals support this by default. If colors still don't work, try setting TERM=xterm-256color.
The tool requires PHP to be installed and available in your PATH to parse Composer autoload files.
See CHANGELOG.md for a list of changes in each version.
MIT License - see LICENSE file for details.
