πΈ npm jump to πΈ
njt.vercel.app
Do you type package names in your search engine and then navigate to their source, homepage, changelog and so on? πππππ
Save five seconds thousands of times by quickly jumping to the right URL:
πΈβ¨πΈβ¨πΈ
njt <package> [destination]
πΈβ¨πΈβ¨πΈbβ package cost estimation on bundlephobia.comcβ changeloggβ github (gitlab, etc.) repository roothβ homepage (aliased aswfor website ordfor docs)iβ issuesnβ package info on npmjs.compβ pull requests (aliased asmfor merge requests)rβ list of github releasessβ source (often same as repository root, but can be its subdirectory in case of a monorepo)tβ list of git tagsuβ package contents preview on unpkg.comvβ list of package versions with dates on npmjs.comyβ package page on yarnpkg.com (mirror registry for npmjs.com).β browse GitHub / GitLab code
Omitting the destination or entering an non-existing one takes you to the package page on npmjs.com as if you used n.
njt prettier (no specified destination)
πΈ β https://www.npmjs.com/package/prettier
njt prettier h (homepage)
πΈ β https://prettier.io
njt prettier s (source)
πΈ β https://github.com/prettier/prettier
njt prettier r (releases)
πΈ β https://github.com/prettier/prettier/releases
njt prettier y (yarn)
πΈ β https://yarnpkg.com/package/prettier
There are several environments in which you can access njt.
Pick your favourite or use βem all!
Install njt globally from npm by running this command in your terminal:
npm install --global njtYou are all set.
Now try executing njt <package> [destination] with some real arguments.
For example, these two commands will take you to the Lodash github repo and homepage, respectively:
njt lodash g
njt lodash hA list of supported destinations will be shown if you launch njt without arguments.
To uninstall, run npm remove --global njt.
To reinstall or upgrade, run npm install --global njt again.
Pro tip π‘ When you specify . instead of a package name, njt takes the name from the nearest package.json file.
Pro tip π‘ To customise which browser you want to open, set an environment variable called NJT_BROWSER (or just BROWSER) with the app name of your choice.
The value may vary based on your OS.
Note that setting BROWSER instead of NJT_BROWSER can affect other tools, which may or may not be desired.
-
Open Chrome settings, e.g. by navigating to
chrome://settings -
Navigate to Manage search engines section (e.g. by typing its name in the Search settings field)
-
Click Add next to Other search engines
-
Fill in the Add search engine form:
Field Value Search engine njt (npm jump to)Keyword njtUrl with %s in place of query https://njt.vercel.app/jump?from=chrome&to=%s -
Press Add
From now on, typing njt <package> [destination] in the address bar will take you directly to a page you want.
For example, njt react h will take you to the React.js homepage.
To uninstall, open Manage search engines section in Chrome settings, click on three dots next to Other search engines β njt and hit Remove from list.
Pro tip π‘ You can use n instead of njt as a keyword to avoid typing two extra characters each time.
The command to type in Chrome address bar will become n <package> [destination] π
You can use njt right from the address bar in Firefox.
- Open njt.vercel.app
- Right-click on the search input field
- In the context menu, select Add Keyword for this Search...
- Youβll see a small form; type
njtinto the Keyword field - Press Save
From now on, typing njt <package> [destination] in the address bar will take you directly to a page you want.
For example, njt react h will take you to the React.js homepage.
To uninstall, open Firefox bookmarks from the main menu, search for njt and remove the bookmark.
Pro tip π‘ You can use n instead of njt as a search keyword to avoid typing two extra characters each time.
The command to type in Firefox address bar will become n <package> [destination] π
Want to hop directly from Alfred launcher?
-
Open Preferences β Features β Web Search
-
Click Add Custom Search
-
Fill in the form:
Field Value Search URL https://njt.vercel.app/jump?from=alfred&to={query}Title Search njt for '{query}'Keyword njtIcon drag from https://njt.vercel.app/favicon-32x32.png -
Press Save
Alternatively, copy and open this special Alfred link to get all the above steps done for you:
alfred://customsearch/Search%20njt%20for%20%27%7Bquery%7D%27/njt/utf8/nospace/https%3A%2F%2Fnjt.vercel.app%2Fjump%3Ffrom%3Dalfred%26to%3D%7Bquery%7DPro tip π‘ You can use n instead of njt as a search keyword to avoid typing two extra characters each time.
The command to type in Alfred address bar will become n <package> [destination] π
You can also create variants with your favorite njt suffixes to jump to your favorite locations in even fewer characters.
For example, keyword ng can be a shortcut to njt {query} g.
If you use Visual Studio Code, you can add njt to the command palette via LaunchX extension.
-
Install the extension
-
Open the command palette
-
Type
njtand press Enter -
Type your search and press Enter again
Pro tip π‘ Use ctrl+alt+n to bypass the command palette.
DuckDuckGo bang is awaiting approval (please help if you know how to speed up the process).
If you use duckduckgo.com as your primary search engine, type !njt <package> [destination] in its search field (note the leading exclamation mark).
This trick is possible thanks to DuckDuckGoβs awesome bang feature.
Open njt.vercel.app, type your query, press Enter. This method is a bit slower than the other ones because it involves opening a web page with an input form. On the plus side, it works everywhere and does not require setup.
Thanks to Vercel for hosting njt.vercel.app π
Are you a search shortcut guru?
Feel free to suggest another entry point to njt and save peopleβs time around the world!
The logic of njt is centralized and located within the njt.vercel.app/jump endpoint (source).
All njt interfaces submit user queries to https://njt.vercel.app/jump?from=UI_ID&to=USER_QUERY, from which you are redirected to the destination.
For queries like njt <package> or njt <package> y, the redirects are straightforward: https://www.npmjs.com/package/<package> or https://yarnpkg.com/package/<package>.
Most other cases involve a look into package.json for the latest version of the searched package.
This file is fetched from www.npmjs.com.
It contains the location of the repository, the homepage and some other fields which are used to construct the destination URL.
Official njt interfaces and the njt.vercel.app/jump endpoint do not store submitted queries.
Since njt.vercel.app is hosted by Vercel, performance and usage data is logged by the infrastructure (see Vercel Analytics).
When njt navigates to https://njt.vercel.app/jump?from=UI_ID&to=USER_QUERY, parameter from=UI_ID is sent to the endpoint alongside the user query.
The value is currently ignored but it may be used in the future for resolving queries or for analysing the popularity of njt interfaces.
Shortcuts to some of the njt destinations are built into npm cli:
π¦ npm home <package> or npm docs <package>
β₯
πΈ njt <package> h (homepage)
π¦ npm issues <package> or npm bugs <package>
β₯
πΈ njt <package> i (issues)
π¦ npm repo <package>
β₯
πΈ njt <package> g (github, gitlab, etc. repo)
With njt, you have access to more shortcuts in multiple environments, which makes you more productive day to day.