Skip to content

Package Manager

VG Language includes a package manager (vgpkg) that allows you to install, remove, and manage libraries.

Basic Commands

Installing a Package

vgpkg install <PackageName>

Example:

vgpkg install mathlib

Removing a Package

vgpkg remove <PackageName>

Example:

vgpkg remove mathlib

Listing Installed Packages

vgpkg list

This command displays all currently installed packages and their versions.

Viewing Available Packages

vgpkg available

This command shows all packages available in the official repository.

Package Repository

Packages are fetched from the official VG Language package repository at: https://github.com/Husseinabdulameer11/vg-lang-packagemanager

The repository contains a packages.json file that lists all available packages, their versions, and download URLs.

Package Installation Location

Installed packages are stored in the packages/ directory of your VG Language installation. Each package is stored as a .vglib file that can be imported into your programs.

Creating Your Own Packages

You can create your own packages by:

  1. Creating a .vglib file with your library code
  2. Adding it to the packages/ directory manually, or
  3. Submitting it to the official repository for others to use

Package Dependencies

When installing a package, any dependencies it requires will be automatically installed as well.