Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

moha-hub

Latest version: v2.1.2

Overview

Last scanned
26 Nov 2026
Published
26 Nov 2026
PyPI package Publisher: xiaoshiai
4 Versions
328 Downloads

Scan summary

moha-hub was last scanned on 26 Nov 2026 at version 2.1.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 4 versions, all published within 5 days (22–26 Nov 2026).
  • Findings: No rules fired in version 2.1.2.
  • Downloads: 328 downloads.

Versions

4 versions published
Versions and the rules that fired in each
VersionPublishedStatus
2.1.2 LATEST 26 Nov 2026 No rules fired
2.1.1 23 Nov 2026 No rules fired
2.1.0 23 Nov 2026 No rules fired
2.0.3 22 Nov 2026 Not shown

No rules fired in 2.1.2

Findings

Findings for v2.1.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 2.1.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Moha Hub Python SDK

Python Support License

Moha Hub Python SDK provides Python APIs and the moha CLI for working with Moha Hub repositories. It supports model, dataset, and Space repository management, upload/download workflows, token or username/password authentication, organization selection, and optional envelope encryption for large model files.

Features

  • Python APIs similar to common Hub SDK patterns.
  • moha CLI for authentication, repository management, branch management, upload, download, Space operations, and AI assistant workflows.
  • Token authentication and username/password authentication.
  • Current organization selection through moha organization use or moha org use.
  • ASCII table output for structured CLI command results.
  • Single-file and snapshot downloads with include/exclude filters.
  • File and folder uploads with optional encryption for large model files.
  • Space creation, deploy, redeploy, status, and log streaming APIs.
  • OpenAI-compatible AI assistant with function calling.
  • Type hints for IDE support.

Installation

Moha SDK requires Python 3.10 or later.

pip install moha-hub

Upload support is built in; the [upload] extra remains available for backward compatibility:

pip install "moha-hub[upload]"

Install a branch directly from GitHub:

pip install "git+https://github.com/poxiaoyun/moha-sdk.git@<branch-name>"

Install the local checkout for testing:

pip install -e ".[dev,upload]"

Verify the CLI entry point:

moha -h

Quick Start

CLI
# Show the compact default banner and usage.
moha

# Show full help.
moha -h

# Show basic or detailed debug information (place -v before the command).
moha -v
moha -v list model
moha -vvv download demo/my-model

# Log in with a token.
moha login https://rune.develop.xiaoshiai.cn --token your-token

# Log in interactively.
moha login https://rune.develop.xiaoshiai.cn

# Select an organization for unqualified repository IDs.
moha organization use demo

# List organizations. The current organization is marked with '*'.
moha org list

# Create and inspect repositories.
moha create model my-model --description "My model"
moha info model my-model

# Upload a folder or a single file.
moha upload my-model ./my_model
moha ul my-model ./my_model
moha upload my-model ./config.yaml configs/config.yaml

# Download a repository snapshot or selected files.
moha download my-model
moha dl my-model
moha download my-model config.yaml tokenizer.json

# Deploy and inspect a Space.
moha deploy demo/my-space
moha status demo/my-space
moha logs demo/my-space
moha logs demo/my-space -f -c web

The login endpoint must include a URL scheme:

moha login https://rune.develop.xiaoshiai.cn

Do not pass a bare host such as rune.develop.xiaoshiai.cn. After login succeeds, the endpoint is saved in ~/.moha/config.json; all later CLI commands use that saved endpoint, so --endpoint is not needed or accepted.

Debug output

Use counted -v flags before the command:

  • -v prints basic diagnostics: command, configured endpoint, authentication source, HTTP request/response summaries, and upload/download progress messages.
  • -vv adds SDK debug context such as the current organization.
  • -vvv adds detailed, redacted request metadata, response headers, runtime versions, and configuration paths.

Passwords, tokens, authorization headers, file contents, AI messages, and signed URL credentials are redacted. Raw third-party wire logging stays disabled.

Python API
from xiaoshiai_hub import moha_hub_download, snapshot_download

file_path = moha_hub_download(
    repo_id="demo/my-model",
    filename="config.yaml",
    repo_type="models",
    token="your-token",
)
print(f"Downloaded to: {file_path}")

repo_path = snapshot_download(
    repo_id="demo/my-model",
    repo_type="models",
    allow_patterns=["*.yaml", "*.md"],
    ignore_patterns=[".git*", "*.log"],
    token="your-token",
)
print(f"Snapshot downloaded to: {repo_path}")
from xiaoshiai_hub import upload_file, upload_folder

upload_file(
    path_file="./config.yaml",
    path_in_repo="config.yaml",
    repo_id="demo/my-model",
    repo_type="models",
    commit_message="Upload config file",
    token="your-token",
)

upload_folder(
    folder_path="./my_model",
    repo_id="demo/my-model",
    repo_type="models",
    commit_message="Upload model files",
    ignore_patterns=["*.log", ".git*"],
    token="your-token",
)
HubClient
import sys

from xiaoshiai_hub import HubClient

client = HubClient(token="your-token")

repos = client.list_repositories(
    repo_type="models",
    scope="organization",
    organization="demo",
)
for repo in repos:
    print(f"{repo.organization}/{repo.name} - {repo.description}")

client.create_repository(
    organization="demo",
    repo_type="models",
    repo_name="my-model",
    description="My model",
    visibility="internal",
    metadata={
        "license": ["apache-2.0"],
        "frameworks": ["transformers"],
    },
    base_model=["demo/base-llama"],
    relationship="finetune",
)

repo_info = client.get_repository_info("demo", "models", "my-model")
print(f"Repository: {repo_info.organization}/{repo_info.name}")

client.update_repository(
    organization="demo",
    repo_type="models",
    repo_name="my-model",
    description="Updated description",
)

refs = client.get_repository_refs("demo", "models", "my-model")
for ref in refs:
    print(f"Branch: {ref.name} (commit: {ref.hash[:8]})")

Authentication

The SDK supports token authentication and username/password authentication.

Authentication precedence:

  1. CLI arguments
  2. Environment variables
  3. Locally saved token

Useful environment variables:

export MOHA_TOKEN="your-token"
export MOHA_USERNAME="your-username"
export MOHA_PASSWORD="your-password"
export MOHA_ORGANIZATION="demo"

After moha login <endpoint>, the token, endpoint, and username are stored together in ~/.moha/config.json with user-only permissions. A persisted current organization is kept in the same file. Existing ~/.moha/token.json files remain readable for compatibility and are removed after the next successful login. The MOHA_ENDPOINT environment variable remains available as the default for direct Python SDK calls, but the CLI uses the endpoint saved by login.

Organizations

Use organization or the org alias:

moha organization list
moha organization list --mine
moha organization use demo

moha org list
moha org use demo

organization list fetches all accessible organizations and renders them in a table. The current organization is marked with *.

Current organization precedence:

  1. --organization
  2. MOHA_ORGANIZATION
  3. Local config saved by moha organization use

Once selected, repository commands can omit the organization prefix:

moha organization use demo
moha create model my-model --description "My model"
moha upload my-model ./my_model
moha download my-model

CLI Commands

Top-level commands are grouped by function in moha -h.

Group Command Description
Auth login Log in and save token
Auth logout Log out and delete saved token
Auth whoami Show current login status
Organization organization list / org l List organizations
Organization organization use / org u Select current organization
Repository list / ls List repositories and images
Repository create / c Create repositories and images
Repository info / i Show repository and image information
Repository update / u Update repositories and images
Repository delete / del Delete repositories and images
Branch refs List repository refs
Branch branch-create / bc Create branch
Branch branch-delete / bd Delete branch
Branch branch-list / bl List branches
Transfer upload / ul Upload a file or folder
Transfer upload-file Upload one file
Transfer download / dl Download a snapshot or selected files
Transfer download-file Download one file
Space deploy Deploy Space
Space redeploy Redeploy Space
Space stop Stop Space
Space status Show Space status
Space logs Show Space logs
AI ai Start the AI assistant
AI ai-config Configure the AI assistant
Legacy repo-list List repositories
Legacy repo-create Create repository
Legacy repo-info Show repository information
Legacy repo-update Update repository
Legacy repo-delete Delete repository
Legacy space-deploy Deploy Space
Legacy space-redeploy Redeploy Space
Legacy space-status Show Space status

Legacy command names remain available and are listed after the primary commands.

Structured CLI results use ASCII tables. Interactive prompts, errors, progress bars, and AI assistant natural-language responses remain plain terminal text.

Repository Commands

moha list shows resource-specific help. By default, list commands show resources in the current organization; pass --all (-a) to include public resources from all organizations, --mine (-m) for resources you created, or --favorite (-f) for favorited resources. moha create and moha info also use resource-specific subcommands. moha update and moha delete use the same resource-specific structure. Destructive commands prompt for --yes-i-really-mean-that; pass --force to skip the prompt. Image list output includes the full repository path and tag count. Image info output includes supported architectures when tag metadata is available. Model list output includes encryption type. Encrypted models show a lock emoji plus the encryption algorithm; unencrypted models show -. Space list output includes emoji runtime status after the repository type column. Space logs use the Space pod log WebSocket proxy. If a pod has multiple containers, pass --container / -c with the container name. Use --follow / -f to stream logs in real time. Short resource aliases are also available: model / m, dataset / ds, image / img, and space / s.

moha list model
moha ls m
moha list models --all
moha list dataset --mine
moha list image --favorite
moha list space --organization demo
moha list model --mine --organization demo

moha create model demo/my-model --description "My model" --visibility internal
moha c m demo/my-model --description "My model"
moha create dataset demo/my-dataset --description "My dataset"
moha create image demo/runtime --repo registry.example/demo/runtime --visibility internal
moha create space demo/my-space --description "My Space"
moha info model demo/my-model
moha i img demo/runtime
moha info image demo/runtime
moha update model demo/my-model --description "Updated description"
moha update image demo/runtime --description "Updated image"
moha delete model demo/my-model
moha del img demo/runtime --force

Branch Commands

moha refs demo/my-model
moha branch-list demo/my-model
moha bl demo/my-model
moha branch-create demo/my-model dev --from main
moha bc demo/my-model dev --from main
moha branch-delete demo/my-model dev
moha bd demo/my-model dev --force

Upload and Download

moha upload demo/my-model ./my_model
moha ul demo/my-model ./my_model
moha upload demo/my-model ./my_model artifacts
moha upload demo/my-model ./config.yaml configs/config.yaml

moha upload demo/my-model ./my_model \
  --revision main \
  --message "Upload model files" \
  --ignore "*.log" \
  --exclude ".git*"

moha upload demo/my-model ./model.safetensors \
  --encrypt \
  --encryption-password "your-secure-password"

moha download demo/my-model
moha dl demo/my-model
moha download demo/my-model config.yaml tokenizer.json
moha download demo/my-model --include "*.json" --exclude "*.log" --local-dir ./downloads

The legacy upload order is still accepted:

moha upload ./my_model demo/my-model

Encryption

Large model files can be encrypted during upload.

Supported algorithms:

Algorithm Description
AES AES-256-CTR, default
SM4 SM4-CTR

Automatic encryption applies only when:

  1. File size is at least 5 MB.
  2. File extension is one of the supported model file extensions, such as .safetensors, .bin, .pt, .pth, or .ckpt.

Small files and non-model files remain readable.

from xiaoshiai_hub import upload_file

upload_file(
    path_file="./model.safetensors",
    path_in_repo="model.safetensors",
    repo_id="demo/my-model",
    repo_type="models",
    encryption_password="your-secure-password",
    algorithm="AES",
    token="your-token",
)

Spaces

from xiaoshiai_hub import HubClient

client = HubClient(token="your-token")

clusters = client.list_clusters("demo")
workspaces = client.list_cluster_workspaces("demo", clusters[0].id)
flavors = client.list_workspace_flavors("demo", clusters[0].id, workspaces[0].id)
products = client.list_products("demo")  # Space applications use category "space"
product = products[0]

client.create_space_repository(
    organization="demo",
    repo_name="my-space",
    cluster=clusters[0].id,
    namespace=workspaces[0].id,
    product_id=product.id,
    product_version=product.versions[0].version,
    tenant=product.tenant,
    visibility="internal",
    flavor=flavors[0].id if flavors else None,
    env=[{"key": "MODEL_NAME", "value": "llama-7b"}],
    description="My Space app",
)

client.deploy_space("demo", "my-gradio-app")
status = client.get_space_status("demo", "my-gradio-app")
print(f"Status: {status.phase}, healthy: {status.healthy}")

pods = client.list_space_pods("demo", "my-gradio-app")
pod_name = pods[0]["metadata"]["name"]
client.stream_space_logs(
    "demo",
    "my-gradio-app",
    pod=pod_name,
    container="web",
    follow=True,
    on_message=sys.stdout.write,
)

AI Assistant

Configure an OpenAI-compatible Chat Completion API:

moha ai-config
moha ai-config --api-base https://api.deepseek.com --api-key your-api-key --model deepseek-chat
moha ai-config --show

Or use environment variables:

export MOHA_AI_API_BASE="https://api.deepseek.com"
export MOHA_AI_API_KEY="your-api-key"
export MOHA_AI_MODEL="deepseek-chat"

Start interactive mode or run a one-shot prompt:

moha ai
moha ai --model deepseek-chat
moha ai --no-stream
moha ai --prompt "List model repositories I created."

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases moha-hub

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229