Unable to get 'particle' command to show in $PATH on El Capitan

I'm running the latest El Capitan beta, and I went ahead with the normal tutorial and ran:

npm install particle-cli

Now I can't seem to find 'particle' in my PATH. Just to help a bit, here is some output:

FlightyPro:~ tmcarr$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/usr/local/opt/go/libexec/bin:/Users/tmcarr/go/bin
FlightyPro:~ tmcarr$ npm remove particle-cli
unbuild particle-cli@1.6.9
FlightyPro:~ tmcarr$ npm -v
2.11.3
FlightyPro:~ tmcarr$ npm install particle-cli
npm WARN engine particle-cli@1.6.9: wanted: {"node":"^0.10.0"} (current: {"node":"0.12.7","npm":"2.11.3"})

> serialport@1.7.4 install /Users/tmcarr/node_modules/particle-cli/node_modules/serialport
> node-pre-gyp install --fallback-to-build

[serialport] Success: "/Users/tmcarr/node_modules/particle-cli/node_modules/serialport/build/serialport/v1.7.4/Release/node-v14-darwin-x64/serialport.node" is installed via remote
particle-cli@1.6.9 node_modules/particle-cli
├── cli-spinner@0.2.1
├── xtend@4.0.0
├── node-wifiscanner2@1.0.0
├── when@3.7.3
├── hogan.js@2.0.0
├── lodash@3.10.1
├── chalk@1.1.1 (supports-color@2.0.0, escape-string-regexp@1.0.3, ansi-styles@2.1.0, strip-ansi@3.0.0, has-ansi@2.0.0)
├── cli-table@0.3.1 (colors@1.0.3)
├── moment@2.10.6
├── glob@4.5.3 (inherits@2.0.1, inflight@1.0.4, once@1.3.2, minimatch@2.0.10)
├── inquirer@0.8.5 (figures@1.3.5, ansi-regex@1.1.1, cli-width@1.0.1, through@2.3.8, readline2@0.1.1, rx@2.5.3)
├── request@2.61.0 (aws-sign2@0.5.0, forever-agent@0.6.1, caseless@0.11.0, stringstream@0.0.4, oauth-sign@0.8.0, tunnel-agent@0.4.1, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, node-uuid@1.4.3, qs@4.0.0, tough-cookie@2.0.0, combined-stream@1.0.5, form-data@1.0.0-rc3, mime-types@2.1.5, http-signature@0.11.0, hawk@3.1.0, bl@1.0.0, har-validator@1.8.0)
├── softap-setup@1.1.4 (node-rsa@0.2.25, nconf@0.7.2)
└── serialport@1.7.4 (bindings@1.2.1, sf@0.1.7, async@0.9.0, nan@1.8.4, debug@2.2.0, optimist@0.6.1)

Looks like installing it with root works, though I’m not exactly happy with that:

FlightyPro:~ tmcarr$ sudo npm install -g particle-cli
Password:
npm WARN engine particle-cli@1.6.9: wanted: {"node":"^0.10.0"} (current: {"node":"0.12.7","npm":"2.11.3"})
-
> serialport@1.7.4 install /usr/local/lib/node_modules/particle-cli/node_modules/serialport
> node-pre-gyp install --fallback-to-build

[serialport] Success: "/usr/local/lib/node_modules/particle-cli/node_modules/serialport/build/serialport/v1.7.4/Release/node-v14-darwin-x64/serialport.node" is installed via remote
/usr/local/bin/particle -> /usr/local/lib/node_modules/particle-cli/bin/particle.js
particle-cli@1.6.9 /usr/local/lib/node_modules/particle-cli
├── cli-spinner@0.2.1
├── xtend@4.0.0
├── node-wifiscanner2@1.0.0
├── chalk@1.1.1 (escape-string-regexp@1.0.3, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0)
├── cli-table@0.3.1 (colors@1.0.3)
├── when@3.7.3
├── glob@4.5.3 (inherits@2.0.1, once@1.3.2, inflight@1.0.4, minimatch@2.0.10)
├── request@2.61.0 (aws-sign2@0.5.0, forever-agent@0.6.1, stringstream@0.0.4, caseless@0.11.0, tunnel-agent@0.4.1, oauth-sign@0.8.0, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, node-uuid@1.4.3, qs@4.0.0, combined-stream@1.0.5, form-data@1.0.0-rc3, mime-types@2.1.5, http-signature@0.11.0, bl@1.0.0, tough-cookie@2.0.0, hawk@3.1.0, har-validator@1.8.0)
├── hogan.js@2.0.0
├── lodash@3.10.1
├── moment@2.10.6
├── softap-setup@1.1.4 (nconf@0.7.2, node-rsa@0.2.25)
├── inquirer@0.8.5 (figures@1.3.5, ansi-regex@1.1.1, cli-width@1.0.1, through@2.3.8, readline2@0.1.1, rx@2.5.3)
└── serialport@1.7.4 (bindings@1.2.1, sf@0.1.7, async@0.9.0, nan@1.8.4, debug@2.2.0, optimist@0.6.1)
FlightyPro:~ tmcarr$ par <TAB-TAB>
par.pl       par5.16.pl   par5.18.pl   parl         parl5.16     parl5.18     parldyn      parldyn5.16  parldyn5.18  particle
FlightyPro:~ tmcarr$ particle help

Welcome to the Particle Command line utility!
https://github.com/spark/particle-cli

Usage: particle <command_name> <arguments>
Common Commands:

    setup, list, call, get, device, identify, flash, subscribe
    compile, monitor, login, logout, help

Less Common Commands:
    token, cloud, config, function, keys, serial, udp, update
    variable, webhook, wireless

For more information Run: particle help <command_name>

Hey, tmcarr.

I'm not sure if what you typed on your computer was this exact command, but npm install particle-cli doesn't install binaries into your $PATH. In order to get it put into your $PATH, you need to add the -g flag. It looks like you added the -g when you ran it as root, which would install the package globally (into your $PATH) as well as set the owner as root (which you probably don't want).

You could try this and see if it works: sudo npm uninstall -g particle-cli and then: npm install -g particle-cli.

I hope that helps!

Just closing the loop here, it worked great! Thanks!