A comprehensive .NET solution for searching and exploring NixOS packages, options, and flakes using the search.nixos.org Elasticsearch backend.
NixSearch.NET provides multiple ways to interact with the NixOS package and option search ecosystem:
- Library: A robust .NET client library for programmatic access
- CLI Tool: A command-line interface for quick searches
- MCP Server: A Model Context Protocol server for AI assistant integration
The core library providing search functionality for NixOS packages, options, and flakes.
- NuGet Package:
NixSearch.Core - Target Framework: .NET 9.0
- Features: Full Elasticsearch query support, strongly-typed models, async/await patterns
A command-line tool for searching NixOS packages and options from your terminal.
- NuGet Package:
NixSearch.CLI - Tool Command:
nixsearch - Installation:
dotnet tool install -g NixSearch.CLI
A Model Context Protocol (MCP) server enabling AI assistants to search NixOS packages and options.
- NuGet Package:
NixSearch.MCP - Deployment: AWS Lambda (ARM64)
- Protocol: Model Context Protocol
dotnet add package NixSearch.Coreusing NixSearch.Core;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddNixSearchClient();
var provider = services.BuildServiceProvider();
var client = provider.GetRequiredService<INixSearchClient>();
var results = await client.SearchPackagesAsync("git", pageSize: 10);
foreach (var package in results.Items)
{
Console.WriteLine($"{package.PackageName}: {package.Version}");
}# Install globally
dotnet tool install -g NixSearch.CLI
# Search for packages
nixsearch packages git --size 10
# Search for options
nixsearch options services.nginx --size 5The MCP server can be deployed to AWS Lambda or run locally. See the MCP documentation for details on integration with AI assistants like Claude.
# Build all projects
dotnet build
# Run tests
dotnet test
# Pack NuGet packages
dotnet pack- .NET 9.0 SDK or later
- For AWS Lambda deployment: AWS CLI configured
NixSearch.NET/
├── src/
│ ├── NixSearch.Core/ # Core library
│ ├── NixSearch.CLI/ # CLI tool
│ └── NixSearch.MCP/ # MCP server
├── tests/
│ ├── NixSearch.Core.Tests/
│ ├── NixSearch.CLI.Tests/
│ └── NixSearch.MCP.Tests/
├── .github/
│ └── workflows/ # CI/CD workflows
└── NixSearch.sln # Solution file
Contributions are welcome! Please feel free to submit issues or pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built on top of the search.nixos.org infrastructure
- Uses NEST for Elasticsearch integration
- MCP protocol implementation from ModelContextProtocol