It was already open-source `https://github.com/anomalyco/opencode`