melange-cli

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2026 License: Apache-2.0

README

Melange CLI

melange is the public command-line interface for Melange, an on-device AI deployment platform by ZETIC.

It is designed agents-first: non-interactive safe, structured --json output, stable exit codes, and machine-actionable errors. Give your AI agent access to Melange.

Install

Homebrew (macOS or Linux):

brew install zetic-ai/tap/melange

npm (macOS, Linux, or Windows):

npm install -g @zetic-ai/melange-cli
Alternatives: Installer script, Go, and manual installation

The macOS/Linux installer requires cosign and verifies the release-workflow signature and checksum:

curl -fsSL https://raw.githubusercontent.com/zetic-ai/melange-cli/main/script/install.sh | sh

With a current Go toolchain:

go install github.com/zetic-ai/melange-cli/cmd/melange@latest

Prebuilt binaries for macOS, Linux, and Windows on amd64/arm64, with checksums and SBOMs, are available on the releases page.

Agent skills

An agent skill is available for driving melange from Claude Code, Codex, Cursor, OpenCode, and other compatible coding agents.,

# Install for universal agents and Claude Code
npx skills add zetic-ai/melange-cli --skill melange-cli \
  --agent universal claude-code --global --yes

# Or choose one or more supported agents interactively
npx skills add zetic-ai/melange-cli --skill melange-cli --global

# Update the installed skill after a melange-cli release
npx skills update melange-cli --global

Installing the melange binary does not install or update the agent skill. Restart your agent after installation so it can discover the skill.

Authentication

Create a Personal Access Token in Melange → Settings → Personal Access Tokens. Get it here, then:

Set environment variable with your Melange PAT:

export MELANGE_API_KEY="ztp_your_personal_access_token"

Or login (stored securely across platforms):

melange auth login
Check status
melange auth status

Build with AI

What's supported

With the agent skill installed, your agent can:

  • Search the public model library and inspect available model versions.
  • Compare real device benchmarks, targets, and report availability.
  • Create and manage repositories, imports, uploads, and model versions.
  • Generate exact deployment guides for Android, iOS, and Flutter.
  • Check authentication, usage, quotas, and plan-specific availability.
Quick start

Discover and deploy

Find a computer vision model by Meta in the Melange model library,
review its real device benchmark results, and give me the iOS deployment code/guide.

Upload a model

I want to upload model.pt2 with sample.npy to Melange.
Upload the model, monitor conversion, and report the final status without retrying implicitly.

Compare benchmarks

Compare Gemma4 with another llm available in Melange. Use only benchmark values returned by Melange.
Show throughput and peak memory for iPhone 16 and Galaxy S25 where available.

Documentation

License

Apache-2.0

Directories

Path Synopsis
cmd
melange command
Command melange is the entry point for the melange CLI.
Command melange is the entry point for the melange CLI.
internal
api
Package api provides the HTTP client wrapper for the Melange public API: transport chain (auth, retry, debug), error-envelope decoding, and the hand-written calls that will later be replaced by a generated client.
Package api provides the HTTP client wrapper for the Melange public API: transport chain (auth, retry, debug), error-envelope decoding, and the hand-written calls that will later be replaced by a generated client.
api/gen
Package gen provides primitives to interact with the openapi HTTP API.
Package gen provides primitives to interact with the openapi HTTP API.
build
Package build provides version information set at build time via -ldflags.
Package build provides version information set at build time via -ldflags.
cmd/api
Package api implements `melange api`, the authenticated raw-request escape hatch: any /v1 endpoint is callable through the standard transport chain even when no dedicated command wraps it yet.
Package api implements `melange api`, the authenticated raw-request escape hatch: any /v1 endpoint is callable through the standard transport chain even when no dedicated command wraps it yet.
cmd/auth
Package auth implements the `melange auth` command family: login, logout, status, and token.
Package auth implements the `melange auth` command family: login, logout, status, and token.
cmd/deploy
Package deploy exposes deterministic SDK deployment guides from public-v1.
Package deploy exposes deterministic SDK deployment guides from public-v1.
cmd/library
Package library implements `melange library` — browsing the public model library: listing and filtering models, viewing a single model with its readme, and listing the providers.
Package library implements `melange library` — browsing the public model library: listing and filtering models, viewing a single model with its readme, and listing the providers.
cmd/model
Package model implements `melange model` — uploading models through the ingestion v2 protocol (manifest, resumable GCS uploads, verify/complete), tracking their conversion status, browsing models and their converted targets, and downloading target artifacts.
Package model implements `melange model` — uploading models through the ingestion v2 protocol (manifest, resumable GCS uploads, verify/complete), tracking their conversion status, browsing models and their converted targets, and downloading target artifacts.
cmd/plan
Package plan implements `melange plan` — the account's effective billing plan identity (the tier its quotas derive from).
Package plan implements `melange plan` — the account's effective billing plan identity (the tier its quotas derive from).
cmd/repo
Package repo implements `melange repo` — commands for managing model repositories on the Melange platform.
Package repo implements `melange repo` — commands for managing model repositories on the Melange platform.
cmd/report
Package report implements `melange report` — reading a model's benchmark reports (general, LLM, package) as the dashboard-grade table on a terminal and as raw, one-record-per-line TSV for scripts.
Package report implements `melange report` — reading a model's benchmark reports (general, LLM, package) as the dashboard-grade table on a terminal and as raw, one-record-per-line TSV for scripts.
cmd/root
Package root wires the top-level `melange` cobra command.
Package root wires the top-level `melange` cobra command.
cmd/usage
Package usage implements `melange usage` — the current billing-period usage counters and, via `usage quotas`, those counters against the plan limits.
Package usage implements `melange usage` — the current billing-period usage counters and, via `usage quotas`, those counters against the plan limits.
cmd/version
Package version implements the `melange version` command.
Package version implements the `melange version` command.
cmdutil
Package cmdutil provides shared utilities for CLI commands: the Factory, error types, and exit-code mapping.
Package cmdutil provides shared utilities for CLI commands: the Factory, error types, and exit-code mapping.
config
Package config handles loading, saving, and resolving configuration values for the melange CLI.
Package config handles loading, saving, and resolving configuration values for the melange CLI.
downloadstate
Package downloadstate serializes and persists one logical, billable model download authorization.
Package downloadstate serializes and persists one logical, billable model download authorization.
httpmock
Package httpmock provides a minimal mock http.RoundTripper for tests, modeled on gh's pkg/httpmock (simplified).
Package httpmock provides a minimal mock http.RoundTripper for tests, modeled on gh's pkg/httpmock (simplified).
iostreams
Package iostreams provides the IOStreams abstraction used throughout the CLI.
Package iostreams provides the IOStreams abstraction used throughout the CLI.
keyring
Package keyring stores Melange credentials in the OS keychain via zalando/go-keyring.
Package keyring stores Melange credentials in the OS keychain via zalando/go-keyring.
tableprinter
Package tableprinter renders rows of fields either as a padded, truncated table for terminals or as stable tab-separated lines for machine consumers.
Package tableprinter renders rows of fields either as a padded, truncated table for terminals or as stable tab-separated lines for machine consumers.
text
Package text provides small formatting helpers shared by command output: rune-safe truncation, compact relative timestamps, and byte sizes.
Package text provides small formatting helpers shared by command output: rune-safe truncation, compact relative timestamps, and byte sizes.
upload
Package upload implements the client half of the Melange ingestion v2 protocol: manifest digesting, persisted upload-session state, and the GCS resumable upload protocol over v4 signed URLs.
Package upload implements the client half of the Melange ingestion v2 protocol: manifest digesting, persisted upload-session state, and the GCS resumable upload protocol over v4 signed URLs.
wait
Package wait provides a generic context-aware polling loop with exponential backoff, full jitter, and an overall timeout.
Package wait provides a generic context-aware polling loop with exponential backoff, full jitter, and an overall timeout.
tools
gendocs command
Command gendocs regenerates the Markdown CLI reference in docs/reference from the live cobra command tree.
Command gendocs regenerates the Markdown CLI reference in docs/reference from the live cobra command tree.
openapi30 command
Command openapi30 repairs and validates semantics that the pinned generic 3.1->3.0 converter does not preserve for oapi-codegen: nullable unions.
Command openapi30 repairs and validates semantics that the pinned generic 3.1->3.0 converter does not preserve for oapi-codegen: nullable unions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL