jpm is the package manager for JinaOS, designed for slow networks, limited storage, and ARM64 phones.
pls consider visiting the main gitlab repo to submit pr/mr repo
- Resumable downloads (network drops? continues where it stopped)
- Multi-connection downloads (up to 8 parallel connections)
- SHA256 checksum verification
- Local cache with automatic cleanup
- Dependency installation
- Orphan package removal
- Static binary (no runtime dependencies)
- Works on ARM64 and x86_64
sudo wget -O /usr/bin/jpm https://mirror.jinaos.org/bin/jpm sudo chmod +x /usr/bin/jpm
git clone https://gitlab.com/jinaos/jpm cd jpm crystal build --release --static src/jpm.cr -o jpm sudo cp jpm /usr/bin/
| Command | Description |
|---|---|
| jpm install | Install a package |
| jpm remove | Remove a package |
| jpm autoremove | Remove orphaned packages |
| jpm update | Update package list from mirror |
| jpm upgrade | Upgrade all installed packages |
| jpm search | Search for packages |
| jpm list | List installed packages |
| jpm show | Show package details |
| jpm clean [days] | Clean cache older than N days |
| jpm cache-stats | Show cache statistics |
| Option | Description |
|---|---|
| --purge | Remove configuration files |
| --recursive, -r | Also remove orphaned dependencies |
| --auto, -a | Remove without detailed output |
jpm update
jpm install gcc
jpm install build-essential
jpm remove gcc
jpm remove gcc --purge
jpm remove gcc --recursive
jpm autoremove
jpm search compiler
jpm list
jpm show python
jpm clean 30
jpm cache-stats
| Variable | Default | Description |
|---|---|---|
| JPM_CACHE_DIR | /var/cache/jpm | Package cache directory |
| JPM_MIRROR | https://mirror.jinaos.org | Package mirror URL |
| JPM_MAX_CONNECTIONS | 4 | Parallel download connections |
A .jin package is a tar.gz archive with a metadata.jin file:
package.jin
├── metadata.jin # Package metadata
├── usr/bin/ # Binaries
├── usr/lib/ # Libraries
└── etc/ # Config filesname: gcc version: 13.2.0 depends: binutils, libc description: GNU C compiler
/var/cache/jpm/ # Package cache
├── packages.txt # Package list from mirror
└── *.jin # Cached packages
/var/lib/jpm/ # Database
├── installed/ # Empty files for installed packages
└── versions/ # Version numbers- Crystal 1.0 or higher
- Static linking (musl recommended for ARM64)
crystal build --release --static src/jpm.cr -o jpm
crystal build --release --static --target aarch64-linux-musl src/jpm.cr -o jpm
strip jpm
crystal spec
To run your own jpm mirror:
- Create a directory with packages.txt and .jin files
- Generate SHA256 checksums
- Serve over HTTP/HTTPS
Example packages.txt format:
gcc 13.2.0 binutils,libc GNU C compiler python 3.11.0 - Python programming language make 4.4 - Build automation tool
MIT License
JinaOS Team team@jinaos.org