Apm install cmd only install if not installed


#1

Looks like following command re-installs packages every time i run it.

apm install --packages-file myatompackages.js

Is there any way i can run apm install to check and install missing packages?

Or does it already do it? Doesn’t look like takes like 15 minutes for me to finish the command while all packages are already installed


#2

I’m having the same question and I’ve yet found the way to let it only install missing packages.

Could someone shed light on this issue?


#3

There is not currently a way built in to apm to install only missing packages. But here’s a quick shell script that will:

#!/bin/bash

$package = $1
if [[ ! -d "$HOME/.atom/packages/$package" ]]
then
    apm install $package
fi

#4

I ended up creating this npm CLI tool auto-apm to do this so it benefits everybody.

npm install -g auto-apm

Only install missing Atom packages and skip installed ones.

Usage: auto-apm [options]

Options:

  -h, --help                           output usage information
  -i, --install [pkg1,pkg2,pkg3,...]   a list of packages to install
  -p, --packages [packages_file.json]  a .json file containing a list of packages to install.

If -i is specified, it must be followed by a list of packages to install, seperated by
,:

auto-apm -i zen,minimap

If -p is specified, it must be followed by a JSON file containing a list of packages to
install:

['minimap', 'zen', 'autoflow']

If packages_file.json is omitted, it looks for ~/.auto-apm.packages.json.

When it runs, it looks like this:

screenshot