Using Haxelib - Haxelib Documentation (original) (raw)
If the haxelib
command is executed without any arguments, it prints an exhaustive list of all available arguments.
The following commands are available:
Flags
Also, following environment variables affect haxelib behavior if set:
Basic
haxelib install
Installs the given project. You can optionally specify a specific version to be installed. By default, latest released version will be installed.
haxelib install [project-name]
Installs latests released version of the library.
haxelib install actuate
haxelib install [project-name] [version]
Installs a specific version of the library.
haxelib install actuate 1.8.2
haxelib install all
Install all dependencies in all hxml files
haxelib install all
haxelib install [hxml-file]
Install all dependencies listed in hxml file
haxelib install build.hxml
haxelib install [library-file]
Install the project contained in the zip file.
haxelib install actuate.zip
haxelib update [project-name]
Update a single library to the latest version.
haxelib update minject
haxelib update
Update all the installed projects to their latest version. This command prompts a confirmation for each updating project.
haxelib update
haxelib remove
Remove a complete project or only a specified version if specified. Note: this doesn't remove the library from the registry but from the machine it is installed on.
haxelib remove [project-name]
Remove all versions of the project
haxelib remove format
haxelib remove [project-name] [version]
Remove the specified version
haxelib remove format 3.1.2
haxelib list [search]
List all the installed projects and their versions, sorted alphabetically by their names.
For each project, the version surrounded by brackets is the current one.
haxelib list
List all installed projects
haxelib list
haxelib list [search]
List all projects with "ufront" in their name
haxelib list ufront
haxelib set
haxelib set [project-name] [version]
haxelib set tink_core 1.0.0-rc.8
Change the current version for a given project. If the version is not already installed, a prompt will be shown to install it.
Information
haxelib search
haxelib search [word]
haxelib search tween
Get a list of all haxelib projects with the specified word in the name or description.
haxelib info
haxelib info [project-name]
haxelib info openfl
Show information about this project, including the owner, license, description, website, tags, current version, and release notes for all versions.
haxelib user
haxelib user [user-name]
haxelib user jason
Show information on a given Haxelib user and their projects.
haxelib config
haxelib config
Print the Haxelib repository path. This is where each library will be installed to. You can modify the path using
haxelib [setup](#setup)
.If you are in a local repository and want to print the global Haxelib repository path do
haxelib [--global](#global) config
.
haxelib path
haxelib path [project-name[:version]...]
haxelib path hscript
haxelib path hscript:2.0.0
haxelib path hscript erazor buddy
haxelib path hscript erazor buddy:1.0.0
Example output :
haxelib path openfl hxcpp format
--macro openfl._internal.utils.ExtraParams.include()
/usr/local/lib/haxe/lib/openfl/6.5.3/
-D openfl=6.5.3
/usr/local/lib/haxe/lib/hxcpp/git/
-D hxcpp=3.4.0
/usr/local/lib/haxe/lib/format/3,3,0/
-D format=3.3.0
Prints the source paths to one or more libraries, as well as any dependencies and compiler definitions required by those libraries.
You can specify a version by appending
:version
to the library name. If no version is specified, the development version is used if one has been set, otherwise the set version is used.This command is used by Haxe compiler to get required paths and flags for libraries.
haxelib libpath
haxelib libpath [project-name[:version]...]
haxelib libpath hscript
haxelib libpath hscript:2.0.0
haxelib libpath hscript erazor buddy
haxelib libpath hscript erazor buddy:1.0.0
Example output :
haxelib libpath hxcpp format hscript
/usr/local/lib/haxe/lib/hxcpp/git/
/usr/local/lib/haxe/lib/format/3,3,0/
/usr/local/lib/haxe/lib/hxcpp/2,1,1/
Prints the root path of one or more libraries. Will output 1 path per line.
You can specify a version by appending
:version
to the library name. If no version is specified the set version is used.If a development version is set it'll be used even if a version is specified.
haxelib version
haxelib version
Prints the version of Haxelib you are using.
You can change the version of haxelib you are using with
haxelib --global [set](#set) haxelib version
haxelib help
haxelib help
Print the list of available arguments.
Development
haxelib submit
haxelib submit [project.zip]
haxelib submit detox.zip
haxelib submit
Submits a zip package to Haxelib so other users can install it.
Alternatively you can run
haxelib submit <DIRECTORY>
to have Haxelib zip and submit a directory (excluding names starting with a dot). An example would be usinghaxelib submit .
to zip and submit the local directory.If the user name is unknown, you'll be first asked to register an account. If more the project has more than one developer, it will ask you which user you wish to submit as. If the user already exists, you will be prompted for your password.
If you want to modify the project url or description, simply modify your
haxelib.json
(keeping version information unchanged) and submit it again.
haxelib register
haxelib register [username] [email] [fullname] [password] [passwordconfirmation]
Register a new developer account to be used when submitting.
Missing parameters will be asked interactively.
haxelib dev
haxelib dev [project-name] [directory]
haxelib dev starling ../starling/ # Relative path to starling source.
haxelib dev starling /opt/starling/ # Absolute path to starling source.
haxelib dev starling # Cancel dev, use installed version.
Set a development directory for the given project. This directory should either contain a
haxelib.json
or the source*.hx
files. This command is useful when developing a library and testing changes on a project.If the directory is omitted the development version of the library will be deactivated.
See also: <HAXELIB%5FDEV%5FFILTER> environment variable
haxelib git
haxelib git [project-name] [git-clone-path] [branch] [subDir] [tag]
haxelib git minject https://github.com/massiveinteractive/minject.git # Use HTTP git path.
haxelib git minject git@github.com:massiveinteractive/minject.git # Use SSH git path.
haxelib git minject git@github.com:massiveinteractive/minject.git v2 # Checkout branch or tag `v2`.
haxelib git hashlink git@github.com:HaxeFoundation/hashlink.git master other/haxelib/
# Checkout branch `master`, and set up a development path to `other/haxelib/` within the repository.
Use a git repository as library.
This is useful for using a more up-to-date development version, a fork of the original project, or for having a private library that you do not wish to post to Haxelib.
When you use
haxelib update
any libraries that are installed using GIT will automatically pull the latest version.If a parameter is passed in for
subDir
, then once the repository is cloned, a dev path will be set up to the sub directory inside the repository.
haxelib hg
haxelib hg [project-name] [mercurial-clone-path] [branch] [subDir] [revision]
Use a mercurial repository as library.
Usage is identical to
haxelib [git](#git)
.
Miscellaneous
haxelib setup
haxelib setup [path]
Set the Haxelib repository path. To print current path use
haxelib [config](#config)
.Missing parameter will be asked interactively.
haxelib newrepo
haxelib newrepo
Create a local repository in the current directory, to remove it use
haxelib [deleterepo](#deleterepo)
.Basic commands will only use the libraries stored in the local repository when you are located in this directory.
To access the global repository add the
[--global](#global)
flag.
haxelib deleterepo
haxelib deleterepo
Remove a local repository created with
haxelib [newrepo](#newrepo)
from the current directory.This will remove all libraries contained in it.
haxelib convertxml
haxelib convertxml
Convert the file
haxelib.xml
from the current directory in the Haxelib 2 xml specification into a file namedhaxelib.json
which can be used by the current Haxelib.
haxelib run
haxelib run [project-name[:version]] [parameters]
haxelib run openfl
haxelib run openfl:2.6.0
haxelib run openfl setup
haxelib run openfl create DisplayingABitmap
Libraries with either a
run.n
helper, aRun.hx
module, or another main class defined inhaxelib.json
, can be executed usinghaxelib run
.You can specify the version to run by appending
:version
. If no version is specified, the development version is used if one has been set, otherwise the set version is used. NOTE: Before Haxelib 5.0.0, due to a bug, development versions will always take priority over a version specified this way.The environment within which the library is run will have the
HAXELIB_RUN
environment variable set to"1"
, andHAXELIB_RUN_NAME
set to the name of the library.When running a library script, the current working directory is set to the library directory (eg. /usr/share/haxe/lib/somelib/1,0,0/). The actual current working directory where
haxelib run
was called can be retrieved as the final command line argument to the library script.
haxelib proxy
haxelib proxy [host port [username password]]
Configure Haxelib to use a HTTP proxy.
Missing parameters will be asked interactively.
Rerun with an empty host to deactivate the current proxy.
Flags
Warning: when using the run command you need to specify the flags before run
, otherwise they'll be passed as arguments to the library.
From Haxelib 5.0.0, all flags can be used with either one or two dashes (e.g., -debug
or --debug
). However, with older versions, the -notimeout flag is only recognized when one dash is used.
haxelib --flat
haxelib --flat
When installing a library via git, do not add the
--recursive
flag when cloning its repository.
haxelib --always
haxelib --always
Answer all questions with yes, cannot be used at the same time as --never.
haxelib --system
haxelib --system
Use the version of Haxelib installed with Haxe in the system instead of the one currently set.
Useful if your Haxelib update was broken.
haxelib --debug
haxelib --debug
Display debug information during the execution, cannot be used at the same time as --quiet.
haxelib --quiet
haxelib --quiet
Display less messages during the execution, cannot be used at the same time as --debug.
haxelib --never
haxelib --never
Answer all questions with no, cannot be used at the same time as --always.
haxelib --global
haxelib --global
Force the usage of the global repository even if inside a local repository created with
haxelib [newrepo](#newrepo)
.
haxelib --skip-dependencies
haxelib --skip-dependencies
When installing or updating a library, the dependencies are ignored.
haxelib -notimeout
haxelib -notimeout
haxelib --no-timeout # alias available from Haxelib 5.0.0
Remove timeout when connecting to the Haxelib server, downloading or submitting a library.
NOTE: In Haxelib versions older than 5.0.0,
--notimeout
is not recognized so only-notimeout
can be used. This is a bug affects this flag as well as -cwd
Parameters
Warning: when using the run command you need to specify the parameters before run
, otherwise they'll be passed as arguments to the library.
From Haxelib 5.0.0, all parameters can be used with either one or two dashes (e.g., -cwd
or --cwd
), with the exception of single character aliases like -R. However, with older versions, the -cwd parameter is only recognized when one dash is used.
haxelib -cwd
haxelib -cwd [dir]
haxelib --cwd [dir] # also recognized from Haxelib 5.0.0
Act like the Haxelib command was run from another repository. Affect all commands that use the "current directory".
NOTE: In Haxelib versions older than 5.0.0,
--cwd
is not recognized so only-cwd
can be used. This is a bug affects this parameter as well as -notimeout
haxelib -R
haxelib -R [host:port[/dir]]
haxelib --remote [host:port[/dir]] # alias available from Haxelib 5.0.0
Allow the usage of a custom Haxelib server instead of
lib.haxe.org
.
Environment Variables
HAXELIB_NO_SSL
If HAXELIB_NO_SSL
is set to 1
or true
, then haxelib client will use http instead of https.
HAXELIB_REMOTE
HAXELIB_REMOTE
may contain a url to a custom Haxelib server instead of https://lib.haxe.org/
. However, if the -R command line argument is provided, then HAXELIB_REMOTE
is ignored.
HAXELIB_DEV_FILTER
HAXELIB_DEV_FILTER
can be set to a directory, or multiple directories separated by semicolons (;
). Unless a library has a development path within any of these directories, the development path is ignored.