kospex
This is the main command to run analysis, sync directories, find orphaned repos, check dependencies, manage groups, health checks and more!
developers
List all the developers in the kospex directory, by default, only those with active commits in the last 90 days.
kospex developers
If you want developers for “all time”, use the -all flag:
kospex developers -all
If you need to restrict the search to only in a given domain name / server:
kospex developers -server [DOMAIN_NAME]
deps
The deps command queries the deps.dev API to get information about libraries in a dependency file.
kospex deps -file requirements.txt
The output will be a table with the following columns:
package_namepackage_versiondays_ago— how many days ago this package was publishedpublished_at— date this package was publishedadvisories— number of known security advisoriesdefault— is this the default version which is installed as of todayversions_behind— how many versions behind is this versionsource_repo— the git URL for this package if knownauthors— the number of authors, if we’ve synced the source_repo to the kospex DB
sync
The sync command takes all the commit history and adds it to the kospex database.
kospex sync [DIRECTORY]
Most likely, you’ll cd to a repo and then run the following command:
kospex sync .
Parameters
--no-scc— skip scc analysis.
orphans
Orphans occur when a repo no longer has someone working in the organisation or team who’s active.
“Experimental feature — Work in Progress.”
All you need to do is run the following command:
kospex orphans
This will display a table with the following columns:
_repo_idcommittersactiveOrphaned% Here
If you want to check for the orphan status of only a subset of repos, you can use the -target-list argument:
kospex orphans -target-list FILE_OF_CLONE_URLS
The format of this file is git clone URLs, one per line.
Parameters
-days— committed in X days is considered active (default 90)-window— days to consider for orphaned repos (default 365)-target-list— a file containing repos to check
list-repos
This command either lists all the known repos that have been synced to the database, or lists the repos found by searching a directory path.
By directory
kospex list-repos [DIRECTORY]
From the database
kospex list-repos -db
If you want to restrict the search to a specific server or domain name, use the -server flag:
kospex list-repos -db -server [DOMAIN_NAME]
For example:
kospex list-repos -db -server bitbucket.org
Including the Repo ID
Both -db and the filepath option support the -repo_id flag, which returns the repo_id.
The repo_id is used as a key in the format GIT_SERVER~OWNER~REPO.
So for the repository https://github.com/kospex/kospex the repo_id would be github.com~kospex~kospex.