There's now an API for mainlin... Note