GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - playday3008/NixSearch.NET: .NET library, CLI tool, and MCP server for searching NixOS packages, options, and flakes. Search from code, command line, or AI assistants like Claude.

BranchesTags
Open more actions menu

Latest commit

 

History

34 Commits
34 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
infra/worker
infra/worker
 
 
src
src
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
NixSearch.sln
NixSearch.sln
 
 
README.md
README.md
 
 
appsettings.json
appsettings.json
 
 
common.props
common.props
 
 
stylecop.json
stylecop.json
 
 

Repository files navigation

NixSearch.NET

A comprehensive .NET solution for searching and exploring NixOS packages, options, and flakes using the search.nixos.org Elasticsearch backend.

License: MIT .NET

Overview

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

Projects

NixSearch.Core

The core library providing search functionality for NixOS packages, options, and flakes.

  • NuGet Package: NixSearch.Core
  • Target Framework: .NET 10
  • Features: Full Elasticsearch query support, strongly-typed models, async/await patterns

NixSearch.CLI

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

NixSearch.MCP

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

Quick Start

Using the Library

dotnet add package NixSearch.Core
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

using NixSearch.Core.Extensions;
using NixSearch.Core.Models;
using NixSearch.Core.Search;

IConfiguration configuration = new ConfigurationBuilder()
    .AddJsonFile("appsettings.json")
    .Build()
    .GetSection("NixSearch");

ServiceCollection services = new ServiceCollection();
services.AddNixSearch(configuration);
ServiceProvider provider = services.BuildServiceProvider();

INixSearchClient client = provider.GetRequiredService<INixSearchClient>();
IReadOnlyList<NixChannel> channels = await client.GetChannelsAsync();

Nest.ISearchResponse<NixPackage> results = await client.Packages()
    .WithQuery("git")
    .ForChannel(NixChannel.Parse("unstable", channels))
    .Page(0, 10)
    .ExecuteAsync();

foreach (NixPackage package in results.Documents)
{
    Console.WriteLine($"{package.Name}: {package.Version}");
}

Using the CLI

# Install globally
dotnet tool install -g NixSearch.CLI

# Search for packages
nixsearch packages git --size 10

# Search for options
nixsearch options services.nginx --size 5

Using the MCP Server

The MCP server can be deployed to AWS Lambda or run locally. See the MCP documentation for details on integration with AI assistants like Claude.

Building

# Build all projects
dotnet build

# Run tests
dotnet test

# Pack NuGet packages
dotnet pack

Requirements

  • .NET 10 SDK or later
  • For AWS Lambda deployment: AWS CLI configured

Repository Structure

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

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built on top of the search.nixos.org infrastructure
  • Uses NEST for Elasticsearch integration
  • MCP protocol implementation from ModelContextProtocol

About

.NET library, CLI tool, and MCP server for searching NixOS packages, options, and flakes. Search from code, command line, or AI assistants like Claude.

nixsearch-mcp.playday3008.dev/info

Topics

ai-assistantaws-lambdaclicommand-line-toolcsharpdotnetdotnet-libraryelasticsearchflakesmcpmodel-context-protocolnixnixosnixos-packagesnugetpackage-searchsearch

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.