Arm迁移优化CLI扩展

为Gemini CLI提供Arm架构迁移和性能优化的扩展工具,支持x86到Arm的代码迁移、热点优化和性能对比功能。

  • by arm
  • 本地部署
  • 6 星标
  • 更新于
在 GitHub 查看 arm/arm-mcp-gemini

使用说明

Arm MCP Gemini CLI扩展

此存储库包含一个Gemini CLI扩展,它添加了:

  • Arm MCP服务器Docker配置
  • 可重复使用的 /arm-migration x86到Arm迁移工作的自定义命令
  • 用于热点优化、完全优化和Arm-vs-x86比较工作流的可重用自定义命令
  • 项目根目录的安装时提示以及到达Arm Performix分析目标实例所需的SSH密钥材料

文件

  • gemini-extension.json:附带MCP服务器配置的Gemini CLI扩展清单
  • commands/arm-migration.toml:自定义斜线命令提示符
  • commands/arm-hotspots-optimization.toml:适合初学者的热点优化工作流程
  • commands/arm-full-optimization.toml:高级多配方优化工作流程
  • commands/arm-vs-x86-performance-comparison.toml:x86与Arm比较工作流程

MCP服务器配置

在安装过程中,Gemini CLI应提示:

  • Project Root Directory:指向用户项目源代码树根的绝对路径,而不是父工作区文件夹,除非项目本身位于其中
  • Arm Performix SSH Private Key:用于SSH到Arm Performix分析的目标实例的SSH私钥文件的绝对路径
  • Arm Performix SSH Known Hosts:通往的绝对路径 known_hosts SSHing进入Arm Performix分析的目标实例时使用的文件
{
  "name": "arm-mcp-gemini",
  "version": "1.1.0",
  "description": "Gemini CLI extension that adds the Arm MCP Server plus /arm-migration, /arm-hotspots-optimization, /arm-full-optimization, and /arm-vs-x86-performance-comparison workflow commands.",
  "settings": [
    {
      "name": "Project Directory",
      "description": "Absolute host path to the root directory of the project code you want mounted into the Arm MCP Server for running code scan.",
      "envVar": "ARM_MCP_PROJECT_ROOT",
      "sensitive": false
    },
    {
      "name": "Arm Performix SSH Private Key",
      "description": "Absolute host path to the SSH private key file used to SSH into the target instance for Arm Performix profiling.",
      "envVar": "ARM_MCP_SSH_PRIVATE_KEY",
      "sensitive": true
    },
    {
      "name": "Arm Performix SSH Known Hosts",
      "description": "Absolute host path to the known_hosts file used when SSHing into the target instance for Arm Performix profiling.",
      "envVar": "ARM_MCP_SSH_KNOWN_HOSTS",
      "sensitive": false
    }
  ],
  "mcpServers": {
    "arm_mcp_server": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "--pull=always",
        "-i",
        "-v",
        "${ARM_MCP_PROJECT_ROOT}:/workspace",
        "-v",
        "${ARM_MCP_SSH_PRIVATE_KEY}:/run/keys/ssh-key.pem:ro",
        "-v",
        "${ARM_MCP_SSH_KNOWN_HOSTS}:/run/keys/known_hosts:ro",
        "armlimited/arm-mcp:latest"
      ],
      "env": {},
      "timeout": 60000
    }
  }
}

命令

Gemini CLI从以下位置自动加载扩展命令 commands/ 目录,命令名从文件名导出。

在安装扩展且MCP配置处于活动状态后,使用以下命令:

  • /arm-migration:使用Arm MCP服务器将代码库从x86迁移到Arm
  • /arm-hotspots-optimization:引导初学者完成热点驱动的Arm调音
  • /arm-full-optimization:跨多个APX配方运行高级迭代优化工作流
  • /arm-vs-x86-performance-comparison:比较x86和Arm系统上的相同工作负载