npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ampline

v1.0.0

Published

amp up your command line — assign variables to output from common commands. a great complement to tab completion

Downloads

10

Readme

ampline

amp up your command line.

assign variables to output from common commands

a great complement to tab completion

No longer will you find yourself copy-pasting long paths into git add, or tab-completing deep directory structures.

npm -g install ampline

show not tell

A simple example:

$ ls
1 amp
2 node_modules
3 package.json
4 readme.md
5 screenshots

$ cat 4
# executes cat readme.md
TODO write a readme. Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod.

$ amp echo "hi" >> 4
# executes echo "hi" >> readme.md

$ gs # this is an alias that uses `amp`
1  M readme.md

$ ga readme.md
1 M  readme.md

$ git commit -m 'added hi to my readme.'

A more complicated example:

screenshot

basic actions

  • list the variables you have saved
    $ amp
  • expand the variables you have saved
    $ amp vim 1 2 3-5
  • run a command (step 1: expand variables, step 2: run command, step 3: each line that matches the -p regex will be saved to a variable)

    $ amp -p "(.*)" ls -1
    1 amp
    2 node_modules
    3 package.json
    4 readme.md
    5 screenshots

    # let's view what the current variables are set to
    $ amp
    1 = amp
    2 = node_modules
    3 = package.json
    4 = readme.md
    5 = screenshots

suggested aliases

Because you don't want to type amp all over the place.

These are the aliases I use. Since I only just wrote this, there aren't that many. Based on these it shouldn't be too hard write/customize your own set of aliases.

    # give me variable saving!
    alias gs='amp -p "...(.*)$" git status -s'
    alias gbr='amp -p " ? (?:remotes\\/)?(?:origin\\/)?(.*)$" git branch' # supports -a, -r flags

    alias l='CLICOLOR_FORCE=1 amp -p "(.*)" ls -1'
    alias find='amp -p "(.*)" find'

    # give me variable expansion!
    alias subl='amp subl'
    alias ga='amp git add'
    alias grm='amp git rm'
    alias gco='amp git checkout'
    alias gd='amp git diff'
    alias gdh='amp git diff HEAD'
    alias gunstage='amp git unstage'
    alias cat='amp cat'
    alias less='amp less'
    alias mocha='amp mocha'

Enjoy! I hope you like it :) - @DTrejo

@peterlyon suggested I add this photo!

Amplifier History - Vai