Generate commands that add node_modules/.bin to PATH

Overview

npx-bin-helper

Crates.io

Generate commands that add node_modules/.bin to PATH. Supports Linux, MacOS and Windows.

Installation

cargo install npx-bin-helper

Usage

npx-bin-helper -s <SHELL>

This will generate commands to set environment variables depending on your shell type.

Currently npx-bin-helper supports the following shells:

  • bash (Including Git Bash on Windows)
  • zsh
  • fish
  • powershell (Windows, MacOS, Linux)

For example:

npx-bin-helper -s bash

Output:

export _NPX_BIN="/path/to/project/node_modules/.bin"
export PATH="/path/to/project/node_modules/.bin:..."

To generate and evaluate commands automatically when changing directory, you need to set up your shell.

Shell setup

Bash

Add the following to .bashrc

eval "$(npx-bin-helper setup -s bash)"

Zsh

Add the following to .zshrc

eval "$(npx-bin-helper setup -s zsh)"

Fish

Create ~/.config/fish/conf.d/npx-bin-helper.fish and add the following to it

npx-bin-helper setup -s fish | source

PowerShell

Add the following to your profile

npx-bin-helper setup -s pwsh | Out-String | Invoke-Expression

License

MIT

References

You might also like...
The official CLI for FlakeHub: search for flakes, and add new inputs to your Nix flake.

fh, the official FlakeHub CLI fh is a scrappy CLI for searching FlakeHub and adding new inputs to your Nix flakes. Usage Using fh from FlakeHub: nix s

A small unix and windows lib to search for executables in PATH folders.

A small unix and windows lib to search for executables in path folders.

A command-line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the returned URL.
A command-line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the returned URL.

Pup A command line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the return

Jump Point Search Implementation for Path Finding, in Rust

jps : Jump Point Search in Rust. Jump Point Search Algorithm Implementation in Rust. Current implementation status JPS Implementation 3D case ✅ Lifeti

A path-normalization pentesting tool.

pathbuster A path-normalization pentesting tool Todos • Installation • Usage • Examples • Contributing • License • Join Discord Todos Implement --filt

lace up GFA files using panSN path name sub-ranges to coordinate the lacing

gfalace gfalace is a Rust-based tool designed to process a collection of GFA (Graphical Fragment Assembly) files. It aims to interpret the path names

Turn static CLI commands into TUIs with ease
Turn static CLI commands into TUIs with ease

lazycli Turn static CLI commands into TUIs with ease Demo: Usage Pick a command that spits out either a list or table of content, like ls, docker ps,

🐢 Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands
🐢 Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands

Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands. Additionally, it provides optional and fully encrypted synchronisation of your history between machines, via an Atuin server.

🤖 just is a handy way to save and run project-specific commands.

just just is a handy way to save and run project-specific commands. (非官方中文文档,这里,快看过来!) Commands, called recipes, are stored in a file called justfile

Comments
  • Configure Renovate

    Configure Renovate

    Mend Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • Cargo.toml (cargo)

    Configuration Summary

    Based on the default config's presets, Renovate will:

    • Start dependency updates only once this onboarding PR is merged
    • Enable Renovate Dependency Dashboard creation.
    • If Renovate detects semantic commits, it will use semantic commit type fix for dependencies and chore for all others.
    • Ignore node_modules, bower_components, vendor and various test/tests directories.
    • Autodetect whether to pin dependencies or maintain ranges.
    • Rate limit PR creation to a maximum of two per hour.
    • Limit to maximum 10 open PRs at any time.
    • Group known monorepo packages together.
    • Use curated list of recommended non-monorepo package groupings.
    • A collection of workarounds for known problems with packages.
    • Preserve (but continue to upgrade) any existing SemVer ranges.
    • Schedule daily.
    • Run Renovate on following schedule: before 2am

    🔡 Would you like to change the way Renovate is upgrading your dependencies? Simply edit the renovate.json in this branch with your custom config and the list of Pull Requests in the "What to Expect" section below will be updated the next time Renovate runs.


    What to Expect

    It looks like your repository dependencies are already up-to-date and no Pull Requests will be necessary right away.


    ❓ Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by Mend Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 0
Owner
Yumeoto Zorin
"🅆🄷🄴🅁🄴 🄰🄼 🄸?"
Yumeoto Zorin
A mini paste bin and url shortener written in rust without databases.

pb Build $ cargo build --release Environment Variables PB_DATA: /some/path (Default: ./pb_data) PB_SITE: Url of your site. (Default: http://localhost:

Edward P 5 Jul 26, 2022
Encrypt any C# binary or bin file

RC4_Encryptor A quick-build Encryptor for C# binaries and raw shellcode using RC4 encryption, combined with a "Loader" for enhanced obfuscation. By de

C2Pain 4 Sep 9, 2024
Workflows make it easy to browse, search, execute and share commands (or a series of commands)--without needing to leave your terminal.

Workflows The repo for all public Workflows that appear within Warp and within commands.dev. To learn how to create local or repository workflows, see

Warp 369 Jan 2, 2023
Workflows make it easy to browse, search, execute and share commands (or a series of commands)--without needing to leave your terminal.

Workflows The repo for all public Workflows that appear within Warp and within commands.dev. To learn how to create local or repository workflows, see

Warp 227 Jun 1, 2022
Add CLI & form interface to your program

Add CLI & form interface to your program

null 292 Nov 4, 2022
Simple CLI to (add, delete, update, create) i18n translation file 🔤 🦀

, Inrs Simple CLI to (add, delete, update, create) i18n translation file Copyright (C) 2020-2022 TheAwiteb https://github.com/TheAwiteb/inrs This pr

TheAwiteb 4 Oct 4, 2022
This is a placeholder repository for Ludum Dare 52. We'll add more soon!

Ludum Dare 52 This is a placeholder repository for Ludum Dare 52. How to play TBD Developing Only Rust (edition 2021) is required to develop and build

Matan Lurey 4 Jan 9, 2023
A simple CLI utility to add rounded borders, padding, and shadows to images.

shadower a simple command-line utility to add rounded corners and shadows to images Installation From AUR paru -S shadower-git From source cargo build

Michał 5 Mar 16, 2023
Install a package with e.g. `hdn add pkgs.hello`

hdn: utility for updating home.nix Home Manager is great, but it's tedious to run home-manager edit, add your package to the file, and run home-manage

Fisher Sun 13 Jun 16, 2023
A CLI tool you can pipe code and then ask for changes, add documentation, etc, using the OpenAI API.

AiBro This is your own little coding bro, immersed in the world of AI, crypto, and all other types of over hyped tech trends. You can pipe it code and

Josh Bainbridge 5 Sep 5, 2023