Blaze - a better package manager banner

Blaze - a better package manager

8 devlogs
6h 50m 41s

Blaze is a secure, decentralized, fast and awesome package manager for people who like to shower

This project uses AI

Used Github Copilot for coding

Demo Repository

Loading README...

cooldevcoding

Shipped this project!

Hours: 6.84
Cookies: 🍪 102
Multiplier: 14.9 cookies/hr

I built an archive (zip/tar.gz) based package manager in Go! it can add packages, remove them, switch between version. It automatically handles the path updating and cleans them up if you run cleanup. The hardest part in this project was creating the adding function since many times the JSON handling broke. but also the cleanup part was hard because one time i nuked my whole registry so I had to play around with that. I am very proud of how fast it is but it is due to Go’s excellency then my skill lmao

cooldevcoding

Forget the site - just read the readme

Ok I am too lazy to implement the site so if this project gets a lot of cookies then i am going to make a site and also improve this! For now you can use the readme as documentation. I am very proud of this not gonna lie

Attachment
0
cooldevcoding

Use works now!

Now you can easily switch between packages (e.g from gh 2.87.2 to 2.87.3 and so on) also cleanup wasn’t cleaning up the left over folders properly so I fixed that and also now I am ready to ship the first release, finally write the README and also make the github repository public. After that I wil start writing the website

Attachment
0
cooldevcoding

Definetly not finished

After thourghly testing I noticed that a lot of stuff breaks sometimes. So here is what I have done in the last 3 hours:

  1. Added a manifest generator: Simple thing but it makes my life easier then just rawdogging json everytime.
  2. Made cleanup remove empty directories: The thing was cleanup removes dead paths but now it also removes empty directories
  3. Now “use” kinda works: so basically you can switch package versions now and then but like I am not sure and it hasn’t been tested very well yet
Attachment
Attachment
0
cooldevcoding

Almost finished?

I implemented tons of features like removing, listing and cleanup. The main problem I was encountering was that the handler was selecting the first version at the top instead of the one for the OS itself. also I somehow broke the SHA256 checker so I also fixed that pf.
I will finish up the remaining parts and edge cases (e.g Registry corruption) and then I will release the right binaries for the windows and linux systems (idk if it will work on macos). After that I will start making the website for blaze with documentation and troubleshooting and stuff yk

Attachment
0
cooldevcoding

Adding functionality!

It can actually add stuff now! I mean real stuff which get added to the enviroment variables once it’s downloaded. I have also implemented remove and listing and switching which are a bit wonky tbh and I also have to work on edge case.
So the plan for now is to implement better command support and handle dge cases, then package it and work on docs! Below u can see the add implementation

Attachment
0
cooldevcoding

I am switching over to Go because Zig is getting to complicated for me. Also cross compilation Go is very easy, you don’t even need an extra laptop with macos or a vm with linux to get binaries for both platforms. Here is an Image showing how my tests are passing! so this should work now. As of know I am still working on making the add feature actually good, like removing failed installs and so on. so basically i will probably work on getting an mvp like removing, resolving version conflicts and stuff i mentioned in earlier devlogs. Also I wil prob start to like devlog more often

Attachment
0
cooldevcoding

WIP!: Implementing add function!

So right now I am defining the JSON manifest on how it should look like! so basically the add function should parse all the input fields and look at the json for invalid data and so on so it can “sanatize it for the next step. The Manifest itself should contain direct “ZIP” links for diffrerent OSes yk? I think the whole JSON should contain the following:
Name, Version, Decription, Tags, Author, Code Repo (if existent), respective links to different OS packages, SHA256, and other stuff that like tells where the bin is or smthing. Below you will see the blaze add command will look like

Attachment
0
cooldevcoding

Feature Planning and techstack

So I layed out the core concept of the whole thing and also worked on how the system would work (will be changed in the future).
So basically you have the package manager itself. It will be written in Zig for speed and safety and because I don’t trust C. Also most of the C libraries will work fine in Zig (yes zig is c compatible!). So the idea is that the User will type in “blaze add https://coolpkg.com/coolpkg.json” and then the package manager will read the json to like learn about the package and then set it up for the system. After that it will add that to the enviroment variables. lets dive a bit deeper:

Adding packages

you just add it with: “blaze add https://coolpkg.com/coolpkg.json”. The cool thing about this json will be something that points to the portable version of the app and this means that it won’t require admin rights such as MSI’s mostly do. Also we will be prob implementing SHA256 verification and also raise flags for non http downloads.

Dependency resolution

I am thinking more of like an thing where we basically copy nvm-style where you can specify:
“blaze use [email protected]” or something like that so we basically install a copy of the thing yk?

Removing

This is pretty straightforward ngl, you just “blaze remove node” and boom! If you have multiple stuff it says: “You have multiple versions of ! Please specify via appname@version or use –all to remove all!” and problem solved.

Storage.

Nothing fancy. It’s all stored in a json, because i feel and sqlite database is overkill for something like this.

Size

Size matters. Since I am using Zig i am not worried about size

Plans

Right now I will prob setup the Zig project and also get on with creating cli args

Attachment
0