
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
== Description Lightning is a commandline framework that lets users wrap commands with shell functions that are able to refer to any filesystem path by its basename. To achieve this, a group of paths to be translated are defined with shell globs. These shell globs, known as a lightning bolt, are then applied to commands to produce functions. In addition to translating basenames to full paths, lightning functions can autocomplete these basenames, resolve conflicts if they have the same name, leave any non-basename arguments untouched, and autocomplete directories above and below a basename. To make bolts shareable between users and functions easier to create, lightning has generators. A generator generates filesystem-specific globs for a bolt. Lightning comes with some default generators. Users can make their own generators with generator plugins placed under ~/.lightning/generators/.
== Intro Lightning generates shell functions which can interpret paths by their basenames. So instead of carpal-typing
$ less /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb.rb
just type
$ less-ruby irb.rb
less-ruby is a lightning function which wraps less
with the ability to refer to system ruby files
by their basenames. Being a lightning function, it can also autocomplete system ruby files:
$ less-ruby [TAB] Display all 1112 possibilities? (y or n)
$ less-ruby a[TAB] abbrev.rb abstract.rb abstract_index_builder.rb $ less-ruby abb[TAB] $ less-ruby abbrev.rb
$ less-ruby -I abbrev.rb y[TAB] yaml.rb yamlnode.rb ypath.rb $ less-ruby -I abbrev.rb yp[TAB] $ less-ruby -I abbrev.rb ypath.rb
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml/ypath.rb ...
And here's the one-liner that creates this function:
$ lightning function create less ruby && lightning-reload
== Install
Install with either rip or rubygems: $ rip install lightning
$ gem install yard # if you want lightning's documentation generated correctly $ gem install lightning
If you've installed with rubygems and time lightning
takes longer than 0.05 seconds, I strongly
recommend installing with rip. Your startup time directly effects your autocompletion speed with
lightning.
Once lightning is installed, we need to do a one-time setup:
$ lightning install -h
$ lightning install && source ~/.lightning/functions.sh Created ~/.lightningrc Created ~/.lightning/functions.sh
echo source ~/.lightning/functions.sh >> ~/.bashrc
echo source ~/.lightning/functions.sh >> ~/.zshrc
To install and view lightning's man page:
$ man lightning
$ gem install gem-man $ gem man lightning
== Bugs/Issues Please report them {on github}[http://github.com/cldwalker/lightning/issues].
== Limitations
== Credits
== Links
== Todo
FAQs
Unknown package
We found that lightning demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.