mihomo-updater
v0.1.0
Published
Updater for mihomo
Readme
mihomo-updater
An updater API designed to simplify the process of downloading Mihomo files.
Install
npm install -D mihomo-updaterUasage
import { getCore, getCoreLatestVersion, getGeo } from "mihomo-updater";
import { arch, platform } from "node:process";
const dest = "path/to/store/files";
// Download the latest version of mihomo
const alpha = false;
const version = await getCoreLatestVersion(alpha);
await getCore(platform, arch, version, alpha).saveTo(dest);
// Download mmdb and rename it to 'country.mmdb'
await getGeo("mmdb", () => "country.mmdb").saveTo(dest);