{"id":44135296,"url":"https://github.com/ohosvscode/image-manager","last_synced_at":"2026-03-02T04:14:03.783Z","repository":{"id":337040615,"uuid":"1150151221","full_name":"ohosvscode/image-manager","owner":"ohosvscode","description":"💿 OpenHarmony/HarmonyOS qemu image manager. 鸿蒙模拟器镜像列表获取/镜像下载部署器 ⬇️ 通过编程式TypeScript API下载、管理和部署模拟器镜像 ❤️ 支持 Windows / MacOS 🍎","archived":false,"fork":false,"pushed_at":"2026-02-25T16:21:21.000Z","size":182,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-25T20:14:58.001Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ohosvscode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-05T00:04:22.000Z","updated_at":"2026-02-25T16:21:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ohosvscode/image-manager","commit_stats":null,"previous_names":["ohosvscode/image-manager"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/ohosvscode/image-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohosvscode%2Fimage-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohosvscode%2Fimage-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohosvscode%2Fimage-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohosvscode%2Fimage-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohosvscode","download_url":"https://codeload.github.com/ohosvscode/image-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohosvscode%2Fimage-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29991301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-08T23:14:22.377Z","updated_at":"2026-03-02T04:14:03.779Z","avatar_url":"https://github.com/ohosvscode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @arkts/image-manager\n\nOpenHarmony/HarmonyOS qemu image manager.\n\n## Usage\n\n```ts\nimport { createImageManager, RequestUrlError } from '@arkts/image-manager'\n\nasync function main() {\n  const imageManager = createImageManager({ /** options */ })\n\n  // Get all local and remote images\n  const images = await imageManager.getImages()\n  console.log(images)\n\n  // We choice the first image to deploy\n  const image = images[0]\n  // Download the image\n  const downloader = await image.createDownloader()\n  if (downloader instanceof RequestUrlError)\n    return console.error(downloader)\n\n  // Listen to the download and extract progress\n  downloader.on('download-progress', progress =\u003e console.warn(progress))\n  downloader.on('extract-progress', progress =\u003e console.warn(progress))\n\n  // Start download\n  await downloader.startDownload()\n\n  // When the download is complete, we can check the checksum\n  const checksum = await downloader.checkChecksum()\n  console.warn(`Checksum: ${checksum}`)\n  if (!checksum)\n    return console.error('Checksum is not valid')\n\n  // Start extract the image\n  await downloader.extract()\n\n  // Clean the download cache\n  await downloader.clean()\n\n  // Start to deploy the image\n  // We must find the product config item if you don't want to customize the deployed image options,\n  // like `screenWidth`, `screenHeight`, `screenDiagonal`, `screenDensity`, etc.\n  const productConfig = await image.getProductConfig()\n  const mateBookFold = productConfig.find(item =\u003e item.name === 'MateBook Fold')\n  if (!mateBookFold)\n    throw new Error('MateBook Fold not found')\n\n  // Create the deployer\n  const device = image.createDevice('MateBook Fold', createDeployedImageConfig(image))\n    .setCpuNumber(4)\n    .setMemoryRamSize(4096)\n    .setDataDiskSize(6144)\n\n  // We can get the final deployed image options,\n  // it will be written to the `imageBasePath/lists.json` file when deployed.\n  const list = await device.buildList()\n  console.warn(list)\n\n  // We can get the `config.ini` object,\n  // it will be written to the `deployedPath/MateBook Fold/config.ini` file when deployed.\n  const config = await device.buildIni()\n  console.warn(config)\n  // You also can get the `config.ini` string version:\n  const iniString = await device.toIniString()\n  console.warn(iniString)\n\n  // Deploy the device\n  await device.deploy()\n  console.warn('Image deployed successfully')\n\n  // Start the emulator\n  await image.start(device)\n\n  await new Promise\u003cvoid\u003e(resolve =\u003e setTimeout(resolve, 1000 * 60))\n  // Stop the emulator\n  image.stop(device)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohosvscode%2Fimage-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohosvscode%2Fimage-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohosvscode%2Fimage-manager/lists"}