Search code examples
sublimetextsublime-text-pluginpackage-control

Is it possible to host Package Control for Sublime Text locally?


We have a development network that does not connect to the Internet. Sublime Text is one of the editors we use the most. Is it possible to run Package Control locally? I realize we would lose the benefits of automatic updates; however I'm mainly interested in the ease and convenience of a central package repository and just saying 'package install' to install new packages.

Has anyone done anything like this?


Solution

  • A Package Control channel needs to be served via HTTP, but that doesn't keep you from hosting it locally.

    1. Create a JSON file for the packages you want to host locally (see example-repository.json)
    2. Host your repository.json on your preferred web-server
    3. In Sublime Text, choose "Package Control: Add repository" from the command palette and add the URL to your locally hosted JSON

    Note: Package Control offers no way to remove the default repository, so you might have to block (or redirect) it.

    Regarding locally hosted packages, you would also host them locally and write their URLs to your repository.json.

    Another option for hosting packages might be the redirection of all URLs in the default repository to their locally hosted counterparts, but that's probably more tricky to manage.