一个用于jamf-pro补丁定义管理的命令行工具。
patchlib的Python项目详细描述
patchcli
一个命令行工具,用于生成jamf pro补丁定义、补丁更新, 以及与补丁服务器和communitypatch api的内置集成。
警告:此工具正在进行活动开发,并且cli界面和 功能将在更新之间频繁更改。
安装
patchcli可以从python包索引安装:
$ pip install patchlib
patchlib模块包含patchcli命令。
关于
基本用法
$ patchcli -h usage: patchcli [-h] [-v] [-P PROFILE] {patch,validate,api,create_profile} ... PatchCLI is a command line tool for Jamf Pro patch definition management. Global Options: -h, --help show this help message and exit -v, --version Display version information. -P PROFILE, --profile PROFILE The Patch API profile name to use. Commands: patch Create a new definition JSON file validate Validate an existing definition JSON file. api Perform quick interactions with the Patch APIs. create_profile Create a profile to use the Patch API integrations.
补丁命令
$ patchcli patch -h usage: patchcli patch [-h] [-o <output_dir>] [-p <publisher_name>] [-n <name>] [-e <ext_att_path>] [--app-version <version>] [--min-sys-version <version>] [--patch-only] path positional arguments: path Path to the application optional arguments: -h, --help show this help message and exit -o <output_dir>, --output <output_dir> Directory path to write JSON file -p <publisher_name>, --publisher <publisher_name> Provide publisher name for a full definition -n <name>, --name <name> Provide the display name for a full definition -e <ext_att_path>, --extension-attribute <ext_att_path> Path to a script to include as an extension attribute * You can include multiple extension attribute arguments --app-version <version> Provide the version of the app (override CFBundleShortVersionString) --min-sys-version <version> Provide the minimum supported version fo macOS for this app (e.g. 10.9) --patch-only Only create a patch, not a full definition
验证命令
$ patchcli validate -h usage: patchcli validate [-h] [-p] path positional arguments: path Path to the definition JSON file. optional arguments: -h, --help show this help message and exit -p, --patch Validate a patch, not a full definition.
API命令
$ patchcli api -h
usage: patchcli api [-h] {list_titles,get_title} ...
optional arguments:
-h, --help show this help message and exit
API Commands:
list_titles List available software titles
get_title Get a software title definition
修补API配置文件
$ patchcli create_profile -h usage: patchcli create_profile [-h] [-n <profile_name>] [-t <api_token>] (--ps <patch_server_url> | --cp | --cpb) [--overwrite] optional arguments: -h, --help show this help message and exit -n <profile_name>, --name <profile_name> Profile name -t <api_token>, --token <api_token> The API token --ps <patch_server_url>, --patch-server <patch_server_url> The URL to a local Patch Server instance --cp, --community-patch Use the Community Patch service --cpb, --community-patch-beta Use the Beta Community Patch service --overwrite Overwrite an existing profile of the same name.
patchlib
导入并使用修补程序服务器和communitypatch的api客户端。
历史记录
版本
0.3.0(2018-10-31)
添加了api和create_profile命令。新选项允许基本API访问 使用命令行界面,并将展开以包含更多功能和 直接集成到patch命令中。
0.2.2(2018-10-29)
修复了阻止通过pip安装的setup.py问题。
0.2.1(2018-10-29)
自述输入错误。
0.2.0(2018-10-27)
更新了cli界面以使用子命令。所有以前的功能 patchstarter.py脚本已移动到patch命令中。
添加了允许用户执行架构验证的validate命令 在上载到修补程序之前手动创建/编辑定义文件 服务器。
0.1.0(2018-10-25)
存储库设置。端口现有的PasChaseT.Py功能。