A library for computing historical metrics about a project's dependencies.
If you are looking for a completed application please see the Freshli CLI or Freshli Website.
Freshli-Lib is a available as a NuGet package. You can install it using your favoriate IDE GUI or by running the following command:
dotnet add package Corgibytes.Freshli.Lib
An example of using Freshli-Lib:
using Corgibytes.Freshli.Lib;
// The runner takes the path to your repository.
var runner = new Runner();
var results = runner.Run(repositoryUrl);
// You can view both the manifest file name and a collection of metric results
Console.WriteLine(results.Filename);
Console.WriteLine(results.MetricsResults);
// You can also output the entire ScanResult
Console.WriteLine(results[0].ToString());
If you like living on the edge you can find alpha versions of Freshli Lib here. You will need to set up a GitHub personal access token and then create a nuget.config
file in your project root with the following contents:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="GithubPackages" value="https://nuget.pkg.github.com/corgibytes/index.json" />
</packageSources>
<packageSourceCredentials>
<GithubPackages>
<add key="Username" value="GITHUB_USERNAME" />
<add key="ClearTextPassword" value="PERSONAL_ACCESS_TOKEN" />
</GithubPackages>
</packageSourceCredentials>
</configuration>
The dependency managers that Freshli supports are listed below along with the manifest files it can parse. The manifest file is the file that lists what dependencies are required by the project and has changed over time for some dependency managers, like NuGet.
Dependency Manager | Language/Framework | Manifest Files Format |
---|---|---|
Bundler | Ruby, Ruby on Rails | Gemfile.lock |
Carton | Perl | cpanfile |
Composer | PHP | composer.json, composer.lock |
Pip | Python | requirements.txt |
NuGet | C# | *.csproj |
Please let us know what other dependency managers and/or manifest files you would like use to support via the contact information in the Contributing section.
Freshli reads source code repository history to access previous version of each dependency manifest. Currently Freshli only supports Git but if you would like us to add more let us know via the contact information in the Contributing section.
If you have any questions, notice a bug, or have a suggestion/enhancment please let us know by opening a issue or pull request. More information can be found at the Contributing Guide