14

I have installed github's editor atom into /Application. I now expected to have the command apm at my disposal to be able to install further packages. Yet:

$ apm
-bash: apm: command not found

How do I get the apm command?

4 Answers 4

23

By opening atom and going via Atom > Install Shell Commands you will get atom and apm commands.

Screenshot of menu to add commands

5
  • I've done this and still the command cannot be found in the terminal. Any ideas where it resides so I can modify my bash file?
    – kakubei
    Nov 16, 2015 at 10:22
  • @kakubei $ which apm gives me /usr/bin/apm, so there it should be.
    – k0pernikus
    Nov 24, 2015 at 15:36
  • Thanks, I was getting nothing for which or whereis, etc.
    – kakubei
    Nov 25, 2015 at 15:41
  • doesn't work for me Sep 12, 2016 at 16:45
  • Try: "sudo apm help" Nothing else worked for me
    – Sentry.co
    Jan 26, 2017 at 13:39
3

Atom->Install Shell Commands would install atom and apm commands.

1

After the Shell Commands installation:

  1. MacOSX: Open Terminal and run the "sudo apm install package-name"

  2. Windows: Open CMD as administrator and run the "apm install package-name"

1
  • "sudo apm install package-name" worked for me. Nothing else would.
    – Sentry.co
    Jan 26, 2017 at 13:38
1

In addition to other answers', if you are using Atom Beta and shell commands don't work, pay attention to the names of the installed commands:

enter image description here

It's not apm, it's apm-beta!

The last step is to create an alias in ZSH (or similar way in other shell), edit .zshrc adding a new line:

alias apm=apm-beta

Of course, ensure "normal" Atom is not installed to prevent clashes. After this, apm should work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .