SkillAgentSearch skills...

Imei

IMEI - ImageMagick Easy Install

Install / Use

npx skills add SoftCreatR/imei

Installs into whichever agent you are using.

README

<div align=center>

IMEI - ImageMagick Easy Install

Signed ImageMagick .deb packages for Debian and Ubuntu, with pre-built releases and local package builds.

Release Packages CI GitHub release GitHub license Plant Tree Installs

Codacy grade CodeFactor Grade

</div>

What IMEI Does

IMEI installs ImageMagick and selected delegate libraries as proper Debian packages instead of running make install directly on the target system.

That gives you two installation paths:

  • pre-built signed .deb packages for supported release targets
  • local package builds for older systems or custom build options

In both cases, the end result is still managed by apt / dpkg, so removal stays clean.

Why IMEI Exists

IMEI is meant to solve the two common problems with ad-hoc ImageMagick install scripts:

  • building everything on the target machine can take too long
  • hand-installed files are hard to remove cleanly later

IMEI keeps the convenience of an install script, but the actual installation happens through generated .deb packages.

Security Model

IMEI verifies signatures in two places by default:

  • the local imei.sh script verifies itself against imei.sh.sig
  • pre-built release installs verify signed release metadata before any .deb is installed

The release install path verifies:

  • release-manifest.env
  • SHA256SUMS
  • the downloaded package hashes listed in SHA256SUMS

IMEI supports key rotation through the files in keys/. New signatures can point to a specific public key by key id, while older signatures can still be preserved in the keyring.

Notes:

  • --no-sig-verify disables only installer self-verification and is intended for local development or recovery cases
  • self-update only trusts release bundles signed by a key that already exists in the local keyring
  • if you rotate to a brand-new key that is not yet trusted locally, one manual keyring refresh is still required once

Compatibility

Pre-built release assets are currently intended for these amd64 and arm64 targets:

  • Debian 11 (Bullseye)
  • Debian 12 (Bookworm)
  • Debian 13 (Trixie)
  • Ubuntu 20.04 (Focal Fossa)
  • Ubuntu 22.04 (Jammy Jellyfish)
  • Ubuntu 24.04 (Noble Numbat)
  • Ubuntu 26.04 (Resolute Raccoon)

Other Debian and Ubuntu systems, including Ubuntu non-LTS releases, or other architectures, can still use IMEI through local package builds.

Runtime Container

IMEI also publishes a small runtime container image built from the released ubuntu24.04 IMEI packages.

Image:

ghcr.io/softcreatr/imei-imagemagick:latest

Example:

docker run --rm ghcr.io/softcreatr/imei-imagemagick:latest -version

The container image is intentionally a secondary delivery format:

  • it uses one base target only: ubuntu24.04 (amd64 / arm64)
  • it is meant to provide the full ImageMagick 7 runtime in Dockerized environments, including longer-lived containers
  • the primary supported install path for host systems remains the signed .deb packages

Package Layout

IMEI currently builds and installs these packages:

  • imei-libaom
  • imei-libheif
  • imei-libjxl
  • imei-imagemagick

The private runtime stack is installed below /opt/imei.

imei-imagemagick exposes the CLI tools through /usr/bin, while the delegate libraries remain under /opt/imei so IMEI does not overwrite distro libaom, libheif, or libjxl packages.

Upgrade note:

  • older IMEI releases installed the ImageMagick commands under /usr/local/bin because they used a direct source install into /usr/local
  • the current default system install is package-managed, and Debian packages must not place managed files in /usr/local
  • existing automation that hard-codes /usr/local/bin/magick, /usr/local/bin/identify, or similar paths should be updated to use /usr/bin
  • if you need an isolated non-system prefix instead of /usr/bin, use --user-install

Default Behavior

Running sudo ./imei.sh does this:

  1. verifies the installer signature
  2. detects the local Debian/Ubuntu target
  3. checks whether a matching signed pre-built release exists
  4. installs pre-built packages when a match exists
  5. otherwise falls back to a local .deb build

This means supported current targets should normally use release assets, while older or customized installs automatically drop to the local build path.

Installation

The primary install path is the one-step bootstrap launcher:

t=$(mktemp) && \
wget 'https://dist.1-2.dev/imei.sh' -qO "$t" && \
bash "$t" && \
rm "$t"

Manual verification of the bootstrap launcher still works too:

wget https://dist.1-2.dev/imei.sh && \
wget https://dist.1-2.dev/imei.sh.sig && \
wget https://dist.1-2.dev/imei.sh.pem && \
openssl dgst -sha512 -verify imei.sh.pem -signature imei.sh.sig imei.sh

The bootstrap launcher first tries to fetch the signed IMEI runtime bundle from the release assets. If that bundle is unavailable, it falls back to the repository source tree on main, where IMEI then follows its normal behavior: use pre-built packages when available, otherwise build locally.

If you want to pass options through the one-step installer, append them after bash "$t":

t=$(mktemp) && \
wget 'https://dist.1-2.dev/imei.sh' -qO "$t" && \
bash "$t" --build-local && \
rm "$t"

Manual checkout install:

git clone https://github.com/SoftCreatR/imei && \
cd imei && \
chmod +x imei.sh && \
sudo ./imei.sh

Self-Update

To update the local IMEI checkout itself:

./imei.sh --self-update

This downloads the signed IMEI runtime bundle from the selected release and updates:

  • imei.sh
  • scripts/*
  • versions/*
  • the public keyring in keys/*

User Install Mode

IMEI also supports an unprivileged source-build mode for installation into a user-owned prefix.

Example:

./imei.sh --user-install

Default user prefix:

~/.local/imei

Custom user prefix:

./imei.sh --user-install --prefix "$HOME/.opt/imei"

User-install mode:

  • does not use apt or dpkg
  • does not install system-wide files under /usr/bin
  • does not provide package-managed removal
  • expects the required system build dependencies to already be installed

After installation:

. "$HOME/.local/imei/imei-env.sh"

Removal:

rm -rf "$HOME/.local/imei"

Pre-Built Release Commands

Install only from release assets and fail instead of building locally:

sudo ./imei.sh --prebuilt-only

Download release packages without installing them:

sudo ./imei.sh --download-only --keep-downloads

Install from a specific release tag:

sudo ./imei.sh --release-tag im-7.1.2-18_aom-3.13.2_heif-1.21.2_jxl-0.11.2

Test against a different release repository:

sudo ./imei.sh --github-repository SoftCreatR/imei-private-test

Local Build Commands

Force a local package build:

sudo ./imei.sh --build-local

Common examples:

sudo ./imei.sh --build-local --imagemagick-version 7.1.2-18
sudo ./imei.sh --build-local --aom-version 3.13.2
sudo ./imei.sh --build-local --libheif-version 1.21.2
sudo ./imei.sh --build-local --jpeg-xl-version 0.11.2
sudo ./imei.sh --build-local --imagemagick-quantum-depth 8
sudo ./imei.sh --build-local --imagemagick-opencl
sudo ./imei.sh --build-local --imagemagick-build-static
sudo ./imei.sh --build-local --imagemagick-with-magick-plus-plus
sudo ./imei.sh --build-local --imagemagick-with-perl
sudo ./imei.sh --build-local --disable-delegate raqm
sudo ./imei.sh --build-local --skip-jpeg-xl
sudo ./imei.sh --build-local --work-dir /tmp/imei-build
sudo ./imei.sh --build-local --output-dir /tmp/imei-dist
sudo ./imei.sh --build-local --keep-build-deps

PHP imagick

IMEI does not ship a separate php-imagick package. To make PHP use the IMEI ImageMagick installation, rebuild the imagick extension against /opt/imei.

Important notes:

  • the distro php-imagick package is usually built against the distro ImageMagick libraries, not IMEI
  • imagick uses MagickCore and MagickWand, not Magick++, so --imagemagick-with-magick-plus-plus is not required
  • after upgrading IMEI to a newer ImageMagick release, rebuild the PHP imagick extension too

Recommended path with PECL:

sudo apt install php-dev php-pear pkg-config
sudo apt remove php-imagick --purge || true
sudo pecl uninstall imagick || true
sudo pecl channel-update pecl.php.net

export PKG_CONFIG_PATH=/opt/imei/lib/pkgconfig
export CPPFLAGS="-I/opt/imei/include"
export LDFLAGS="-L/opt/imei/lib -Wl,-rpath,/opt/imei

Related Skills

View on GitHub
GitHub Stars368
CategoryDevelopment
Updated11d ago
Forks48

Languages

Shell

Security Score

100/100

Audited on Jul 28, 2026

No findings