New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hacknow

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hacknow

Utility for automation of project directories and switching workspaces based on the GitHub directory structure - `User/Project`

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

HackNow

Utility for automation of project directories and switching workspaces based on the GitHub directory structure - User/Project

Functionality

  • Directory structure: <projects-dir>/<user>/<repo>
  • Checks if a directory for the specified repo exists
  • No: Clones github repo into new directory
  • Yes: Does git fetch --all for this repo
  • Then changes into the project directory

Getting started

Available on npm:

npm i -g hacknow

Shell function

If you want your shell to switch into the project directory, you need to create a small function inside your shell config (.bashrc, .zshrc or similar)

hn() {
  PROJECTPATH=$(hacknow "$@")
  RETVAL=$?
  cd $PROJECTPATH
  return $RETVAL
}

Choose a different alias if hn doesn't work for you.

Please note: On failure hacknow will echo just . to stdout, so it should be safe to call cd on it in every situation.

Usage

hacknow <user>/<repo> # Plain (without dir change)
hn <user>/<repo> # Needs a shell function (see above)
cd $(hacknow <user>/<repo>) # Alternative if the shell function does not work for you

Options

-d|--project-dir <dir>    Choose base directory for your projects (default: $HOME)
--ssh                     Use ssh protocol for git remote

Examples

$ hn mraerino/gitmoji
$ hn mraerino/hacknow -d ~/src
$ hn festify/app --ssh

Ideas / Roadmap

  • Bash completion
  • Execute scripts inside project directory (like nvm, virtualenv, yarn install, IDE launch...)

FAQs

Package last updated on 04 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc