{"id":20019288,"url":"https://github.com/jbris/linux-package-search","last_synced_at":"2026-03-06T14:34:40.069Z","repository":{"id":40934197,"uuid":"243851132","full_name":"JBris/linux-package-search","owner":"JBris","description":"A simple tool to search for Linux package information from various distros. Includes Node, Knex, and Swagger. Supports archiving information into Postgres, indexing information using Elasticsearch, and caching search results using Redis.","archived":false,"fork":false,"pushed_at":"2023-01-11T02:03:17.000Z","size":526,"stargazers_count":3,"open_issues_count":10,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-30T16:50:44.362Z","etag":null,"topics":["adminer","api","database","debian","distros","docker","docker-compose","docker-image","elasticsearch","es","fedora","knex","linux","node","postgres","postgresql","redis","search","swagger","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JBris.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-28T20:43:27.000Z","updated_at":"2024-06-22T20:43:51.000Z","dependencies_parsed_at":"2023-02-08T22:16:13.170Z","dependency_job_id":null,"html_url":"https://github.com/JBris/linux-package-search","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JBris/linux-package-search","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBris%2Flinux-package-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBris%2Flinux-package-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBris%2Flinux-package-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBris%2Flinux-package-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JBris","download_url":"https://codeload.github.com/JBris/linux-package-search/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBris%2Flinux-package-search/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30180757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T12:39:21.703Z","status":"ssl_error","status_checked_at":"2026-03-06T12:36:09.819Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adminer","api","database","debian","distros","docker","docker-compose","docker-image","elasticsearch","es","fedora","knex","linux","node","postgres","postgresql","redis","search","swagger","ubuntu"],"created_at":"2024-11-13T08:26:48.548Z","updated_at":"2026-03-06T14:34:40.049Z","avatar_url":"https://github.com/JBris.png","language":"JavaScript","readme":"# linux-package-search\n\n## Table of Contents  \n\n* [Introduction](#introduction)\u003ca name=\"introduction\"/\u003e\n* [Server](#server)\u003ca name=\"server\"/\u003e\n* [CLI](#cli)\u003ca name=\"cli\"/\u003e\n* [Postgres](#postgres)\u003ca name=\"postgres\"/\u003e\n* [Knex](#knex)\u003ca name=\"knex\"/\u003e\n* [Redis](#redis)\u003ca name=\"redis\"/\u003e\n* [Elasticsearch](#elasticsearch)\u003ca name=\"elasticsearch\"/\u003e\n\n### Introduction\n\nLinux Package Search is a simple search tool to retrieve information for Linux packages. Supported distributions are:\n* Ubuntu\n* Debian\n* Fedora\n\nRun `./build.sh` to get started.\n\n### Server\n\nThe application is bundled with an Express server to make proxy search requests. See [package.json](server/package.json) for a full list of dependencies.\n\nAccess localhost/v1/api-docs to access Swagger documentation for the available API endpoints. Access localhost/api/v1/api-docs to view the swagger configuration in JSON format.\n\nEndpoints are protected using an API secret. This value is set using the NODE_API_SECRET environment variable. Include the secret in the `Authorization` header of your HTTP requests.\n\n### CLI\n\nA command line version of the application is also included. Run `npm install .` to install the `linsearch` command globally. Execute `linsearch --help` to view all available commands.\n\n```\nsearch|s       Search for a list of packages by name.\nview|v         View details for the specified package.\narsearch|as    Search for a list of archived packages by name.\narview|av      View archived details for the specified package.\narsave|asv     Save the specified package to the archive.\nardel|ad       Delete the specified package from the archive.\nisearch|is     Perform a full-text search of indexed content.\nindex|i        Index the specified package for the search engine.\nidel|id        Delete the specified package from the index.\n```\n\nEnsure that a `.env` file is included in the current directory when executing `linsearch`. \n\n### Postgres\n\nPackage information is archived into a Postgres database. \n\nExecute `make dbdump` to view the contents of the database as raw SQL (the output should ideally be redirected to a file). Execute `make dbexp` to export the database into an SQL file inside the `data` directory. Execute `make dbimp` to import the SQL file into the database.\n\nBy default, content will be stored inside of the `linux_packages` database. This consists of a `distribution` table, which stores a list of supported Linux distros, and a `packages` table, which contains archived package information. The `packages` table contains the `name` (string, 255), `displayName` (string, 255), `version` (string, 255), `search_query` (string, 255), and `additionalProperties` (JSON binary) columns.\n\nAccess Adminer from localhost:$ADMINER_PORT. This defaults to port 8080.\n\n### Knex\n\nThis app uses the Knexjs module to handle seeds, migrations, and SQL queries. Knex-related scripts can be accessed from the [server](server) directory.\n\nThe `seed` script will fill the `distribution` table with supported distributions.\n\nThe `migration` table will define the structure of the `distribution` and `packages` tables.\n\nThe `knexfile.js` file exclusively uses environment variables. Ensure that you export the contents of the `.env` file into your current shell environment.\n\n### Redis\n\nThis application leverages Redis to cache your JSON-formatted search results. Set the cache lifetime using the `NODE_CACHE_LIFETIME` environment variable.\n\nCache keys use the pattern {command}-{distribution}-{package}.\n\nA fallback in-memory cache is also included should Redis be unavailable. Set `NODE_CACHE_BACKEND` to `memory` to enable this cache.\n\n### Elasticsearch\n\nContent can be indexed into Elasticsearch to enable full-text search functionality. \n\n`ES_JAVA_OPTS` can be used to allocate the amount of memory available to the JVM. The default value is `\"ES_JAVA_OPTS=-Xmx1024m -Xms1024m\"`. You may increase or decrease these values to fit your own requirements.\n\nThe Elasticsearch container is initially configured to use a single node cluster for local development. Comment out `DISCOVERY_TYPE` from the docker-compose file (or override the Elasticsearch configuration using another docker-compose file) to enable multi-node clustering. Change `ELASTICSEARCH_CLUSTER_INITIAL_MASTER_NODES` to specify which nodes should be included in the cluster.\n\nSearch results are cached by Redis using the query string as a key.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbris%2Flinux-package-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbris%2Flinux-package-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbris%2Flinux-package-search/lists"}