Open the npm page, Yarn page, or GitHub repo of a package

Overview

npm-home

Open the npm page, Yarn page, or GitHub repo of a package

Install

$ npm install --global npm-home

Usage

$ npm-home --help

  Usage
    $ npm-home [name]
    $ nh [name]

  Options
    --github -g  Open the GitHub repo of the package
    --yarn -y    Open the Yarn homepage of the package

  Examples
    $ npm-home
    $ npm-home chalk -g

Related

  • gh-home - Open the GitHub page of the given or current directory repo

License

MIT © Sindre Sorhus

Comments
  • `nh -g babel-preset-minify` crashes

    `nh -g babel-preset-minify` crashes

    ❯ npm install npm-home
    + [email protected]
    added 78 packages in 2.241s
    
    ❯ ./node_modules/.bin/nh -g babel-preset-minify
    Error: Expected a `target`
        at module.exports (/home/lydell/bugs/node_modules/opn/index.js:8:25)
        at packageJson.then.pkg (/home/lydell/bugs/node_modules/npm-home/cli.js:45:12)
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)
    

    Thanks for this very useful tool, btw!

    enhancement help wanted 
    opened by lydell 8
  • Do something nicer when no argument is provided

    Do something nicer when no argument is provided

    ❯ nh --version
    1.5.0
    
    ❯ nh
    TypeError: Cannot read property 'name' of undefined
        at readPkgUp.then.x (/home/lydell/.npm-global/lib/node_modules/npm-home/cli.js:70:34)
        at <anonymous>
    
    opened by lydell 2
  • npm-home will trigger Xcode

    npm-home will trigger Xcode

    $ nh joi -g will open Xcode and does not open browser $ nh next -g will open browser

    Do you have any idea about this situation?

    My Mac is MacBook Air 10.13 (17A365) $ nh --version // 1.6.1

    opened by kpman 1
  • Handle invalid repository url

    Handle invalid repository url

    Fixes #5 tested with

    {
        "name": "chalk",
        "repository": {
            "type": "git",
            "url": "git+https://github.com/chalk/chalk.git"
        },
        "homepage": "https://github.com/chalk/chalk#readme"
    };
    
    {
        "name": "chalk",
        "repository": {
            "type": "git",
            "url": "https://github.com/chalk/chalk"
        },
        "homepage": "https://github.com/chalk/chalk#readme"
    };
    
    {
        "name": "chalk",
        "repository": {
            "type": "git",
            "url": "/chalk/chalk"
        },
        "homepage": "https://github.com/chalk/chalk#readme"
    };
    
    opened by hafffe 1
  • Add implementation to let the user also open a package dependency page

    Add implementation to let the user also open a package dependency page

    opened by vrunoa 1
  • Make the connection error message nicer :)

    Make the connection error message nicer :)

    If you try to run npm-home while offline, this happens:

    ❯ nh --version
    1.5.0
    
    ❯ nh -g npm-home
    RequestError
        at ClientRequest.req.once.err (/home/lydell/.npm-global/lib/node_modules/npm-home/node_modules/got/index.js:73:21)
        at Object.onceWrapper (events.js:316:30)
        at emitOne (events.js:115:13)
        at ClientRequest.emit (events.js:210:7)
        at TLSSocket.socketErrorListener (_http_client.js:401:9)
        at emitOne (events.js:115:13)
        at TLSSocket.emit (events.js:210:7)
        at emitErrorNT (internal/streams/destroy.js:64:8)
        at _combinedTickCallback (internal/process/next_tick.js:138:11)
        at process._tickCallback (internal/process/next_tick.js:180:9)
    

    I run into this every once in a while on the train where the Internet connection is spotty.

    enhancement help wanted 
    opened by lydell 0
Releases(v2.0.0)
  • v2.0.0(May 13, 2019)

    Breaking:

    • Require Node.js 8 fd3b316

    Enhancements:

    • Performance improvements

    https://github.com/sindresorhus/npm-home/compare/v1.8.0...v2.0.0

    Source code(tar.gz)
    Source code(zip)
Owner
Sindre Sorhus
Full-Time Open-Sourcerer. Wants more empathy & kindness in open source. Focuses on Swift & JavaScript. Makes macOS apps, CLI tools, npm packages. Likes unicorns
Sindre Sorhus
Check NPM package licenses

NPM License Checker As of v17.0.0 the failOn and onlyAllow arguments take semicolons as delimeters instead of commas. Some license names contain comma

Dav Glass 1.5k Dec 29, 2022
:eyeglasses: Node.js module that tells you when your package npm dependencies are out of date.

Node.js module that tells you when your package npm dependencies are out of date. Getting Started Install Node.js. Install david: cd /your/project/dir

Alan Shaw 953 Dec 25, 2022
Check whether a package or organization name is available on npm

npm-name Check whether a package or organization name is available on npm Install $ npm install npm-name Usage import npmName from 'npm-name'; // Ch

Sindre Sorhus 157 Nov 13, 2022
Package manager faster than NPM

Pine Script holder that runs faster than NPM and yarn Pine is a npm and yarn run like module, that allows you to organize your scripts and run them FA

Darkling 4 Jul 10, 2021
A better `npm publish`

np A better npm publish Why Interactive UI Ensures you are publishing from your release branch (main and master by default) Ensures the working direct

Sindre Sorhus 6.9k Jan 2, 2023
Uses marked-terminal to render a README.md for any npm module in the terminal.

modhelp Uses marked-terminal to render a README.md for any npm module in the terminal. Now with built-in pager! Page up/down, arrow keys to scroll lin

Jason Livesay 23 Feb 8, 2022
Add a hungry turtle to your terminal and feed it every time you mistype 'npm' as 'nom'

Nom Does this ever happen to you? You happily code away on a project, navigating the command line like a pro, testing, error logging, installing packa

Meike Hankewicz 5 Apr 26, 2022
An npm module to run Snowflake in a headless browser to help censored users connect to the Tor network.

snowflake-cli An npm module to run Snowflake in a headless browser to help censored users connect to the Tor network. Note: depending on your environm

yan 8 Mar 24, 2022
Translations with speech synthesis in your terminal as a node package

Normit Normit is an easy way to translate stuff in your terminal. You can check out its Ruby gem version termit. Installation npm install normit -g Us

Paweł Urbanek 234 Jan 1, 2023
Get the current local time of a GitHub user.

dev-time-cli Get the current local time of a GitHub user. Install $ npm install --global dev-time-cli Usage $ dev-time --help Usage $ dev-time

Sam Verschueren 176 Jun 29, 2022
An extension geared towards Spotify users with larger libraries; view all your playlists that contain a specific song with the click of a button. Designed for Spicetify (https://github.com/khanhas/spicetify-cli)

ViewPlaylistsWithSong An extension developed for Spicetify that allows you to view all the playlists in your library that contain a certain song. Idea

null 21 Dec 13, 2022
This action sets up Supabase CLI on GitHub's hosted Actions runners.

⚙️ Supabase CLI Action About This action sets up the Supabase CLI, supabase, on GitHub's hosted Actions runners. This action can be run on ubuntu-late

Supabase 26 Jan 5, 2023
Node.js Open CLI Framework. Built with 💜 by Heroku.

oclif: Node.JS Open CLI Framework ?? Description ?? Getting Started Tutorial ✨ Features ?? Requirements ?? CLI Types ?? Usage ?? Examples ?? Commands

oclif 8k Jan 4, 2023
Detect npm packages by author name in your package-lock.json or yarn.lock.

detect-package-by-author Detect npm packages by author name in your package-lock.json or yarn.lock. Install Install with npm: # Not Yet Publish # npm

azu 2 Jan 11, 2022
Detects which package manager (bun, pnpm, yarn, npm) is used.

@skarab/detect-package-manager Detects which package manager (bun, pnpm, yarn, npm) is used based on the current working directory. Features Support p

null 5 Sep 3, 2022
⚡️The Fullstack React Framework — built on Next.js

The Fullstack React Framework "Zero-API" Data Layer — Built on Next.js — Inspired by Ruby on Rails Read the Documentation “Zero-API” data layer lets y

⚡️Blitz 12.5k Jan 4, 2023
Bys is an npm/yarn library to merge your js and ts files into one file.

Bundle your scripts (bys) Bys is an npm/yarn library to merge your js and ts files into one file. Installation Use the npm or yarn package manager to

FlamesX128 3 Dec 8, 2022
Get packages from a monorepo (pnpm, yarn, npm, lerna)

?? You can help the author become a full-time open-source maintainer by sponsoring him on GitHub. @egoist/get-packages Get packages from a monorepo (p

EGOIST 45 Jun 1, 2022
Package fetcher is a bot messenger which gather npm packages by uploading either a json file (package.json) or a picture representing package.json. To continue...

package-fetcher Ce projet contient un boilerplate pour un bot messenger et l'executable Windows ngrok qui va permettre de créer un tunnel https pour c

AILI Fida Aliotti Christino 2 Mar 29, 2022
A small tool to help you check package duplicates in `yarn.lock`

Yarn Duplicate A small tool to help you check duplicate package and package size in yarn.lock. Usage Change to your project root folder, which have a

Cam Song 14 Aug 11, 2021