Skip to content

Consider introducing a new lib search flag to omit the details for all releases from the response #2064

Closed
@kittaakos

Description

@kittaakos

Describe the request

The CLI on the ./arduino-cli lib search "" format --json command produces ~38MB of data. A big part of the result JSON is not used (in IDE2). If there were a flag to omit all the details of the releases, IDE2 would be happy to use it. Thank you!

IDE2 uses the lib search:

  • to filter the results (category and types),
  • to populate the Library Manager view (author, version, maintainer, sentence, website, and the key of the releases object for the available version), and
  • to populate the Sketch > Include Library menu (provides_includes)

Describe the current behavior

CLI returns with this library structure:

{
  "name": "RichHttpServer",
  "releases": {
    "1.0.0": {
      "author": "Chris Mullins \u003cchris@sidoh.org\u003e",
      "version": "1.0.0",
      "maintainer": "Chris Mullins \u003cchris@sidoh.org\u003e",
      "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
      "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
      "website": "https://github.com/sidoh/rich_http_server",
      "category": "Communication",
      "architectures": [
        "esp8266",
        "esp32"
      ],
      "types": [
        "Contributed"
      ],
      "resources": {
        "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-1.0.0.zip",
        "archive_filename": "RichHttpServer-1.0.0.zip",
        "checksum": "SHA-256:2e4982027b878d9c64e69bc0790c6d7214e462605b45ece020c0a5b9f84791e8",
        "size": 6329,
        "cache_path": "libraries"
      }
    },
    "1.2.0": {
      "author": "Chris Mullins \u003cchris@sidoh.org\u003e",
      "version": "1.2.0",
      "maintainer": "Chris Mullins \u003cchris@sidoh.org\u003e",
      "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
      "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
      "website": "https://github.com/sidoh/rich_http_server",
      "category": "Communication",
      "architectures": [
        "esp8266",
        "esp32"
      ],
      "types": [
        "Contributed"
      ],
      "resources": {
        "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-1.2.0.zip",
        "archive_filename": "RichHttpServer-1.2.0.zip",
        "checksum": "SHA-256:e1d9cb34ecb648e41a0889d4df1a92e9e9580379eaa8f67796f928550714b683",
        "size": 6514,
        "cache_path": "libraries"
      }
    },
    "2.0.0": {
      "author": "Chris Mullins \u003cchris@sidoh.org\u003e",
      "version": "2.0.0",
      "maintainer": "Chris Mullins \u003cchris@sidoh.org\u003e",
      "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
      "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
      "website": "https://github.com/sidoh/rich_http_server",
      "category": "Communication",
      "architectures": [
        "esp8266",
        "esp32"
      ],
      "types": [
        "Contributed"
      ],
      "resources": {
        "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-2.0.0.zip",
        "archive_filename": "RichHttpServer-2.0.0.zip",
        "checksum": "SHA-256:a9e5d19a3c87ffb3b6f3bf53aa352bedd72a38c71c76167b4be2bcaf537e881e",
        "size": 23828,
        "cache_path": "libraries"
      }
    },
    "2.0.1": {
      "author": "Chris Mullins \u003cchris@sidoh.org\u003e",
      "version": "2.0.1",
      "maintainer": "Chris Mullins \u003cchris@sidoh.org\u003e",
      "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
      "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
      "website": "https://github.com/sidoh/rich_http_server",
      "category": "Communication",
      "architectures": [
        "esp8266",
        "esp32"
      ],
      "types": [
        "Contributed"
      ],
      "resources": {
        "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-2.0.1.zip",
        "archive_filename": "RichHttpServer-2.0.1.zip",
        "checksum": "SHA-256:6a15bf1cd2919b27446049bb230e1f90ed01c13b2d01917adb7eff775f0a4e9c",
        "size": 23824,
        "cache_path": "libraries"
      }
    },
    "2.0.2": {
      "author": "Chris Mullins \u003cchris@sidoh.org\u003e",
      "version": "2.0.2",
      "maintainer": "Chris Mullins \u003cchris@sidoh.org\u003e",
      "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
      "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
      "website": "https://github.com/sidoh/rich_http_server",
      "category": "Communication",
      "architectures": [
        "esp8266",
        "esp32"
      ],
      "types": [
        "Contributed"
      ],
      "resources": {
        "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-2.0.2.zip",
        "archive_filename": "RichHttpServer-2.0.2.zip",
        "checksum": "SHA-256:4ed5bf29f234db6d1604a46e79b9ff1bae4dc6ab4fdc11a6faccac51f81fbc8f",
        "size": 23715,
        "cache_path": "libraries"
      }
    },
    "2.0.3": {
      "author": "Chris Mullins \u003cchris@sidoh.org\u003e",
      "version": "2.0.3",
      "maintainer": "Chris Mullins \u003cchris@sidoh.org\u003e",
      "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
      "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
      "website": "https://github.com/sidoh/rich_http_server",
      "category": "Communication",
      "architectures": [
        "esp8266",
        "esp32"
      ],
      "types": [
        "Contributed"
      ],
      "resources": {
        "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-2.0.3.zip",
        "archive_filename": "RichHttpServer-2.0.3.zip",
        "checksum": "SHA-256:2d1a06978ee3336034cae88b75f4ddeee8f332cfa8828cf47da805f9b8b4fda8",
        "size": 23717,
        "cache_path": "libraries"
      }
    }
  },
  "latest": {
    "author": "Chris Mullins \u003cchris@sidoh.org\u003e",
    "version": "2.0.3",
    "maintainer": "Chris Mullins \u003cchris@sidoh.org\u003e",
    "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
    "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
    "website": "https://github.com/sidoh/rich_http_server",
    "category": "Communication",
    "architectures": [
      "esp8266",
      "esp32"
    ],
    "types": [
      "Contributed"
    ],
    "resources": {
      "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-2.0.3.zip",
      "archive_filename": "RichHttpServer-2.0.3.zip",
      "checksum": "SHA-256:2d1a06978ee3336034cae88b75f4ddeee8f332cfa8828cf47da805f9b8b4fda8",
      "size": 23717,
      "cache_path": "libraries"
    }
  }
}

IDE2 would be happy with this:

{
  "name": "RichHttpServer",
  "author": "Chris Mullins \u003cchris@sidoh.org\u003e",
  "maintainer": "Chris Mullins \u003cchris@sidoh.org\u003e",
  "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
  "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
  "website": "https://github.com/sidoh/rich_http_server",
  "category": "Communication",
  "architectures": [
    "esp8266",
    "esp32"
  ],
  "types": [
    "Contributed"
  ],
  "releases": [
    "1.0.0",
    "1.2.0",
    "2.0.0",
    "2.0.1",
    "2.0.3"
  ]
}

Arduino CLI version

0.29.0

Operating system

macOS

Operating system version

12.5.1

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the nightly build
  • My request contains all necessary details

Metadata

Metadata

Assignees

Labels

conclusion: resolvedIssue was resolvedtopic: CLIRelated to the command line interfacetopic: codeRelated to content of the project itselftopic: gRPCRelated to the gRPC interfacetype: enhancementProposed improvement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions