japm

A package manager in C with a curses interface, for the small tools that the main package manager does not have.

category
# systems
status
archived
active
2022-03 → 2024-03 · 363 commits
made
■ hand · all commits before I used agents
numbers
● 12 stars (live)
stack
c · ncurses · sqlite · json-c · curl · rust (rewrite)
links
github ↗rust rewrite ↗
timeline
·················

What it does

japm ("just another package manager") installs small programs, usually tools from indie developers on GitHub. Your main package manager keeps the large software. japm keeps the small tools separate, so you can manage them in one place.

It has a curses interface with progress bars. It also works as a normal command-line tool.

fig. 01 · japm 2.1.0 · 2023

How it works

A package is a JSON file in a remote repository. The official repository is japm-official-packages. Other developers can add packages there with a pull request.

A package file has:

  • A name, a version and a description.
  • The dependencies and the build dependencies.
  • The files to download, with their URLs.
  • The shell commands for pre-install, install and removal.

japm resolves the dependencies, downloads the files with curl and runs the commands. It records the installed packages in a local SQLite database. When you remove a package, japm refuses if other packages depend on it. A flag removes the dependents too.

The commands are install, remove, update, search and list.

Versions

  • 1.0.0 on 2022-04-12, in C.
  • 2.0.0 to 2.3.2 in May 2023. Seven releases in four days.
  • In 2024, I started a rewrite in Rust, japm-rs. It stopped after five weeks. rndr started one week later.

What I learned

I built japm to understand dependency graphs. Years later, DistroPack solved the other side of the same problem: how to build the packages for the real package managers.