Repository navigation
feat: clearer text output for jh package commands - #72
Merged
Merged
Conversation
- `info` (and `search --verbose`) print a card per package: a header line `name vX · registry · owner`, the description, then aligned fields with thousands separators, a 30-day download sparkline, a link to the package's JuliaHub page and an install hint. - `search` prints an aligned table with STARS and DL/30 DAYS columns; the OWNER separator and VERSION column used to be wider than their headers. Long names and descriptions are cut at rune boundaries with "…". - `dependency` and `dependents` print the same heading and direct/indirect/total counts, with standard libraries shown as `stdlib`. `dependency` lists each package once: `deps` can hold a package as both direct and indirect, and `splitDependencies` keeps one entry per UUID (direct wins), in `--json` too. Bold and dim styling is used only when stdout is a terminal, `NO_COLOR` is unset and `TERM` is not `dumb`. The helpers live in `style.go`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pankgeorg
added a commit
that referenced
this pull request
Oct 14, 2026
- `info` (and `search --verbose`) print a card per package: a header line `name vX · registry · owner`, the description, then aligned fields with thousands separators, a 30-day download sparkline, a link to the package's JuliaHub page and an install hint. - `search` prints an aligned table with STARS and DL/30 DAYS columns. Long names and descriptions are cut at rune boundaries with "…". - `dependency` and `dependents` print the same heading and direct/indirect/total counts, with standard libraries shown as `stdlib`. `dependency` lists each package once (`splitDependencies`, direct wins), in `--json` too. Bold and dim styling is used only when stdout is a terminal, `NO_COLOR` is unset and `TERM` is not `dumb`. The helpers live in `style.go`. Backport of #72 (c9368f8) to the 0.4 line; the 0.4 search path calls `printPackages` directly instead of through `emitPackages`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Prints a single line with the counts, e.g.
JuMP v1.32.1 · General: 9 direct · 40 indirect · 49 total dependencies
`--short` cannot be combined with `--json`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pankgeorg
marked this pull request as ready for review
October 14, 2026 17:15
pankgeorg
added a commit
that referenced
this pull request
Oct 15, 2026
- `info` (and `search --verbose`) print a card per package: a header line `name vX · registry · owner`, the description, then aligned fields with thousands separators, a 30-day download sparkline, a link to the package's JuliaHub page and an install hint. - `search` prints an aligned table with STARS and DL/30 DAYS columns. Long names and descriptions are cut at rune boundaries with "…". - `dependency` and `dependents` print the same heading and direct/indirect/total counts, with standard libraries shown as `stdlib`. `dependency` lists each package once (`splitDependencies`, direct wins), in `--json` too. Bold and dim styling is used only when stdout is a terminal, `NO_COLOR` is unset and `TERM` is not `dumb`. The helpers live in `style.go`. Backport of #72 (c9368f8) to the 0.4 line; the 0.4 search path calls `printPackages` directly instead of through `emitPackages`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redesigns the text output of the
jh packagecommands for people reading it; scripts have--json(#69).infoandsearch --verboseprint a card per package: a header line (JuMP v1.32.1 · General · jump-dev), the description, then aligned fields with thousands separators, a 30-day download sparkline, dependency/dependent/contributor counts, links (repository, homepage, docs, the package's JuliaHub pagehttps://<server>/ui/Packages/<registry>/<name>), the UUID and an install hint.infoskips the "Found 1 package" line for a single match, and the tag list is cut by width.searchprints an aligned table with STARS and DL/30 DAYS columns. The OWNER separator and the VERSION column were wider than their headers, so columns drifted; names and descriptions are now cut at rune boundaries with "…" instead of at a byte offset.dependency --shortanddependents --shortprint a single line, e.g.JuMP v1.32.1 · General: 9 direct · 40 indirect · 49 total dependencies(not combinable with--json).dependencyanddependentsshare a heading and adirect · indirect · totalline, and show standard libraries (no registry inpkg.json) asstdlib.dependencylists each package once:depscan hold a package as both direct and indirect (JuMP: 57 entries, 49 packages), andsplitDependencieskeeps one entry per UUID, direct winning, likesplitDependents. This applies todependency --jsontoo.Bold and dim styling is used only when stdout is a terminal,
NO_COLORis unset andTERMis notdumb; piped output is plain. Helpers are instyle.gowith unit tests. Checked against juliahub.com forinfo JuMP,search optim,dependency JuMP [--indirect]anddependents JuMP, piped and on a pseudo-terminal.Example output against juliahub.com (piped, so without the bold/dim styling a terminal gets):
jh package info JuMPjh package search optim --limit 5jh package dependency JuMPjh package dependents JuMP(first lines)Builds on #70 and targets its branch; GitHub retargets it to
mainas the stack merges.