Private apm registries


I’m just wondering if it’s planned to support private apm registries in future to be able to host private atom packages. There are various solutions for npm to do so and also setting a private npm registry in the .apmrc worked fine so far but I’m not sure if it’s possible to host also the atom packages on a private server.

Actually the main use case I’ve in mind is not hosting private packages but to put a atom registry proxy in between to reduce outgoing connections :smile:


There was a link at one point to the apm API on the page. I’m not sure if the link is still there and I’m missing it or what. I’m digging into it.

The intent of publishing the apm API, though, is to allow others to put up their own Atom package repositories (or proxies).

Filed an Issue to track this:


Awesome, thanks a lot! Looking forward to have a look on the apm API. But good to know that generally it’s possible to put up an own apm registry :thumbsup:


The document is available in the atom/atom repository, just not on the docs site:


Great, looks good so far :smile: Is there some config property in the .atomrc which would allow me to change to a private registry (just as npm’s registry property)?

Also I’m a bit curious about reasoning behind the decision to shell out Atom to apm rather than using the API. I have a smiliar decision to make so it would be great if I could get some background information regarding that.


My understanding is basically “why write the code twice”? They probably started with the apm tool and then later when they were adding the functionality to the Atom UI, they already had a tool to do it why reinvent the wheel?

Also, having a command-line tool for package actions allows other people to easily write scripts and such to do automatic package maintenance.


Regarding the reuse of code, I actually liked the idea to directly require() such a tool like apm in Atom, Grunt, Gulp, … etc. to avoid this shell wrapper code. But sure you’d always need to provide also a CLI to allow none Node based scripts to automate stuff. Anyhow thanks for your feedback but I guess my questions are a bit too off topic at this place :blush: I’ll dig a bit into the apm code and maybe I find my answer there.


I personally do all apm stuff in my terminal. I find it faster and easier than using the Atom settings. And I’m not a terminal nut. (grin)


Not off-topic, just that barring a visit from the Atom developers the folks here don’t necessarily know the motivations or reasoning of the Atom core team for specific decisions. We can talk all day about, “What do you think is better X or Y?” though :grinning:


Looks like you could download from a private registry by declaring an environment variable like:
env ATOM_API_URL= apm install private-pkg-foo

From atom/apm:

  getNodeUrl: ->
    process.env.ATOM_NODE_URL ? ''

  getAtomPackagesUrl: ->
    process.env.ATOM_PACKAGES_URL ? "#{@getAtomApiUrl()}/packages"

  getAtomApiUrl: ->
    process.env.ATOM_API_URL ? ''

  getNodeVersion: ->
    process.env.ATOM_NODE_VERSION ? '0.22.0'