jpm
jpm - JinaOS Package Manager
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
Features
- 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
Installation
On JinaOS
sudo wget -O /usr/bin/jpm https://mirror.jinaos.org/bin/jpm sudo chmod +x /usr/bin/jpm
From source
git clone https://gitlab.com/jinaos/jpm cd jpm crystal build --release --static src/jpm.cr -o jpm sudo cp jpm /usr/bin/
Commands
| 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 |
Remove options
| Option | Description |
|---|---|
| --purge | Remove configuration files |
| --recursive, -r | Also remove orphaned dependencies |
| --auto, -a | Remove without detailed output |
Examples
Update package list
jpm update
Install a package
jpm install gcc
Install with dependencies
jpm install build-essential
Remove a package
jpm remove gcc
Remove and purge config files
jpm remove gcc --purge
Remove package and unused dependencies
jpm remove gcc --recursive
Remove all orphaned packages
jpm autoremove
Search for packages
jpm search compiler
List installed packages
jpm list
Show package details
jpm show python
Clean cache older than 30 days
jpm clean 30
Show cache stats
jpm cache-stats
Environment Variables
| 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 |
Package Format (.jin)
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 files
metadata.jin format
name: gcc version: 13.2.0 depends: binutils, libc description: GNU C compiler
Directory Structure
/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
Building from Source
Requirements
- Crystal 1.0 or higher
- Static linking (musl recommended for ARM64)
Build commands
x86_64
crystal build --release --static src/jpm.cr -o jpm
ARM64 (cross-compile)
crystal build --release --static --target aarch64-linux-musl src/jpm.cr -o jpm
Strip binary
strip jpm
Test
crystal spec
Mirror Setup
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:
name version dependencies description
gcc 13.2.0 binutils,libc GNU C compiler python 3.11.0 - Python programming language make 4.4 - Build automation tool
License
MIT License
Author
JinaOS Team team@jinaos.org
Repository
jpm
- 0
- 0
- 0
- 0
- 0
- about 1 hour ago
- May 29, 2026
Fri, 29 May 2026 20:13:25 GMT