mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
498ad3930c
Six new public-API sites — package registries + Docker images + OpenAlex
scholarly works — all unauthenticated, no browser required.
dockerhub search image
rubygems search gem
homebrew formula cask popular
packagist search package
maven search artifact
openalex search work
Conventions held:
- access: 'read' on every command
- typed errors (ArgumentError / EmptyResultError / CommandExecutionError)
instead of generic CliError or silent fallback
- input validators per site (image slugs, gem names, Composer names,
Maven coordinates, OpenAlex work-id / DOI normalization)
- listing rows carry an id-shaped column (image / gem / token / package /
coordinate / id) that round-trips into the corresponding detail command
- HTTP 429 surfaces with retry hint, 404 → EmptyResultError
Audits:
- check:typed-error-lint → no new violations (baseline 196)
- check:silent-column-drop → no new violations (baseline 103)
- advise:listing-id-pairing → unchanged at 13
2.3 KiB
2.3 KiB
Maven Central
Mode: 🌐 Public · Domain: search.maven.org
Search Maven Central artifacts and pull per-artifact version histories without auth or browser. Two commands.
Commands
| Command | Description |
|---|---|
opencli maven search <query> |
Search Maven Central by keyword (artifact name, groupId, tag) |
opencli maven artifact <coordinate> |
Version history for groupId:artifactId[:version] |
Usage Examples
# Free-text search
opencli maven search jackson --limit 10
opencli maven search "ai.koog" --limit 5
# Version history for a specific artifact (use `coordinate` from search rows)
opencli maven artifact com.fasterxml.jackson.core:jackson-databind --limit 10
opencli maven artifact com.google.guava:guava --limit 5
# Pin to a specific version
opencli maven artifact com.google.guava:guava:33.0.0-jre
# JSON output
opencli maven search jackson -f json
Output Columns
| Command | Columns |
|---|---|
search |
rank, coordinate, groupId, artifactId, latestVersion, packaging, versions, lastPublished, repository, url |
artifact |
groupId, artifactId, version, packaging, publishedAt, tags, url |
The coordinate column from search round-trips into artifact exactly. To pin a single version, append :<version>.
Options
maven search
| Option | Description |
|---|---|
query (positional) |
Free-text query |
--limit |
Max artifacts (1-200, default: 30) |
maven artifact
| Option | Description |
|---|---|
coordinate (positional) |
groupId:artifactId or groupId:artifactId:version |
--limit |
Max versions (1-200, default: 20). Ignored when version is pinned. |
Caveats
- Coordinates are validated upfront —
groupIdandartifactIdmust be[A-Za-z0-9][A-Za-z0-9._-]*(max 200 chars each). Bad input raisesArgumentError. lastPublished/publishedAtare derived from Solr's epoch-mstimestampand rendered as second-precisionYYYY-MM-DDTHH:MM:SSZ.- Maven Central throttles bursts;
HTTP 429surfaces as a typedCommandExecutionErrorwith a retry hint. versions(insearch) is the count Solr reports — it includes pre-releases as well as stable versions.
Prerequisites
- No browser required — uses
search.maven.org/solrsearch/select(Solr endpoint).