Skip to content

Akrobate/openscad-package-manager

Repository files navigation

OpenSCAD Package Manager (opm)

CI Build

Openscad dependencies manager wrotten in Go.

Online documentation

Openscad Package Manager (opm)

Download and install

Linux

curl -L -O https://github.com/Akrobate/openscad-package-manager/releases/download/0.0.2/opm_0.0.2_linux_amd64.tar.gz
tar xvf opm_0.0.2_linux_amd64.tar.gz
sudo mv opm /usr/local/bin/

Windows

Download https://github.com/Akrobate/openscad-package-manager/releases/download/0.0.2/opm_0.0.2_windows_amd64.tar.gz

Extract opm_0.0.2_windows_amd64.tar.gz

Usage

Init package file

opm init

Install a package

opm install
opm install https://gitlab.com/openscad-modules/housing.git
opm install https://gitlab.com/openscad-modules/housing.git#0.0.2
opm install https://gitlab.com/openscad-modules/housing.git#develop
opm install https://gitlab.com/openscad-modules/housing.git#5ebc661`,

Uninstall all packages

opm uninstall

List installed packages

opm list

Info about a package

opm info https://gitlab.com/openscad-modules/housing.git
Name: housing
Descrition: housing libraries helper
Latest commit: 5d18bef
Versions:
0.0.1	 https://gitlab.com/openscad-modules/housing.git#0.0.1
0.0.2	 https://gitlab.com/openscad-modules/housing.git#0.0.2
0.0.3	 https://gitlab.com/openscad-modules/housing.git#0.0.3
0.0.4	 https://gitlab.com/openscad-modules/housing.git#0.0.4
5d18bef	 https://gitlab.com/openscad-modules/housing.git#5d18bef

Package repository source list

https://raw.githubusercontent.com/Akrobate/openscad-package-manager/refs/heads/master/data/sources-list/akrobate.source-list.json

Développement

Requirements

  • Go 1.21 or newer

Build

go build -o opm

Build and add to bin

go build -o opm
sudo mv opm /usr/local/bin/

Developping

go build -o opm && sudo cp opm /usr/local/bin/

Testing

go test ./...

Coverage

go test -cover ./...
Generate html coverage
go test -coverprofile=coverage.out -coverpkg=./... ./...
go tool cover -html=coverage.out -o coverage.html

Architecture

  • cmd/: Commands CLI (install, uninstall, list, search)
  • pkg/manager/: Business rules of package management
  • internal/utils: Commons functions
  • main.go: Entry point

Roadmap @todo

  • Add renderer mecanic
    • Document anotating tags
    • create simple command for rendering
  • opm unistall should throw an error if no scad file in current folder
  • Info Read module's package scad.json file
  • Normalize tmp folder when installing package
  • Do not create tmp folder in .opm on init manager
  • Info command normalize output (tag + full specification url)
  • Build CI to build packages on tags

Bug fix

  • Able to install a dependency of inexisting tag. Should not be possible

Licence

MIT

About

Openscad simple package manager

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors