{"id":14155669,"url":"https://github.com/kachkaev/njt","last_synced_at":"2025-05-15T21:06:15.098Z","repository":{"id":36467151,"uuid":"226175035","full_name":"kachkaev/njt","owner":"kachkaev","description":"njt (npm jump to): a quick navigation tool for npm packages","archived":false,"fork":false,"pushed_at":"2025-05-09T22:21:08.000Z","size":16019,"stargazers_count":317,"open_issues_count":13,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-09T23:26:01.311Z","etag":null,"topics":["frog","jump","meta","njt","npm","npmjs","productivity","search","search-engine","shortcuts","vercel","vercel-deployment"],"latest_commit_sha":null,"homepage":"https://njt.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kachkaev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-05T19:34:22.000Z","updated_at":"2025-05-08T05:46:13.000Z","dependencies_parsed_at":"2023-12-19T12:00:16.879Z","dependency_job_id":"12a7a61f-cf83-43b4-85d4-6eca4e4a720c","html_url":"https://github.com/kachkaev/njt","commit_stats":{"total_commits":660,"total_committers":6,"mean_commits":110.0,"dds":"0.45151515151515154","last_synced_commit":"c94d196807815c02275643c3eb88c61818c62e1f"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kachkaev%2Fnjt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kachkaev%2Fnjt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kachkaev%2Fnjt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kachkaev%2Fnjt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kachkaev","download_url":"https://codeload.github.com/kachkaev/njt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254422762,"owners_count":22068678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frog","jump","meta","njt","npm","npmjs","productivity","search","search-engine","shortcuts","vercel","vercel-deployment"],"created_at":"2024-08-17T08:04:50.963Z","updated_at":"2025-05-15T21:06:15.079Z","avatar_url":"https://github.com/kachkaev.png","language":"TypeScript","funding_links":[],"categories":["vercel","TypeScript"],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003e 🐸 njt 🐸\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cb\u003e🐸 npm jump to 🐸\u003c/b\u003e\u003cbr/\u003e\n\u003ca href=\"https://njt.vercel.app\"\u003enjt.vercel.app\u003c/a\u003e\n\u003c/p\u003e\n\nDo you type package names in your search engine and then navigate to their source, homepage, changelog and so on? 🕐🕑🕒🕓🕔\n\n[Save five seconds thousands of times](https://xkcd.com/1205/) by quickly jumping to the right URL:\n\n```txt\n🐸✨🐸✨🐸\nnjt \u003cpackage\u003e [destination]\n🐸✨🐸✨🐸\n```\n\n## Available destinations\n\n\u003c!-- When updating, remember to reflect changes in cli/cli.js and src/ui/PageContentsForIndex/AvailableDestinations.tsx --\u003e\n\n- `b` → package cost estimation on [bundlephobia.com](https://bundlephobia.com)\n- `c` → changelog\n- `g` → github (gitlab, etc.) repository root\n- `h` → homepage (aliased as `w` for website or `d` for docs)\n- `i` → issues\n- `n` → package info on [npmjs.com](https://www.npmjs.com)\n- `p` → pull requests (aliased as `m` for merge requests)\n- `r` → list of github releases\n- `s` → source (often same as repository root, but can be its subdirectory in case of a monorepo)\n- `t` → list of git tags\n- `u` → package contents preview on [unpkg.com](https://unpkg.com)\n- `v` → list of package versions with dates on [npmjs.com](https://www.npmjs.com)\n- `y` → package page on [yarnpkg.com](https://yarnpkg.com) (mirror registry for [npmjs.com](https://www.npmjs.com))\n- `.` → browse GitHub / GitLab code\n\nOmitting the destination or entering an non-existing one takes you to the package page on [npmjs.com](https://www.npmjs.com) as if you used `n`.\n\n## Examples\n\n`njt prettier` (no specified destination)  \n🐸 → \u003chttps://www.npmjs.com/package/prettier\u003e\n\n`njt prettier h` (homepage)  \n🐸 → \u003chttps://prettier.io\u003e\n\n`njt prettier s` (source)  \n🐸 → \u003chttps://github.com/prettier/prettier\u003e\n\n`njt prettier r` (releases)  \n🐸 → \u003chttps://github.com/prettier/prettier/releases\u003e\n\n`njt prettier y` (yarn)  \n🐸 → \u003chttps://yarnpkg.com/package/prettier\u003e\n\n## Getting `njt`\n\nThere are several environments in which you can access `njt`.\nPick your favourite or use ’em all!\n\n### 🟢 Command-line tool\n\nInstall `njt` globally [from npm](https://www.npmjs.com/package/njt) by running this command in your terminal:\n\n```bash\nnpm install --global njt\n```\n\nYou are all set.\nNow try executing `njt \u003cpackage\u003e [destination]` with some real arguments.\nFor example, these two commands will take you to the Lodash **g**ithub repo and **h**omepage, respectively:\n\n```bash\nnjt lodash g\nnjt lodash h\n```\n\nA list of supported destinations will be shown if you launch `njt` without arguments.\n\nTo uninstall, run `npm remove --global njt`.\nTo reinstall or upgrade, run `npm install --global njt` again.\n\n**Pro tip 💡** When you specify `.` instead of a package name, `njt` takes the name from the nearest `package.json` file.\n\n**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.\nThe value [may vary](https://www.npmjs.com/package/open#app) based on your OS.\nNote that setting `BROWSER` instead of `NJT_BROWSER` can affect other tools, which may or may not be desired.\n\n### 🟢 Custom search engine in Chrome\n\n1.  Open Chrome settings, e.g. by navigating to `chrome://settings`\n1.  Navigate to _Manage search engines_ section (e.g. by typing its name in the _Search settings_ field)\n1.  Click _Add_ next to _Other search engines_\n1.  Fill in the _Add search engine_ form:\n\n    | Field                         | Value                                           |\n    | ----------------------------- | ----------------------------------------------- |\n    | Search engine                 | `njt (npm jump to)`                             |\n    | Keyword                       | `njt`                                           |\n    | Url with %s in place of query | `https://njt.vercel.app/jump?from=chrome\u0026to=%s` |\n\n1.  Press _Add_\n\nFrom now on, typing `njt \u003cpackage\u003e [destination]` in the address bar will take you directly to a page you want.\nFor example, `njt react h` will take you to the [React.js homepage](https://reactjs.org).\n\nTo uninstall, open _Manage search engines_ section in Chrome settings, click on three dots next to _Other search engines → njt_ and hit _Remove from list_.\n\n**Pro tip 💡** You can use `n` instead of `njt` as a keyword to avoid typing two extra characters each time.\nThe command to type in Chrome address bar will become `n \u003cpackage\u003e [destination]` 🚀\n\n### 🟢 Search bookmark in Firefox\n\nYou can use `njt` right from the address bar in Firefox.\n\n1.  Open [njt.vercel.app](https://njt.vercel.app)\n1.  Right-click on the search input field\n1.  In the context menu, select _Add Keyword for this Search..._\n1.  You’ll see a small form; type `njt` into the _Keyword_ field\n1.  Press _Save_\n\nFrom now on, typing `njt \u003cpackage\u003e [destination]` in the address bar will take you directly to a page you want.\nFor example, `njt react h` will take you to the [React.js homepage](https://reactjs.org).\n\nTo uninstall, open Firefox bookmarks from the main menu, search for `njt` and remove the bookmark.\n\n**Pro tip 💡** You can use `n` instead of `njt` as a search keyword to avoid typing two extra characters each time.\nThe command to type in Firefox address bar will become `n \u003cpackage\u003e [destination]` 🚀\n\n### 🟢 Alfred web search\n\nWant to hop directly from [Alfred launcher](https://www.alfredapp.com/)?\n\n1.  Open _Preferences_ → _Features_ → _Web Search_\n1.  Click _Add Custom Search_\n1.  Fill in the form:\n\n    | Field      | Value                                                |\n    | ---------- | ---------------------------------------------------- |\n    | Search URL | `https://njt.vercel.app/jump?from=alfred\u0026to={query}` |\n    | Title      | `Search njt for '{query}'`                           |\n    | Keyword    | `njt`                                                |\n    | Icon       | drag from \u003chttps://njt.vercel.app/favicon-32x32.png\u003e |\n\n1.  Press _Save_\n\nAlternatively, copy and open this special Alfred link to get all the above steps done for you:\n\n```txt\nalfred://customsearch/Search%20njt%20for%20%27%7Bquery%7D%27/njt/utf8/nospace/https%3A%2F%2Fnjt.vercel.app%2Fjump%3Ffrom%3Dalfred%26to%3D%7Bquery%7D\n```\n\n**Pro tip 💡** You can use `n` instead of `njt` as a search keyword to avoid typing two extra characters each time.\nThe command to type in Alfred address bar will become `n \u003cpackage\u003e [destination]` 🚀\n\nYou can also create variants with your favorite `njt` suffixes to jump to your favorite locations in even fewer characters.\nFor example, keyword `ng` can be a shortcut to `njt {query} g`.\n\n### 🟢 VSCode\n\nIf you use Visual Studio Code, you can add njt to the command palette via [LaunchX](https://marketplace.visualstudio.com/items?itemName=neibla.launchx) extension.\n\n1.  [Install the extension](vscode:extension/neibla.launchx)\n\n1.  Open the command palette\n\n1.  Type `njt` and press Enter\n\n    ![njt in VSCode command palette](assets/vscode-launchx.png)\n\n1.  Type your search and press Enter again\n\n**Pro tip 💡** Use `ctrl+alt+n` to bypass the command palette.\n\n### 🟢 DuckDuckGo bang\n\n\u003e DuckDuckGo bang is awaiting approval (please help if you know how to speed up the process).\n\n\u003cs\u003eIf you use [duckduckgo.com](https://duckduckgo.com) as your primary search engine, type `!njt \u003cpackage\u003e [destination]` in its search field (note the leading exclamation mark).\nThis trick is possible thanks to DuckDuckGo’s awesome [bang feature](https://duckduckgo.com/bang).\u003c/s\u003e\n\n### 🟢 Online search field on the `njt`’s mini-website\n\nOpen [njt.vercel.app](https://njt.vercel.app), type your query, press Enter.\nThis method is a bit slower than the other ones because it involves opening a web page with an input form.\nOn the plus side, it works everywhere and does not require setup.\n\nThanks to [Vercel](https://vercel.com) for hosting [njt.vercel.app](https://njt.vercel.app) 💚\n\n### ❓More ways\n\nAre you a search shortcut guru?\nFeel free [to suggest](https://github.com/kachkaev/njt/issues/new?title=New+entry+point+suggestion) another entry point to `njt` and save people’s time around the world!\n\n## How `njt` works\n\n### Query resolution\n\nThe logic of `njt` is centralized and located within the `njt.vercel.app/jump` endpoint ([source](pages/api/jump.handler.ts)).\n\nAll `njt` interfaces submit user queries to `https://njt.vercel.app/jump?from=UI_ID\u0026to=USER_QUERY`, from which you are redirected to the destination.\n\nFor queries like `njt \u003cpackage\u003e` or `njt \u003cpackage\u003e y`, the redirects are straightforward: `https://www.npmjs.com/package/\u003cpackage\u003e` or `https://yarnpkg.com/package/\u003cpackage\u003e`.\n\nMost other cases involve a look into `package.json` for the latest version of the searched package.\nThis file is fetched from [www.npmjs.com](https://www.npmjs.com).\nIt contains the location of the repository, the homepage and some other fields which are used to construct the destination URL.\n\n### Privacy\n\nOfficial `njt` interfaces and the `njt.vercel.app/jump` endpoint do not store submitted queries.\nSince [njt.vercel.app](https://njt.vercel.app) is hosted by Vercel, performance and usage data is logged by the infrastructure (see [Vercel Analytics](https://vercel.com/analytics)).\n\nWhen `njt` navigates to `https://njt.vercel.app/jump?from=UI_ID\u0026to=USER_QUERY`, parameter `from=UI_ID` is sent to the endpoint alongside the user query.\nThe value is currently ignored but it may be used in the future for resolving queries or for analysing the popularity of `njt` interfaces.\n\n## Prior art\n\nShortcuts to some of the `njt` destinations are built into `npm` cli:\n\n📦 [`npm home \u003cpackage\u003e` or `npm docs \u003cpackage\u003e`](https://docs.npmjs.com/cli/docs)  \n⭥  \n🐸 `njt \u003cpackage\u003e h` (homepage)\n\n---\n\n📦 [`npm issues \u003cpackage\u003e` or `npm bugs \u003cpackage\u003e`](https://docs.npmjs.com/cli/bugs)  \n⭥  \n🐸 `njt \u003cpackage\u003e i` (issues)\n\n---\n\n📦 [`npm repo \u003cpackage\u003e`](https://docs.npmjs.com/cli/repo)  \n⭥  \n🐸 `njt \u003cpackage\u003e g` (github, gitlab, etc. repo)\n\nWith `njt`, you have access to more shortcuts in multiple environments, which makes you more productive day to day.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkachkaev%2Fnjt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkachkaev%2Fnjt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkachkaev%2Fnjt/lists"}