{"id":47783891,"url":"https://github.com/jamf-concepts/jamf-cli","last_synced_at":"2026-05-31T08:00:51.622Z","repository":{"id":348847291,"uuid":"1152491149","full_name":"Jamf-Concepts/jamf-cli","owner":"Jamf-Concepts","description":"Unified CLI for the Jamf Platform","archived":false,"fork":false,"pushed_at":"2026-05-30T04:13:24.000Z","size":5292,"stargazers_count":47,"open_issues_count":11,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-30T06:14:29.674Z","etag":null,"topics":["api","cli","jamf","jamf-api","jamf-platform","jamf-pro","jamf-protect","jamf-school"],"latest_commit_sha":null,"homepage":"https://jamf-concepts.github.io/jamf-cli/","language":"Go","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/Jamf-Concepts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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-08T00:20:25.000Z","updated_at":"2026-05-30T04:13:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Jamf-Concepts/jamf-cli","commit_stats":null,"previous_names":["jamf-concepts/jamf-cli"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/Jamf-Concepts/jamf-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jamf-Concepts%2Fjamf-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jamf-Concepts%2Fjamf-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jamf-Concepts%2Fjamf-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jamf-Concepts%2Fjamf-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jamf-Concepts","download_url":"https://codeload.github.com/Jamf-Concepts/jamf-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jamf-Concepts%2Fjamf-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33723549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"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":["api","cli","jamf","jamf-api","jamf-platform","jamf-pro","jamf-protect","jamf-school"],"created_at":"2026-04-03T14:03:32.048Z","updated_at":"2026-05-31T08:00:51.616Z","avatar_url":"https://github.com/Jamf-Concepts.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jamf-cli\n\nUnified CLI for Jamf Platform API Gateway, Jamf Pro, Jamf Protect, and Jamf School. 1,200+ commands. Full API coverage. Zero clicks.\n\n**[Documentation Wiki](https://github.com/Jamf-Concepts/jamf-cli/wiki)** — full guides, configuration reference, and workflow recipes.\n\n**[Command Explorer](https://jamf-concepts.github.io/jamf-cli/)** — interactive showcase of every command, searchable and filterable. Press ⌘K (or Ctrl+K) for a fuzzy command palette. Auto-updated on every merge.\n\n![jamf-cli demo](docs/demo.gif)\n\n## Installation\n\n### Homebrew (macOS and Linux)\n\n```bash\nbrew install Jamf-Concepts/tap/jamf-cli\n```\n\n### Binary releases\n\nDownload from [GitHub Releases](https://github.com/Jamf-Concepts/jamf-cli/releases).\n\n### From source\n\n```bash\ngo install github.com/Jamf-Concepts/jamf-cli/cmd/jamf-cli@latest\n```\n\n## Quick Start\n\nFor interactive use, `jamf-cli pro setup` prompts for credentials so nothing is leaked to shell history, and stores them in the system keychain. Environment variables (`JAMF_CLIENT_ID`, `JAMF_CLIENT_SECRET`, etc.) are intended for automation workflows only — avoid setting them in interactive shells.\n\n### Jamf Pro\n\n```bash\n# One-time setup: prompts for credentials and stores them in the system keychain\njamf-cli pro setup --url https://jamf.company.com\n\n# Multi-instance setup (MSPs): bootstrap credentials for many instances at once\njamf-cli pro setup --from-file instances.txt --scope standard\n\n# Instance health dashboard\njamf-cli pro overview\n\n# List computers\njamf-cli pro comp list -o table\n\n# Extract just the names\njamf-cli pro comp list --field name\n\n# Export inventory\njamf-cli pro comp list -o csv --out-file inventory.csv\n\n# Show the JSON template for creating a building\njamf-cli pro buildings create --scaffold\n\n# Create or update a building by name (upsert)\necho '{\"name\":\"HQ\",\"streetAddress1\":\"1 Apple Park Way\"}' | jamf-cli pro buildings apply\n\n# Apply from a file without confirmation\njamf-cli pro buildings apply --from-file building.json --yes\n\n# Delete a building by name\njamf-cli pro buildings delete --name \"HQ\" --yes\n\n# Device actions by serial number\njamf-cli pro comp blank-push --serial C02X1234\njamf-cli pro comp redeploy-framework --serial C02X1234\njamf-cli pro comp erase --serial C02X1234 --yes\n\n# Device actions targeting a group\njamf-cli pro comp blank-push --group \"All Macs\" --yes\njamf-cli pro md unmanage --group \"Retired iPads\" --yes --confirm-destructive\n\n# Classic API MDM commands\njamf-cli pro comp lock --serial C02X1234 --yes --confirm-destructive\njamf-cli pro md update-inventory --id 42 --yes\n\n# Device deep-dive\njamf-cli pro device C02X1234\n\n# Fleet security report\njamf-cli pro report security -o table\n\n# Run a command against multiple instances\njamf-cli multi --filter 'pro-*' -- pro buildings apply --from-file building.json --yes\n```\n\n### Jamf Platform (via Gateway)\n\n```bash\n# List blueprints (DDM-based config delivery)\njamf-cli pro blueprints list -o table\n\n# Apply a blueprint by name (creates if new, replaces if existing)\njamf-cli pro blueprints apply --from-file passcode-policy.json\n\n# Compliance benchmarks: list and check device-level compliance\njamf-cli pro compliance-benchmarks list -o table\njamf-cli pro compliance-benchmarks device-results --name \"macOS CIS Level 1\"\n\n# Cross-product Platform device lookup (auto-detects serial vs UUID)\njamf-cli pro platform-devices get --serial C02X1234\n```\n\nSee the [Setup Guide](https://github.com/Jamf-Concepts/jamf-cli/wiki/Setup-Guide) for the full walkthrough.\n\n## Features\n\n### Jamf Pro\n\n- **Full API coverage** — Modern API (OpenAPI-generated) and Classic API (`/JSSResource/`) commands\n- **`overview`** — Instance dashboard with 37 parallel API calls: inventory, enrollment, MDM, alerts\n- **`scope`** — View, add to, and remove from scope on policies, config profiles, restricted software, and apps — no XML editing required\n- **Device actions** — Erase, remove MDM, redeploy framework, blank push, DDM sync, renew MDM, lock, enable/disable Remote Desktop (computers); erase, unmanage, restart, shutdown, update inventory (mobile devices). Target by serial number, name, ID, group, or file. Destructive bulk operations require `--confirm-destructive`\n- **`device`** — Aggregated device deep-dive: identity, hardware, OS, security posture, user info, MDM command history, policy logs\n- **`report security`** — Fleet security posture: FileVault, Gatekeeper, SIP, firewall rates, OS version distribution, flagged devices\n- **JCDS file ops** — Upload, download, sync, and list packages on the Jamf Cloud Distribution Service: `jamf-cli pro jcds upload`, `pro jcds download`, `pro jcds sync`, `pro jcds files`\n\n### Jamf Platform (via Gateway)\n\n- **Blueprints** — CRUD, deploy/undeploy, clone, scope management (add/remove device groups by name), component scaffolds, import Classic configuration profiles as blueprints with automatic DDM conversion (passcode policies, Safari settings, software update deferrals, RSR settings, software update preferences are promoted to native DDM components; `--legacy` to skip conversion)\n- **Compliance Benchmarks** — Benchmark CRUD, baselines, rules, device compliance results, stats\n- **Platform Devices** — Unified device inventory, actions (check-in, erase, restart, shutdown, unmanage)\n- **Platform Device Groups** — CRUD, membership management\n- **DDM Reports** — Device declaration status, declaration clients\n\n### Jamf Protect\n\n- **Full SDK coverage** — Plans, analytics, analytic sets, exception sets, USB control, telemetry, prevent lists, unified logging filters, roles, users, groups, API clients, and org settings\n- **`overview`** — Instance dashboard with 14 parallel API calls: endpoints, security config, data forwarding, access\n- **`apply`** — Idempotent upsert: creates or replaces resources by name, with confirmation. `--scaffold` prints an empty JSON template\n- **`export` / `import`** — Round-trip configuration as JSON or YAML. Plans and analytic sets use names (not IDs) for portability across tenants\n- **Community analytics** — Import YAML analytics from the [jamf/jamfprotect](https://github.com/jamf/jamfprotect) repository\n- **Downloads** — Installer packages, configuration profiles (.mobileconfig), and certificates\n- **Granular mutations** — Add/remove rules on USB control sets, analytics on sets, exceptions on sets\n\n### Jamf School\n\n- **Full coverage** — Devices, device groups, users, groups, classes, profiles, apps, locations, iBeacons, DEP devices\n- **`overview`** — Instance dashboard for the school environment\n- **Blueprints + DDM** — Same Platform-Gateway-backed Blueprints and DDM Reports as Jamf Pro, scoped to the school tenant\n- **`apply` upsert** — Idempotent name-based create-or-replace across every resource\n\n### Cross-product\n\n- **`--field`** — Extract a single field from any response: `jamf-cli pro comp list --field id`\n- **`apply`** — Name-based upsert: creates if new, replaces if existing (with confirmation)\n- **`patch`** — JSON Merge Patch (RFC 7386): update individual fields without a full replace. Use `--set key=value` for scalar fields or pipe a merge-patch document. Accepts `--name`, `--serial`, `--udid` (resource-dependent) in place of an ID. `--scaffold` prints the patchable field template\n- **`--name` flag** — `get`, `update`, `delete`, and `patch` commands all accept `--name` (and resource-specific alternates like `--serial`, `--udid`) in place of a positional ID\n- **`--scaffold`** — Print JSON templates for create/update commands with example values\n- **Five output formats** — `table`, `json`, `csv`, `yaml`, `plain`\n- **Auto-pagination** — `--all` fetches every page; `--limit` caps results\n- **Dry-run mode** — `--dry-run` previews writes without executing\n- **`--from-file` bulk operations** — `apply`, `delete`, and other write commands accept `--from-file \u003cpath\u003e` for newline-separated names or a CSV. Pair with `--yes` and `--confirm-destructive` for unattended bulk cleanup\n- **`multi`** — Run any command against multiple profiles: `jamf-cli multi --filter 'pro-*' -- pro comp list`. Supports glob patterns, file input (profile names or URLs), and interactive selection\n- **Destructive safeguards** — Delete and replace operations require `--yes` confirmation\n- **`setup`** — Bootstrap API roles and OAuth2 credentials from a username/password. Idempotent (safe to re-run): updates roles and integrations in place without rotating credentials. Use `--rotate-credentials` to explicitly regenerate secrets. Supports multi-instance setup via `--from-file` for MSPs\n- **System keychain** — Secrets stored via macOS Keychain or Linux secret-service\n- **Jamf Platform Gateway** — Route Jamf Pro through regional gateways with `--tenant-id`\n\n## Configuration\n\nConfig file: `~/.config/jamf-cli/config.yaml`\n\n```yaml\ndefault-profile: prod\ndefault-output: table\n\nprofiles:\n  prod:\n    url: https://jamf.company.com\n    auth-method: oauth2\n    client-id: abc123\n    client-secret: env:JAMF_PROD_SECRET\n\n  protect:\n    product: protect\n    url: https://tenant.protect.jamfcloud.com\n    auth-method: oauth2\n    client-id: keychain:jamf-cli/protect/client-id\n    client-secret: keychain:jamf-cli/protect/client-secret\n\n  # Platform Gateway auth (routes Jamf Pro through regional gateway)\n  platform-prod:\n    url: https://us.apigw.jamf.com\n    auth-method: platform\n    client-id: env:PLATFORM_CLIENT_ID\n    client-secret: env:PLATFORM_CLIENT_SECRET\n    tenant-id: e5b39e85-5ecd-4d40-9d13-02c7cf21c762\n```\n\nJamf Pro supports three auth methods: `oauth2`, `token`, and `platform`. Jamf Protect uses `oauth2` only. Three secret formats: `env:VAR`, `file:/path`, `keychain:service/account`.\n\n\u003e **Least privilege:** When creating API roles for use with jamf-cli, grant only the privileges required for the endpoints you need to access. Jamf Pro maps each API endpoint to a specific privilege — consult the [Privileges and Deprecations](https://developer.jamf.com/jamf-pro/docs/privileges-and-deprecations) reference to determine the minimum set of permissions for your workflow.\n\nSee the wiki for full details: [Configuration \u0026 Profiles](https://github.com/Jamf-Concepts/jamf-cli/wiki/Configuration-\u0026-Profiles) · [Secrets \u0026 Keychain](https://github.com/Jamf-Concepts/jamf-cli/wiki/Secrets-\u0026-Keychain)\n\n## Command Structure\n\nEach product has its own namespace:\n\n```bash\njamf-cli pro \u003ccommand\u003e [subcommand] [flags]       # Jamf Pro\njamf-cli protect \u003ccommand\u003e [subcommand] [flags]    # Jamf Protect\n```\n\n### Aliases\n\n| Product | Command | Alias |\n|---------|---------|-------|\n| Pro | `computers` | `comp` |\n| Pro | `mobile-devices` | `md` |\n| Pro | `scripts` | `scr` |\n| Pro | `buildings` | `bld` |\n| Pro | `categories` | `cat` |\n| Pro | `departments` | `dept` |\n| Pro | `device` | `dev` |\n| Pro | `blueprints` | `bp` |\n| Pro | `compliance-benchmarks` | `cb` |\n| Pro | `platform-devices` | `pdev` |\n| Pro | `platform-device-groups` | `pdg` |\n| Pro | `ddm-reports` | `ddm` |\n| Protect | `removable-storage-control-sets` | `rscs` |\n| Protect | `unified-logging-filters` | `ulf` |\n| Protect | `exception-sets` | `es` |\n| Protect | `analytic-sets` | `as` |\n| Protect | `action-configs` | `ac` |\n| Protect | `custom-prevent-lists` | `cpl` |\n| Protect | `api-clients` | `apic` |\n| Protect | `config-freeze` | `cf` |\n| Root | `config` | `cfg` |\n\nFull command catalog: [Command Reference](https://github.com/Jamf-Concepts/jamf-cli/wiki/Command-Reference) · [Output Formats](https://github.com/Jamf-Concepts/jamf-cli/wiki/Output-Formats) · [Common Workflows](https://github.com/Jamf-Concepts/jamf-cli/wiki/Common-Workflows)\n\n## Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| 0 | Success |\n| 1 | General error |\n| 2 | Invalid usage |\n| 3 | Authentication error |\n| 4 | Not found |\n| 5 | Permission denied |\n| 6 | Rate limited |\n\nSee [Error Handling \u0026 Exit Codes](https://github.com/Jamf-Concepts/jamf-cli/wiki/Error-Handling-\u0026-Exit-Codes) for structured JSON errors, retry logic, and scripting patterns.\n\n## Shell Completion\n\n```bash\njamf-cli completion install\n```\n\nSupports bash, zsh, fish, and PowerShell. See the [Setup Guide](https://github.com/Jamf-Concepts/jamf-cli/wiki/Setup-Guide#shell-completion) for manual installation.\n\n## Development\n\n```bash\nmake build       # Build binary\nmake test        # Run tests\nmake lint        # Lint code\nmake generate    # Generate commands from OpenAPI specs\n```\n\nSee [Architecture \u0026 Development](https://github.com/Jamf-Concepts/jamf-cli/wiki/Architecture-\u0026-Development) for project structure and contributing guidelines.\n\n\n## Troubleshooting\n\n### Debug output\n\nAdd `--verbose` (or `-v`) to any command to print HTTP request and response details to stderr:\n\n```bash\njamf-cli pro comp list --verbose\n```\n\nTo capture debug output to a file:\n\n```bash\njamf-cli pro comp list --verbose 2\u003edebug.log\n```\n\n### Authentication errors (exit code 3)\n\n- Run `jamf-cli pro setup` (or `jamf-cli protect setup`) to reconfigure credentials.\n- Verify the active profile with `jamf-cli config list`.\n- Check that env vars (`JAMF_CLIENT_ID`, `JAMF_CLIENT_SECRET`, `JAMF_URL`) are not overriding your config profile unintentionally.\n- For OAuth2, confirm the API client is enabled in Jamf Pro and has the required privileges.\n\n### Not found / permission errors (exit codes 4–5)\n\n- Confirm the resource exists: try a `list` command first.\n- Check that the API role has the minimum privileges for the endpoint. See [Privileges and Deprecations](https://developer.jamf.com/jamf-pro/docs/privileges-and-deprecations).\n\n### Rate limiting (exit code 6)\n\njamf-cli retries automatically with exponential backoff when rate-limited. If you're consistently hitting limits, add `--limit` to reduce page sizes or introduce delays between commands in scripts.\n\n### Previewing changes safely\n\nUse `--dry-run` (`-n`) to see what a write command would do without executing it:\n\n```bash\njamf-cli pro buildings apply --from-file building.json --dry-run\n```\n\n\n### Bugs and feature requests\n\nPlease file an issue in [GitHub Issues](https://github.com/Jamf-Concepts/jamf-cli/issues).\n\n\n## License\n\nCopyright (c) 2026 Jamf Software LLC.\n\nThis project is distributed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamf-concepts%2Fjamf-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamf-concepts%2Fjamf-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamf-concepts%2Fjamf-cli/lists"}