npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@assethub/cli

v0.1.6

Published

Command line interface for AssetHub.

Readme

@assethub/cli

Command line interface for AssetHub.

export ASSETHUB_API_KEY=ah_live_xxx

assethub models list
assethub files import https://example.com/input.png --media-type image
assethub source create --file ./input.png --media-type image
assethub image generate --prompt "stylized prop concept" --wait
assethub mesh generate --file ./input.png --wait
assethub jobs watch job_123 --download --out-dir ./out/job
assethub parts split --file ./input.png --part-extractor "V1.5" --wait --all-ready --download --out-dir ./out/parts
assethub parts compare --file ./input.png --preprocess-prompt "clean white background, centered product photo" --part-extractor "V1.5" --wait --all-ready

Configuration:

  • ASSETHUB_API_KEY: optional when a profile was saved with auth login.
  • ASSETHUB_API_BASE_URL: optional, defaults to https://app.assethub.io.
  • ASSETHUB_CLI_CONFIG: optional auth config path.

Agent-friendly login:

printf '%s' "$ASSETHUB_API_KEY" | assethub auth login --api-key-stdin
assethub image generate --prompt "small stylized game asset chest" --wait --download --out-dir ./out/image
assethub mesh generate --source-url https://example.com/input.png --wait --download --out-dir ./out/mesh
cat ./character.png | assethub parts split --stdin --file-name character.png --part-extractor "V1.5" --wait --all-ready --download --out-dir ./out/parts
base64 -i ./character.png | assethub parts split --stdin-base64 --file-name character.png --content-type image/png --part-extractor "V1.5" --wait --all-ready
printf '{"image_url":{"url":"data:image/png;base64,..."}}' | assethub parts split --stdin-json --part-extractor "V1.5" --wait --all-ready
assethub parts split --clipboard --file-name character.png --part-extractor "V1.5" --wait --all-ready
cat ./character.png | assethub parts compare --stdin --file-name character.png --preprocess-prompt "clean white background" --part-extractor "V1.5" --wait --all-ready

Agent-oriented input:

  • --file <path> uploads a local image or mesh through the public file API.
  • --stdin --file-name <name> accepts raw piped bytes. Give a file name with an extension when possible.
  • --stdin-base64 --file-name <name> --content-type <type> accepts raw base64 from stdin. It also accepts a full data:*;base64,... value.
  • --stdin-data-uri accepts a data URI from stdin.
  • --stdin-json accepts common agent payload shapes from stdin, including OpenAI-style {"image_url":{"url":"..."}}, Anthropic-style {"source":{"type":"base64","media_type":"image/png","data":"..."}}, resourceId, fileRef, dataUri, base64, url, and local path.
  • --source-json <json|@file|@-> parses the same JSON shapes from an argument, a file, or stdin.
  • --data-uri <uri> accepts data:image/png;base64,... style inputs and uploads them before running the target command.
  • --clipboard reads an image from the macOS clipboard for image inputs. It uses pngpaste when available and falls back to the system clipboard bridge.
  • --source-url, --source-id/--source-resource-id, and --file-ref-json can be reused across image, mesh, and part extraction commands where the API supports them.

For Codex or other AI agents, the important contract is: if the runtime can expose the attachment as bytes, base64, a data URI, a local path, an OpenAI/Anthropic-style JSON object, or a URL, the CLI can consume it directly. It does not require writing a temporary file first.

Agent-oriented output:

  • stdout is one final JSON object.
  • polling progress goes to stderr.
  • --download --out-dir <dir> recursively downloads public artifact URLs from job or production status payloads and writes a manifest.json.

assethub parts compare runs the normal part split first. When --preprocess-prompt <text> is provided, it then uses the Nano Banana image model to generate a preprocessed image, waits for that image job to finish, and runs a second split on the generated image. The final JSON contains direct and preprocessed sections so agents can compare both outputs. If preprocessing fails, the direct result is still printed with preprocessed.ok: false; pass --fail-on-preprocess-error when a non-zero exit is preferred. Use --all-ready rather than explicit --task-id values when preprocessing is enabled, because the generated-image split creates a separate production order.

Image generation defaults to the deployed v1 endpoint. Pass --api-version v2 only when the v2 image endpoint is available in the target environment.

Part extraction uses the same public names shown in the AssetHub product: V1, V1.5 alpha, V1.5, V2.0 alpha, and V2.1 alpha. Internal agent IDs are intentionally not part of the public CLI interface.

The CLI only uses AssetHub's public API surface and is designed so this package can be published independently from the private application monorepo.