• Operand
  • hole: deep pi.

gram:build

> ./config/nushell/hex.nu

Lenses
(coming soon!)


# eh, more or less;
# had to rebuild these commands from atuin logs.

def "hex search" [query: string] {
  nsh elixir mix hex.search $query |
    columnar -b |
    rename name summary grade address |
    reject 0
}

def "hex source" [package: string] {
  # (nsh elixir mix hex.info $package | split row -r "\n\n" | each { try { from yaml } catch { null } })
  nsh elixir mix hex.info $package | rename --block { str downcase } | rename --column { github: source } | get source
}

def "hex clone" [package: string] {
  c clone (hex source $package) }

def "hex graph" [package: string] {
  hex clone $package; cd $package
  nsh elixir mix deps.tree --format dot
  nsh graphviz dot -Tsvg ./deps_tree.dot -o deps.svg
  # firefox deps.svg
}