CLIKit User Guide
CLIKit signs, notarizes and staples your Mac app and packages it as a DMG or PKG, all from Terminal. It uses the same engine as DMGKit, so a DMG made with CLIKit looks exactly like one exported from DMGKit, including your Designer templates.
CLIKit is free.
What you need
- A Mac running macOS 14.6 or later
- An Apple Developer Program membership
- A Developer ID Application certificate installed in your keychain (signs your app and DMG)
- Optional: a Developer ID Installer certificate (only needed to notarize PKG files)
- Xcode or the Xcode Command Line Tools. If you don't have either, run:
xcode-select --install
Install
- From DMGKit: Launch DMGKit > Settings > CLIKit
- Direct download: https://dmgkit.app/CLIKit/CLIKit.dmg
Check that it worked:
clikit --version
You should see CLIKit 1.0.0.
Your settings are stored in ~/.config/clikit/.
First-time setup
Run:
clikit setup
CLIKit asks a few short questions. Press Return to accept the value shown in brackets.
- DMGKit settings - if DMGKit is installed and set up on this Mac, CLIKit offers to reuse its signing identity, notarization profile and preferences. Answer
yto copy them. - Developer ID Application - pick your certificate from the list.
- Developer ID Installer - pick it if you plan to make PKG files, or choose None.
- Notarization credentials - choose one:
- An existing keychain profile - type its name.
- Create a keychain profile now - enter your Apple ID email and Team ID. Apple's
notarytoolthen asks for an app-specific password, which you create at account.apple.com under Sign-In and Security, App-Specific Passwords. CLIKit never sees or stores your password. - An App Store Connect API key - give the path to your
AuthKey_XXXX.p8file, the key ID and the issuer ID (leave the issuer empty for individual keys). - Don't notarize.
- Default output - DMG or PKG.
- DMG window size - compact (960 × 600), small, balanced, large or standard (1600 × 1000).
- Deep signature verification and notarize the app bundle first - optional extras.
CLIKit checks your credentials with Apple before saving.
When it's done, check everything at any time with:
clikit doctor
Your first release
1. Prepare a folder
Create a folder named after your release, for example MyApp, and put inside it:
| File | Required | What it does |
|---|---|---|
MyApp.app (or a .zip containing it) | Yes | The app to release |
A .dkt Designer template from DMGKit | No | The DMG uses your design. Without one, the DMG uses the standard DMGKit style. |
| License documents (see below) | No | Shown as an agreement before the DMG opens, or on the License page of the PKG |
clikit.json | No | Settings for this project only |
2. Preview what will happen
clikit start ~/Releases/MyApp --dry-run
Nothing is changed. CLIKit lists the app, template, license documents and output it found, and the steps it will run.
3. Build
clikit start ~/Releases/MyApp
CLIKit then:
- Copies your app into a temporary workspace (your original app is never changed)
- Signs the app
- Builds the DMG (or PKG)
- Signs, notarizes and staples it with Apple (this can take a few minutes)
- Checks signing, notarization and stapling
The result is saved in the same folder as MyApp.dmg. If every check passes, you're ready to ship.
You can also run clikit start from inside the folder with no path at all.
Making a PKG instead of a DMG
clikit start ~/Releases/MyApp --format pkg
The PKG installs your app into /Applications by default, and users can choose another location. Notarizing a PKG requires a Developer ID Installer certificate.
Using your DMGKit design
- In DMGKit, design your DMG background in the Designer and save it as a template (
.dkt). - Put the
.dktfile in your release folder. - Run
clikit start. The DMG uses your background, pill colors and label styling.
Use a specific template with --template path/to/file.dkt, or ignore one in the folder with --no-template.
License agreements
Put your documents in the release folder. Most common formats work: RTF, RTFD, Word (.docx, .doc), OpenDocument (.odt), HTML, Markdown, plain text and PDF.
The file name decides which section a document becomes:
| Name contains | Section |
|---|---|
| privacy | Privacy Policy |
| terms, conditions, tos | Terms & Conditions |
| eula, license, licence, legal, agreement | License Agreement |
Examples: legal.rtf, MyApp License.pdf, privacy-policy.md, Terms and Conditions.docx.
Translations: add a language code at the end of the name, for example eula_fr-FR.pdf or privacy_de-DE.rtf. Files without a code are English. An English version is required; other languages are added when present.
Supported language codes: en-US, en-GB, ar, zh-Hans, zh-Hant, nl, fr-FR, de-DE, hi, id, it-IT, ja, ko, pl, pt-BR, ru, es-ES, th, tr, uk, vi.
To build without the agreement, add --no-license.
All commands
| Command | What it does |
|---|---|
clikit start [folder] | Build, sign, notarize and staple a release |
clikit verify <file> | Check signing, notarization and stapling of an .app, .dmg or .pkg |
clikit inspect <file> | Full trust report for a .dmg or .pkg: signing, Gatekeeper, notarization, contents and installer scripts |
clikit doctor [folder] | Check tools, certificates and credentials, and show every setting and where it comes from |
clikit setup | Save your certificates, notarization credentials and defaults |
clikit help [topic] | Help for any command, plus clikit help config and clikit help exit-codes |
clikit --version | Show the installed version |
Commands and options never need capital letters.
Options for clikit start
Output
| Option | What it does |
|---|---|
-o, --output <path> | Folder or file for the result (default: the release folder) |
--name <name> | File name without extension (default: the folder name) |
-f, --format dmg|pkg | What to build (default: dmg) |
--overwrite | Replace an existing file |
--dry-run | Show the plan without changing anything |
Signing and notarization
| Option | What it does |
|---|---|
--identity <name> | Developer ID Application certificate to use |
--installer-identity <name> | Developer ID Installer certificate (PKG) |
--profile <name> | notarytool keychain profile |
--key <file.p8> --key-id <id> --issuer <uuid> | App Store Connect API key |
--no-sign | Don't sign (also requires --no-notarize) |
--no-notarize | Build and sign only |
--notarize-app | Also notarize and staple the app itself before packaging |
--deep | Deep, strict signature verification after signing |
DMG layout
| Option | What it does |
|---|---|
--template <file.dkt> / --no-template | Choose or ignore a Designer template |
--window compact|small|balanced|large|standard | Window size (default: compact, 960 × 600) |
--arrow <SF Symbol name> | Arrow between the app and Applications (default: arrow.right) |
--reversed | Put Applications on the left |
--app <name> | Pick the app when the folder contains several |
--no-license | Ignore license documents |
--modern / --legacy | Disk image tools to use (modern requires macOS 27 or later) |
Output style (all commands)
| Option | What it does |
|---|---|
-v, --verbose | Show every step and the output of Apple's tools |
-q, --quiet | Only results and errors |
--json | Machine-readable output (JSON lines) |
--no-color | Plain text |
-y, --yes | Never ask questions (also replaces existing files) |
Changing your settings later
Run the questions again. Every answer starts on your current choice, so you only change what you need:
clikit setup
Or change one setting directly:
clikit setup --format pkg
clikit setup --profile my-other-profile
clikit setup --identity "Developer ID Application: Your Name (TEAMID)"
clikit setup --key ~/Keys/AuthKey_ABC123.p8 --key-id ABC123 --issuer YOUR-ISSUER-ID
clikit setup --create-profile new-notary --apple-id you@example.com --team-id TEAMID
clikit setup --window balanced
| Command | What it does |
|---|---|
clikit setup --show | Show your saved settings |
clikit setup --import-dmgkit | Copy DMGKit's settings again |
clikit setup --reset | Delete your saved settings |
To change something for one build only, add the option to clikit start, for example clikit start --format pkg.
Where settings come from
When the same setting is set in more than one place, CLIKit uses the first one found in this order:
- Options on the command line
- Environment variables
- A
clikit.jsonfile in the release folder - Your saved setup (
~/.config/clikit/config.json) - Built-in defaults
clikit doctor shows the value of every setting and where it came from.
Example clikit.json:
{
"format": "pkg",
"window": "balanced",
"deepVerify": true
}
Available settings:
| Setting | Environment variable | Meaning |
|---|---|---|
| identity | CLIKIT_IDENTITY | Developer ID Application |
| installerIdentity | CLIKIT_INSTALLER_IDENTITY | Developer ID Installer |
| keychainProfile | CLIKIT_KEYCHAIN_PROFILE | notarytool keychain profile |
| apiKeyPath | CLIKIT_API_KEY_PATH | API key file (.p8) |
| apiKeyID | CLIKIT_API_KEY_ID | API key ID |
| apiIssuer | CLIKIT_API_ISSUER | API issuer ID |
| format | CLIKIT_FORMAT | dmg or pkg |
| output | CLIKIT_OUTPUT | Output folder or file |
| window | CLIKIT_WINDOW | DMG window size |
| arrow | CLIKIT_ARROW | DMG arrow symbol |
| sign | CLIKIT_SIGN | true or false |
| notarize | CLIKIT_NOTARIZE | true or false |
| notarizeApp | CLIKIT_NOTARIZE_APP | true or false |
| deepVerify | CLIKIT_DEEP | true or false |
| modernDiskTools | CLIKIT_MODERN_DISK_TOOLS | true or false |
| reversed | CLIKIT_REVERSED | true or false |
Your secrets stay safe: passwords live only in your keychain and API keys only in their .p8 file. CLIKit never writes them to its settings or shows them in its output.
Automation and CI
CLIKit works over SSH, in CI and in scripts:
- It never opens windows, uses Finder or asks questions when there's no interactive Terminal.
- Progress goes to stderr; only the path of the finished file goes to stdout:
DMG=$(clikit start ./release --yes)
--jsonprints machine-readable events and a final summary.- Credentials can come from environment variables. For example, with an API key:
export CLIKIT_IDENTITY="Developer ID Application: Your Name (TEAMID)"
export CLIKIT_API_KEY_PATH="$HOME/keys/AuthKey_ABC123.p8"
export CLIKIT_API_KEY_ID="ABC123"
export CLIKIT_API_ISSUER="your-issuer-id"
clikit start ./release --yes --json
- Press Ctrl-C at any time. CLIKit stops cleanly, removes its temporary files and leaves no disk images mounted.
Exit codes
Every result has its own exit code, so scripts know exactly what happened:
| Code | Meaning |
|---|---|
| 0 | Everything requested succeeded |
| 1 | Unexpected error |
| 2 | Invalid command, option or argument |
| 3 | Setup missing or invalid |
| 4 | Certificate or notarization credentials missing or rejected |
| 5 | Problem with the folder, app, template or output file |
| 10 | Code signing failed |
| 11 | Notarization failed |
| 12 | Stapling failed |
| 13 | Building the DMG or PKG failed |
| 14 | A check did not pass |
| 20 | A step took too long and was stopped |
| 130 | Cancelled |
Checking any file
clikit verify MyApp.dmg
clikit verify MyApp.app --deep
clikit inspect MyApp.pkg
verify gives a quick pass or fail for signing, notarization and stapling. inspect gives the full report with a trust score, just like DMGKit's Reports screen.
Troubleshooting
"CLIKit is not set up yet"
Run clikit setup, or pass your certificate and credentials as options.
"The signing identity was not found in your keychain"
Open Keychain Access and check that your Developer ID Application certificate is installed under My Certificates. clikit doctor lists the certificates CLIKit can see.
"Apple did not accept these credentials"
Your keychain profile name or API key is wrong or expired. Run clikit setup and choose new credentials.
"No .app or .zip was found"
Put your exported app in the folder, or pass its path directly: clikit start ~/Desktop/MyApp.app.
"More than one app" or "more than one template"
Choose one with --app <name> or --template <file>.
"already exists"
Add --overwrite, or choose another --name or --output.
The license agreement doesn't appear
Check that the file name contains privacy, terms, eula, license, legal or agreement, and that there's an English version. clikit start shows which documents it found next to "License agreement:".
Notarization takes a long time
That's normal. Apple's service can take from a minute to over an hour. Add --verbose to see what's happening.
Still stuck?
Run the command again with --verbose and send the output to Fuse Labs Support.