Get help understanding your architecture.
Please keep in mind that this is a work in progress, but it's already useful.
To use it, first you need to import the information into a workspace, than you can query and show graphs from it.
A workspace can be set using the -w
cli arg. Default is ./.archer
(if it exists) or ~/.archer
.
archer work with the idea of roots and projects. A project is a groping of source files or a table, for ex, depending on the importer.
A root is a groping of projects and allows to relate information from different sources.
Run
archer import gradle <root of your gradle project(s)>
All the projects will be imported. The root name is the name of the root gradle project.
Run
archer import hibernate <source paths> --root <root name>
Imports hibernate configuration from files inside the source paths. Currently only kotlin files are supported, and information is gathered from annotations.
The source paths
can be a path on disk or a query (see below).
The root name
is required in this case and should be the schema name where the tables live.
You can also use --glob
to filter which files should be parsed. For ex: --glob '**/Db*.kt'
.
Run
archer import mysql <connection string>
The connection string
format is defined here.
All tables will be imported. The root name is the schema name.
You can use archer config set
to add information to the projects.
Currently these are supported:
- ignore: does not output this project
- color: fixes the color to be used in graphs
Run
archer show
For this you need to have graphviz dot installed and in your path.
Run
archer graph -o <output file.extension>
The simple version of the commands show all information available. This is usually too much, so there are some parameters/filters to select what should be show.
Only show information from one root
Only show information that matches the query (see below)
Don't show information that matches the query (see below)
Queries allows you to select which projects are interesting. The supported formats are:
You can use *
inside there to avoid some typing.
You can use *
inside there to avoid some typing.
Shows any dependency chain that links project 1 to project 2
N
is a number.
Shows any dependency chain that links project 1 to project 2, with at most N hops.
Inverts the matching.
To do an OR just pass different -i
arguments.