<commit_before># LiGet

[![Join the chat at https://gitter.im/AI-Traders/liget-server](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/AI-Traders/liget-server?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

A nuget server created with linux-first approach.

## Why?

There seems to be no good nuget server for hosting private nuget packages and caching,
when working mainly with linux and dotnet core.
Running windows just to host a several nuget packages seems like a big waste.

## Goals

This project aims at following:
 * provide **self-hosted** nuget server for private package hosting.
 * hosted with kestrel on dotnet core 2.0
 * released as ready to use [docker image](#docker), preferably to be deployed to kubernetes.
 * continuously tested with paket including several common project setup cases
 * good performance when server is used by multiple clients,
 such as CI agents building various projects, downloading lots of packages at the same time.
 * easy to develop on linux in VS Code, not only in VS on windows.
 * if possible, implement caching mode for public packages from nuget.org

# Usage

## Docker

The simplest start command is

```bash<commit_msg>client usage note<commit_after># LiGet

[![Join the chat at https://gitter.im/AI-Traders/liget-server](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/AI-Traders/liget-server?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

A nuget server created with linux-first approach.

## Why?

There seems to be no good nuget server for hosting private nuget packages and caching,
when working mainly with linux and dotnet core.
Running windows just to host a several nuget packages seems like a big waste.

## Goals

This project aims at following:
 * provide **self-hosted** nuget server for private package hosting.
 * hosted with kestrel on dotnet core 2.0
 * released as ready to use [docker image](#docker), preferably to be deployed to kubernetes.
 * continuously tested with paket including several common project setup cases
 * good performance when server is used by multiple clients,
 such as CI agents building various projects, downloading lots of packages at the same time.
 * easy to develop on linux in VS Code, not only in VS on windows.
 * if possible, implement caching mode for public packages from nuget.org

# Usage

## On client side

For **dotnet CLI and nuget** you need to configure nuget config `~/.nuget/NuGet/NuGet.Config` with something like:
```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://www.nuget.org/api/v2" protocolVersion="2" />
    <add key="liget" value="http://liget:9011/api/v2" protocolVersion="2" />
  </packageSources>
</configuration>
```

For paket, in `paket.dependencies`, just specify another source:
```
source http://liget:9011/api/v2
```

## Docker

The simplest start command is

```bash
{'fraction_non_alphanumeric': 0.0950287453500169, 'fraction_numerical': 0.008116334122421373, 'mean_word_length': 4.699421965317919, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 1, '>': 10, 'https://': 7, 'lorem ipsum': 0, 'www.': 1, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2030311', 'n_tokens_mistral': 907, 'n_tokens_neox': 849, 'n_words': 349}