Offline system for repository

TODO: make automatic updates of repo.json