# hexer integration in escript format.

## Contact Us

For **questions** or **general comments** regarding the use of this library,
please use our public [hipchat room](

If you find any **bugs** or have a **problem** while using this library, please
[open an issue]( in this repo
(or a pull request :)).

And you can check all of our open-source projects at [](

## Building

To build `hexer` just run `make escript`. This will compile the project
and generate an executable binary in `bin/hexer`.

## Usage

Once the `hexer` binary is available you can run it as any other command tool:

$ hexer
Usage: hexer [-h] [-v] [command]

  -h, --help     Show this help information.
  -v, --version  Show the version of this tool.


  user.auth      Generate API key by providing username and password.
  user.register  Register new user.
  publish        Publish package in

## Registering (`user.register`)

Before you can publish a package to you need to have a registered user.
If you already have one then skip this section and go to [Authorization](#authorization).

Running `hexer user.register` will bring up a prompt asking for an email address,
a username and a password. Once you enter all this information if there is any
problem then there will be an error shown. If the user is successfully registered
then you will also get a confirmation message.

## Authorization (`user.auth`)

Once you have a registered user you need to generate the API key that will be
used for authentication to the server.

The process is simple, just run `hexer user.auth` and you will be prompted
for username and password. If the credentials are valid a `hexer.config` file
will be created containing the information necessary to connect to the

## Publishing a Package (`publish`)

When publishing a package, `hexer` extracts information from the
`` and the `Makefile`.

All dependencies are extracted from the `Makefile`, but **only** those that are
configured as **hex packages** are included in the published package. This means
that you need to make sure that all libraries your package depends on exist as
a hex package and specified in the `Makefile` as:

dep_name = hex 0.0.1

All other information is taken from the `` file. The
project's name is the atom found as the second element in the ``
tuple. Additional properties are read from the proplist in the file's specification,
these include:

- `vsn` (required): the version number of the package, specified as the `vsn` entry.
- `description`: a description for the project. A string. Default: `""`.
- `links`: list of useful or related links. A list of two element tuples, where the
  first element is the link's text and the second the url. Default: `[]`.
- `maintainers`: list of the project's maintainers names. A list of strings.
  Default: `[]`.
- `files`: list of files and folders (strings) that should be included in the package.
  Default: `["src", "c_src", "include", "priv", "rebar.config.script", "rebar.config",
  "rebar.lock", "Makefile", "Emakefile", "", "README*", "readme*", "LICENSE*", "license*"]`.
- `licenses`: list of license names (strings). Default: `[]`.
- `pkg_name`: set a new package name for avoid name collisions. Default: `ebin/*.app or src/*.app.src name value`.
- `build_tools`: list of available build tools . Default: `["make"]`.

These are the same properties the [rebar3_hex](
plugin reads from the same file.