https://github.com/corgibytes/freshli-lib
A tool for collecting historical metrics about a project's dependencies
https://github.com/corgibytes/freshli-lib
dependencies dependency-metrics metrics static-code-analysis
Last synced: 3 days ago
JSON representation
A tool for collecting historical metrics about a project's dependencies
- Host: GitHub
- URL: https://github.com/corgibytes/freshli-lib
- Owner: corgibytes
- License: mit
- Created: 2020-01-13T15:24:15.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2023-05-31T21:33:23.000Z (over 2 years ago)
- Last Synced: 2025-11-22T09:23:31.550Z (about 2 months ago)
- Topics: dependencies, dependency-metrics, metrics, static-code-analysis
- Language: C#
- Homepage:
- Size: 5.41 MB
- Stars: 17
- Watchers: 6
- Forks: 1
- Open Issues: 46
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://github.com/corgibytes/freshli/actions?query=workflow%3A%22.NET+Core%22)
[](https://github.com/corgibytes/freshli/actions?query=workflow%3A%22Docker+Image+CI%22)
[](https://github.com/corgibytes/freshli/actions?query=workflow%3A%22EditorConfig+Lint%22)
[](https://codeclimate.com/github/corgibytes/freshli-lib/maintainability)
[](https://codeclimate.com/github/corgibytes/freshli-lib/test_coverage)
# Freshli-Lib
A library for computing historical metrics about a project's dependencies.
If you are looking for a completed application please see the [Freshli CLI](https://github.com/corgibytes/freshli-cli) or [Freshli Website](https://freshli.io/).
## Getting Started
Freshli-Lib is a available as a NuGet [package](https://www.nuget.org/packages/Corgibytes.Freshli.Lib/). 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:
```csharp
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());
```
### Alpha Packages
If you like living on the edge you can find alpha versions of Freshli Lib [here](https://github.com/corgibytes/freshli-lib/packages/667787/versions). You will need to [set up a GitHub personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) and then create a `nuget.config` file in your project root with the following contents:
```
```
## Supported Dependency Managers
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](https://bundler.io/) | [Ruby](https://www.ruby-lang.org), [Ruby on Rails](https://rubyonrails.org/) | Gemfile.lock |
| [Carton](https://metacpan.org/pod/Carton) | [Perl](https://www.perl.org/) | cpanfile |
| [Composer](https://getcomposer.org/) | [PHP](https://www.php.net/) | composer.json, composer.lock |
| [Pip](https://pypi.org/project/pip/) | [Python](https://www.python.org/) | requirements.txt |
| [NuGet](https://www.nuget.org/) | [C#](https://docs.microsoft.com/en-us/dotnet/csharp/) | *.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](#contributing) section.
## Supported Source Control Tools
Freshli reads source code repository history to access previous version of each dependency manifest. Currently Freshli only supports [Git](https://git-scm.com/) but if you would like us to add more let us know via the contact information in the [Contributing](#contributing) section.
## Contributing to Freshli-Lib
If you have any questions, notice a bug, or have a suggestion/enhancment please let us know by opening a [issue](https://github.com/corgibytes/freshli-lib/issues) or [pull request](https://github.com/corgibytes/freshli-lib/pulls). More information can be found at the [Contributing Guide](CONTRIBUTING.md)