Skip to content

2chevskii/gly

Repository files navigation

gly

gly banner

CI Documentation License: MIT

gly is a PowerShell module for customizable visual formatting of file system objects:

  • System.IO.FileInfo
  • System.IO.DirectoryInfo

It improves interactive output for Get-ChildItem, Get-Item, and user commands that return PowerShell file system objects while preserving the object model and pipeline compatibility.

Documentation · Contributing · Security · Support

Status

gly currently provides the MVP implementation described in the current user and developer documentation.

The module:

  • targets PowerShell 7.0+;
  • activates automatically on Import-Module;
  • customizes the standard table view only in the Name column;
  • adds glyphs and optional color to file and directory names;
  • provides session-only configuration;
  • supports built-in and user-registered themes;
  • supports built-in and user-registered glyph sets;
  • stores configuration, themes, glyph sets, rules, selectors, and styles in strongly typed models;
  • recognizes well-known project files and directories plus common development, document, archive, and media extensions;
  • includes Show-Gly, Show-GlyTree, and Show-GlyGrid renderer commands.

Windows PowerShell 5.1 is not supported by the MVP.

Quick Start

Install the module from PowerShell Gallery:

Install-Module -Name gly -Repository PSGallery -Scope CurrentUser
Import-Module gly

After import, standard PowerShell file system output uses the custom view:

Get-ChildItem .
Get-Item .

Use renderer commands for explicit interactive layouts:

Show-Gly -Path .
Show-GlyTree -Path . -Depth 2
Show-GlyGrid -Path .

Short aliases are available:

gly .
glytr . -Depth 2
glygr .

Preview registered theme colors, glyphs, or their combined appearance for every matcher. Color and glyph previews use mock file and directory names so each rule is easy to recognize:

Show-GlyThemeColor DefaultDark
Show-GlyGlyph Unicode
Show-GlyThemePreview -Theme DefaultDark -GlyphSet Unicode

Use -All to preview every currently registered theme or glyph set:

Show-GlyThemeColor -All
Show-GlyGlyph -All

Configuration

Configuration is kept only in the current PowerShell session:

Get-GlyConfiguration

Common settings:

Set-GlyConfiguration -ShowColors $false
Set-GlyConfiguration -ShowGlyphs $false
Set-GlyConfiguration -SizeFormat Binary
Set-GlyConfiguration -DateFormat Iso
Set-GlyTheme DefaultLight
Set-GlyGlyphSet Unicode

Disable-Gly disables colors and glyphs through module configuration. PowerShell format data is session-wide, so the custom view can remain loaded until the session ends.

Documentation

Development

Run the PowerShell test suite:

npm test

This produces JUnit XML, CTRF JSON, and HTML test reports under artifacts/tests/local. Run npm run test:coverage to also produce Cobertura coverage data.

Build the VitePress documentation site:

npm ci
npm run docs:build

Run repeatable startup and rendering benchmarks:

npm run bench
npm run bench:startup
npm run bench:rendering

The combined command runs the independent startup and rendering suites concurrently.

Contributing and Support

Contributions are welcome. Read the contribution guidelines before opening an issue or pull request. For usage questions, start a GitHub Discussion. Please report security vulnerabilities privately as described in the security policy.

License

MIT. See LICENSE.

About

PowerShell module for customizable visual formatting of file system objects.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages