./plntr
- a CLI tool for GitLab. It allows to:
- Get information from GitLab via CLI
- Create reports about projects activities
- Clone repository
git clone https://github.com/e13mort/palantir.git
- Run
./gradlew installDist
command - Add
<cloned-dir>/client/cli/build/install/plntr/bin
to your shell config - Run
./plntr
command
Palantir desktop application is under construction
./gradlew :client:desktop:run
After the first launch palantir will create the working directory at ~/.plntr
.
There are two ways to configure the tool: via environment variables and via config file.
Available configuration properties:
GITLAB_URL
Url to your Gitlab instance. E.g.gitlab.com
GITLAB_KEY
Access token for api requestsPERIOD_DATE_FORMAT
format for dates arguments. Default isdd-MM-yyyy
SYNC_PERIOD_MONTHS
period for synchronizationPERCENTILES_IN_REPORTS
target percentiles for reports. Values from the enum ReportsRepository.Percentile divided by,
(e.g.P50,P90
)
All properties are stored in file at <plntr-work-dir>/settings.properties
. The file is created
automatically with default values.
Also you can specify properties via env vars. All property names should start with PALANTIR_
,
e.g. PALANTIR_GITLAB_URL
.
Properties specified via env vars has a higher priority over the same properties
in settings.properties
file.
You might start with the following commands:
- Get all available remote projects:
./plntr scan projects
- Print local projects with ids
./plntr print projects
- Download a specific project to a local index
./plntr scan project <project-id>
- Work with local projects with
print
,report
andsync
commands
./plntr scan projects
- add projects to local index
./plntr sync active
- sync all active projects information
./plntr sync project <project-id>
- sync specified project information
Commands to show some project related information
./plntr print projects
- print projects from local index
./plntr print projects -a
- print projects from local index with clone urls (https & git)
./plntr print project <project-id>
- print project's summary
./plntr print branches <project-id>
- print project branches
./plntr print mrs <project-id>
- print project merge requests
./plntr print mr <merge-request-id>
- print merge requests description
Commands to print reports for a synced project
./plntr report
- print all available reports
'Approves' based reports
./plntr report approves
- print approves statistics variants
./plntr report approves total <project-id>
- print approves statistics by total approves amount
./plntr report approves first <project-id>
- print approves statistics by first approve event
'Merge request' based reports
./plntr report mr start <project-id> --ranges 1-1-1970:1-2-2021:1-3-2021
- print merge requests
statistics by first approve or start discussion event
'Local repository' based reports that are calculated based on a specified local git repository.
Each command accepts direct path to:
- local directory of a target repository
- path to a json file that describes a bunch of target repositories with some options
Show code lines statistics based on cloc output. Cloc tool should be installed.
Show statistics about code increment over specified time period.
Show statistics about code authors over specified time period.
Sample specification: spec1.json
Remove items from local index
./plntr remove project <project-id>
- remove all project info from the index