---
title: 应用迁移命令行
description: "应用迁移工具属于鲲鹏DevKit的扩展工具之一，支持在x86和鲲鹏平台运行，提供VS Code插件、Web、命令行等多种使用形态，其中命令行工具支持以下功能："
url: https://www.hikunpeng.com/document/detail/zh/nativedevp/twp/Kunpeng_Development_0044.html
sourcePath: /source/zh/nativedevp/twp/Kunpeng_Development_0044.html
indexId: 39ff2adc767211089b70eb10e22fc419dc3a39ceeebfd207543dad8983eb1e0155
---
# 应用迁移命令行

应用迁移工具属于鲲鹏DevKit的扩展工具之一，支持在x86和鲲鹏平台运行，提供VS Code插件、Web、命令行等多种使用形态，其中命令行工具支持以下功能：

- 源码迁移：检查分析C/C++/ASM/Fortran/解释型语言等源码文件，定位出需要迁移的代码并给出迁移指导，支持迁移编辑及一键代码替换功能。
- 软件迁移评估：自动扫描并分析软件包（非源码包）、已安装的软件，提供可迁移性评估报告。

用户可在CI/CD流水线中集成应用迁移工具命令行，可拦截不适配鲲鹏服务器的代码。

应用迁移命令行详细操作步骤请参见《Kunpeng DevKit 源码迁移 用户指南》中的源码迁移（CLI）(https://www.hikunpeng.com/document/detail/zh/kunpengdevps/portingadvisor/sourcecodeporting/KunpengDevKitCli_0013.html)和《Kunpeng DevKit 软件迁移评估 用户指南》中的软件迁移评估（CLI）(https://www.hikunpeng.com/document/detail/zh/kunpengdevps/portingadvisor/softwareportingassessment/KunpengDevKitCli_0010.html)。

#### 软件迁移评估

软件迁移评估帮助用户分析用户x86环境上软件包安装路径中的SO库文件，并检查这些文件与鲲鹏平台的兼容性。

命令格式：

```
devkit porting pkg-mig {-i INPUT_PATH | --input INPUT_PATH} [-o OUTPUT_PATH | --output OUTPUT_PATH] [-r {all,json,html,csv} | --report-type {all,json,html,csv}] [-l {0,1,2,3} | --log-level {0,1,2,3}] [--set-timeout TIMEOUT] [-t,--target-os target-os]
```


#### 源码迁移

源码迁移功能分析用户C/C++/ASM/Fortran/Go/解释型语言软件的可迁移性。

命令格式：

```
devkit porting src-mig {-i INPUT_PATH | --input INPUT_PATH} {-c 'command' | --cmd 'command'} [-s {c|c++|asm|fortran|go| interpreted}* | --source-type {c|c++|asm|fortran|go| interpreted}*] [-t target_os | --target-os target_os] [-p compiler_version | --compiler compiler_version] [-f  fortran-compiler-version | --fortran-compiler fortran-compiler-version] [-o OUTPUT_PATH | --output OUTPUT_PATH] [-b {make,cmake,automake,go} | --build-tool {make,cmake,automake,go}] [-r {all,json,html,csv} | --report-type {all,json,html,csv}] [-l {0,1,2,3} | --log-level {0,1,2,3}] [--set-timeout TIMEOUT] [--ignore ignore_file] [--macro MACRO] [--keep-going {True,False}] [--ignore-path IGNORE_PATH]
```
