# Unknown Command: "library" Particle CLI

**URL:** <https://community.particle.io/t/unknown-command-library-particle-cli/34685>\
**Category:** General\
**Created:** [July 21, 2017, 3:04pm UTC](https://community.particle.io/t/unknown-command-library-particle-cli/34685 "2017-07-21T15:04:49Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![IOTrav](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/iotrav/32/7707_2.png) [@IOTrav](https://community.particle.io/u/IOTrav)\
**Post date:** [July 21, 2017, 3:04pm UTC](https://community.particle.io/t/unknown-command-library-particle-cli/34685/1 "2017-07-21T15:04:49Z")

</div>

So I had a library that was public. Tried to share an application with another user but Build threw the error that I was including Libraries that were not public. Seems a library I had under Community Libraries was no longer public. I have not messed with public libraries since the recent change.

Found out I needed to use the CLI which is perfectly cool with me. I updated my CLI as I had not done so in a while but it does not recognize the library command:

```
Traviss-MacBook-Pro:~ travis$ particle library list
particle: Unknown command: "library"

```

Running on mac. Version of Particle CLI appears to be 0.1.4

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [July 21, 2017, 8:13pm UTC](https://community.particle.io/t/unknown-command-library-particle-cli/34685/2 "2017-07-21T20:13:34Z")

</div>

😂 where did you get that ol’ version from

Current version of CLI is 1.23.1

Maybe uninstall all instances of CLI and then do a fresh install.

To tell appearance from reality, you can check the version via

```auto
particle --version

```

What lib are you looking for, we can check whether it’s public or not

---

<div class="post-metadata">

**Author:** ![IOTrav](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/iotrav/32/7707_2.png) [@IOTrav](https://community.particle.io/u/IOTrav)\
**Post date:** [July 21, 2017, 9:50pm UTC](https://community.particle.io/t/unknown-command-library-particle-cli/34685/3 "2017-07-21T21:50:56Z")

</div>

Crap, sorry. I ran a version check on npm not the library(what an idiot). particle cli version is 1.17.2 I just ran an npm update this morning so I guess that’s the latest roll out for Mac on npm?

Library is NCD2Relay

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [July 22, 2017, 5:41am UTC](https://community.particle.io/t/unknown-command-library-particle-cli/34685/4 "2017-07-22T05:41:58Z")

</div>

I can see NCD2Relay v0.0.7

---

<div class="post-metadata">

**Author:** ![IOTrav](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/iotrav/32/7707_2.png) [@IOTrav](https://community.particle.io/u/IOTrav)\
**Post date:** [July 24, 2017, 2:22pm UTC](https://community.particle.io/t/unknown-command-library-particle-cli/34685/5 "2017-07-24T14:22:35Z")

</div>

Strange. I am getting an error when trying to Share Revision on Build. The NCD2Relay library is showing up in my Library repo as 1.0.8 Since it is my library I cannot pull up the on listed under Community Libraries on Build(really wish that were not the case). Any ideas on what to do here?

![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/f/f2e5d778d10c29f94a3cf7b020085e14693c554b.png)

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [July 24, 2017, 2:37pm UTC](https://community.particle.io/t/unknown-command-library-particle-cli/34685/6 "2017-07-24T14:37:41Z")

</div>

If you want to publish it you could try `particle library publish` (with a CLI v1.20.0 or higher) from within the library folder where the `library.properties` file lives.

But the lib _has to_ comply the libraries v2.0 standard.

To check my personal libraries as seen by the public, I have a secondondary account.

---

<div class="post-metadata">

**Author:** ![IOTrav](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/iotrav/32/7707_2.png) [@IOTrav](https://community.particle.io/u/IOTrav)\
**Post date:** [July 24, 2017, 3:21pm UTC](https://community.particle.io/t/unknown-command-library-particle-cli/34685/7 "2017-07-24T15:21:25Z")

</div>

I ran `npm update -g particle-cli` Friday and today but the latest I can get is 1.17.2 What gives? Is it because I’m on Mac? Not sure that would be OS dependent or not since it’s Node JS(npm). At this point I have no way to maintain public libraries on Mac since you can’t do it through Build or Dev.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [July 24, 2017, 3:57pm UTC](https://community.particle.io/t/unknown-command-library-particle-cli/34685/8 "2017-07-24T15:57:44Z")

</div>

It seems you have got multiple instances of CLI installed.  
You update one but run another.

That's why I earlier said

> [@ScruffR](#):
>
> Maybe uninstall all instances of CLI and then do a fresh install.

After you once did

```plaintext
sudo npm uninstall -g particle-cli
sudo npm uninstall particle-cli

```

and after that try to run `particle --version` again.  
Only when you get a not-found message run

```plaintext
sudo npm install -g particle-cli

```

---

<div class="post-metadata">

**Author:** ![IOTrav](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/iotrav/32/7707_2.png) [@IOTrav](https://community.particle.io/u/IOTrav)\
**Post date:** [July 24, 2017, 4:36pm UTC](https://community.particle.io/t/unknown-command-library-particle-cli/34685/9 "2017-07-24T16:36:00Z")

</div>

Thanks man. What is that -g flag just out of curiosity? I’ve got 1.23.1 installed now. Tried looking for npm -g flag on google but didn’t see anything on first glance.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [July 24, 2017, 4:40pm UTC](https://community.particle.io/t/unknown-command-library-particle-cli/34685/10 "2017-07-24T16:40:06Z")

</div>

`-g` stands for _global_ - without it the package would be downloaded and installed in the local directory you execute that command, hence multiple instances could exist and you’d see different versions start depending on where you run it from.

---

<div class="post-metadata">

**Author:** ![IOTrav](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/iotrav/32/7707_2.png) [@IOTrav](https://community.particle.io/u/IOTrav)\
**Post date:** [July 24, 2017, 6:04pm UTC](https://community.particle.io/t/unknown-command-library-particle-cli/34685/11 "2017-07-24T18:04:42Z")

</div>

Great thanks @ScruffR
