Alizer (which stands for Application Analyzer) is a utilily whose goal is to extract informations about an application source code.
This repository is deprecated and will be archived. Active developement of this tool has been moved to devfile/alizer.
The Go CLI can be built with the below command:
# inside the go/ dir
$ go build alizer.go
./alizer analyze [OPTION]... [PATH]...
--log {debug|info|warning} sets the logging level of the CLI. The arg accepts only 3 values [`debug`, `info`, `warning`]. The default value is `warning` and the logging level is `ErrorLevel`.
./alizer component [OPTION]... [PATH]...
--port-detection {docker|compose|source} port detection strategy to use when detecting a port. Currently supported strategies are 'docker', 'compose' and 'source'. You can pass more strategies at the same time. They will be executed in order. By default Alizer will execute docker, compose and source.
./alizer devfile [OPTION]... [PATH]...
--registry strings registry where to download the devfiles. Default value: https://registry.devfile.io
To analyze your source code with Alizer, just import it and use the recognizer:
import "github.com/redhat-developer/alizer/pkg/apis/recognizer"
languages, err := recognizer.Analyze("your/project/path")
It detects all components which are found in the source tree where each component consists of:
- Name: name of the component
- Path: root of the component
- Languages: list of languages belonging to the component ordered by their relevance.
- Ports: list of ports used by the component
import "github.com/redhat-developer/alizer/pkg/apis/recognizer"
components, err := recognizer.DetectComponents("your/project/path")
For more info about name detection, see the name detection doc.
For more info about port detection, see the port detection doc.
It selects a devfile from a list of devfiles (from a devfile registry or other storage) based on the information found in the source tree.
import "github.com/redhat-developer/alizer/pkg/apis/recognizer"
devfile, err := recognizer.SelectDevFileFromTypes("your/project/path", devfiles)
Example of analyze
command:
[
{
"Name": "Go",
"Aliases": ["golang"],
"Weight": 94.72,
"Frameworks": [],
"Tools": ["1.18"],
"CanBeComponent": true
}
]
Example of component
command:
[
{
"Name": "spring4mvc-jpa",
"Path": "path-of-the-component",
"Languages": [
{
"Name": "Java",
"Aliases": null,
"Weight": 100,
"Frameworks": ["Spring"],
"Tools": ["Maven"],
"CanBeComponent": true
}
],
"Ports": null
}
]
Example of devfile
command:
[
{
"Name": "nodejs",
"Language": "JavaScript",
"ProjectType": "Node.js",
"Tags": ["Node.js", "Express", "ubi8"]
}
]
This is an open source project open to anyone. This project welcomes contributions and suggestions!
For information on getting started, refer to the CONTRIBUTING instructions.
The release process of alizer
is very straightforward. You can create a new release here.
- The title of the release has to be the new version.
Alizer
follows thev{major}.{minor}.{bugfix}
format (e.gv0.1.0
) - The description of the release is optional. You may add a description if there were outstanding updates in the project, not mentioned in the issues or PRs of this release.
For each release a group of binary files is generated. More detailed we have the following types:
linux/amd64
linux/ppc65le
linux/s390x
windows/amd64
darwin/amd64
In order to download a binary file:
- Go to the release you are interested for
https://github.com/thepetk/alizer/releases/tag/<release-tag>
- In the Assets section you will see the list of generated binaries for the release.
If you discover an issue please file a bug and we will fix it as soon as possible.
- File a bug in GitHub Issues.