Skip to content

deploymenttheory/go-cli-jamfpro

jamfpro

A focused command-line tool for Jamf Pro administrators. It targets the high-value daily workflows — device lookup, group membership, policy auditing, script management, package uploading, prestage assignment, and API credential auditing — rather than the full API surface.

jamfpro computers get MacBook-Pro-123
jamfpro policies list
jamfpro packages upload MyApp-1.2.3.pkg
jamfpro shell

Contents


Installation

Homebrew (recommended)

brew tap deploymenttheory/tools
brew install jamfpro

Build from source

Requires Go 1.21+.

git clone https://github.com/deploymenttheory/go-cli-jamfpro.git
cd go-cli-jamfpro
go build -o jamfpro .

Configuration

All credentials can be supplied as flags, environment variables, or a config file. Precedence (highest to lowest): flag → env var → config file → default.

Environment variables

export JAMFPRO_INSTANCE="https://myorg.jamfcloud.com"
export JAMFPRO_CLIENT_ID="your-client-id"
export JAMFPRO_CLIENT_SECRET="your-client-secret"

Config file

Default path: ~/.config/jamfpro/config.yaml

instance: https://myorg.jamfcloud.com
client-id: your-client-id
client-secret: your-client-secret
output: table
timeout: 30

Override the path with --config /path/to/config.yaml.

OAuth2 API role

The API client needs an API role with at minimum:

Permission Required for
Read Computers computers list/get/search
Read Computer Groups computers groups
Read Policies policies list/get
Read Scripts scripts list/get
Read Packages, Create Packages, Update Packages packages list/upload
Read Computer PreStage Enrollments, Update Computer PreStage Enrollments prestages computer
Read Mobile Device PreStage Enrollments prestages mobile list
Read Jamf Pro User Accounts, Read API Roles, Read API Integrations admin
Read Jamf Pro Information info, auth test

Commands

Command Description Docs
computers list All computers
computers get <id|serial|name> Full detail for one computer
computers search <query> Free-text inventory search
computers groups list All computer groups (smart + static)
computers groups members <group> Members of a specific group
policies list All policies with enabled/disabled status
policies get <id|name> Full policy detail including scope
scripts list All scripts
scripts get <id|name> Script body and metadata
packages list All packages
packages upload [path] Upload a package with TUI progress
prestages computer list Computer prestages
prestages computer assign <serial> <id> Assign serial to prestage
prestages mobile list Mobile device prestages
admin accounts list Admin accounts with roles
admin api-roles list API roles with privilege counts
admin api-integrations list OAuth2 API integrations
info Server version and health
auth test Verify credentials and token expiry
shell Interactive TUI shell

Output formats

The --output flag controls rendering. Default is auto: table in a TTY, JSON when piped.

# Human-readable table (default in terminal)
jamfpro computers list

# JSON — pipe to jq
jamfpro computers list --output json | jq '.[].name'

# CSV
jamfpro computers list --output csv > computers.csv

Global flags

Flag Env var Default Description
--instance JAMFPRO_INSTANCE Jamf Pro base URL
--client-id JAMFPRO_CLIENT_ID OAuth2 client ID
--client-secret JAMFPRO_CLIENT_SECRET OAuth2 client secret
--output JAMFPRO_OUTPUT auto table, json, csv, or auto
--no-color NO_COLOR false Disable ANSI colour
--quiet / -q false Suppress non-essential output
--timeout JAMFPRO_TIMEOUT 30 Request timeout in seconds
--config ~/.config/jamfpro/config.yaml Config file path

Contributing

See CONTRIBUTING.md.

License

See LICENSE.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages