LinuxCommandLibrary

haxelib

Manage Haxe libraries

TLDR

Search for a Haxe library

$ haxelib search [keyword]
copy

Install a Haxe library
$ haxelib install [libname]
copy

Install a specific version of a Haxe library
$ haxelib install [libname] [version]
copy

Upgrade all installed Haxe libraries
$ haxelib upgrade
copy

Install the development version of a library from a Git repository
$ haxelib git [libname] [git_url]
copy

Uninstall a Haxe library
$ haxelib remove [libname]
copy

Print a tree of locally installed Haxe libraries
$ haxelib list
copy

SYNOPSIS

haxelib [global_options] <command> [command_options] [arguments]
haxelib --help | -h
haxelib --version | -v

PARAMETERS

install <library> [<version>]
    Installs a specified library from the HaxeLib repository. If no version is specified, the latest stable version is installed.

update [<library>]
    Updates one or all installed libraries to their latest available versions.

remove <library> [<version>]
    Uninstalls a specified library. If no version is specified, all versions are removed.

list
    Displays a list of all currently installed Haxe libraries along with their versions.

run <library> <command> [args...]
    Executes a command provided by a specified library, useful for running library-specific tools.

set <library> <version>
    Sets the active version for a given library, if multiple versions are installed.

path <library>
    Prints the installation path of a specified library, useful for debugging or integrating with build systems.

setup [<path>]
    Configures the root directory where haxelib stores libraries. If no path is provided, it prompts for one.

config
    Displays the current Haxelib root directory.

search <keyword>
    Searches the HaxeLib repository for libraries matching the given keyword.

info <library>
    Displays detailed information about a specified library, including available versions and description.

submit <zipfile>
    Submits a library package (as a zip file) to the HaxeLib repository. Requires user authentication.

user <command>
    Manages HaxeLib user accounts. Subcommands include login, logout, register, info.

help [<command>]
    Shows general help or specific help for a given haxelib command.

--version | -v
    Displays the haxelib version information.

--debug | -debug
    Enables debug output for troubleshooting.

--quiet | -quiet
    Suppresses output, showing only errors.

--neko <file>
    Specifies the Neko executable to use (relevant for some older Haxe setups).

--connect <host> <port>
    Connects to a Haxe compilation server.

DESCRIPTION

haxelib is the official command-line tool for managing Haxe libraries. It allows developers to easily install, update, remove, and manage external dependencies for their Haxe projects. Beyond basic library management, haxelib also facilitates sharing custom libraries by enabling users to publish their packages to the HaxeLib repository and search for existing ones. It is an essential component of the Haxe development ecosystem, ensuring consistent dependency management across different Haxe projects and environments.

CAVEATS

haxelib relies on the Haxe compiler and runtime (like Neko) being correctly installed and configured. Installation path can sometimes cause permission issues if not set up correctly (e.g., trying to install into system-wide locations without proper permissions). Older versions of Haxe and haxelib might have different behaviors or command structures.

HAXELIB ROOT DIRECTORY

The environment variable HAXELIB_PATH can be used to override the default Haxelib root directory, which is typically ~/.haxelib on Linux or a user-specific path on Windows. This is where all libraries are physically installed.

LOCAL LIBRARIES

haxelib supports installing libraries directly from local directories using haxelib dev <library_name> <path_to_library>. This is very useful for developing a library locally and testing it within other projects without publishing.

HISTORY

haxelib has been an integral part of the Haxe ecosystem since its early days, evolving alongside the Haxe language and compiler. It was introduced to standardize and simplify the process of distributing and consuming Haxe libraries, moving away from manual file copying. Its development closely tracks the Haxe compiler's releases, with updates often reflecting new language features or changes in how Haxe projects are structured. Its design principles are rooted in providing a robust, centralized, and easy-to-use solution for dependency management, similar to package managers in other language ecosystems.

SEE ALSO

haxe(1), npm(1), pip(1), git(1)

Copied to clipboard