Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Idea: npm install githubUser/repo #2846

devinrhode2 opened this Issue Oct 1, 2012 · 3 comments


None yet
2 participants

Just a shortened version ofnpm install git://github.com/visionmedia/express.gittonpm install visionmedia/express

The/would be detected and expanded to the github git url.

It also makes it easier for forks to get traction, and for users to try out various forks.


isaacs commented Oct 3, 2012

Sure, sounds fine to me. Wanna try a patch?

The way to do this would be to dig into lib/cache.js. There's a bit in there where it checks for git-ness of the url. The key would be to differentiate between x/y as a folder at ./x/y and if the folder doesn't exist, then try to install git://github.com/x/y instead.

Also, maybe doing x/y@commit-ish or x/y#commit-ish should check out the associated commit/tag/branch? What do you think?

Thanks for the guidance.

I think the@is definitely more natural for npm's api over#, which would then directly be changed to#for the git-url


For the record, implemented here: bfcd368

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment