Skip to main content

CLI tool for MetaV Visual Dashboard Platform

Project description

MetaV CLI (metav-cli)

Command-line interface for MetaV Visual Dashboard Platform.

Installation

Prerequisites

  • Python 3.8+
  • MetaV server running

Install CLI

cd agent-harness
pip install -e .

Configuration

Set environment variables or use command-line options:

export METAV_BASE_URL=http://localhost:10517/metav
export METAV_AUTHKEY=your_auth_key_here

Or use command-line options:

metav-cli --base-url http://localhost:10517/metav --authkey your_key app list

Usage

Authentication

# Login with username/password
metav-cli auth login -u username -p password

# Set authkey
metav-cli auth set-authkey your_auth_key

# Check status
metav-cli auth status

# Logout
metav-cli auth logout

Application Management

# List applications
metav-cli app list
metav-cli app list --page 1 --page-size 50 --keyword search

# Get application details
metav-cli app get <app_id>

# Create application
metav-cli app create --name "My Dashboard" --remark "Created via CLI"

# Update application
metav-cli app update <app_id> --name "New Name" --remark "Updated"

# Delete application
metav-cli app delete <app_id> --force

# Export/Import
metav-cli app export <app_id> --output myapp.zip
metav-cli app import myapp.zip

# Copy application
metav-cli app copy <app_id> --name "Copy of My Dashboard"

# Release/Publish
metav-cli app release <app_id>

Page Management

# List pages
metav-cli page list --app-id <app_id>

# Get page details
metav-cli page get <page_id>

# Create page
metav-cli page create --app-id <app_id> --name "New Page"

# Delete page
metav-cli page delete <page_id> --force

DataSource Management

# List data sources
metav-cli datasource list
metav-cli datasource list --page-size 100

# List all data sources
metav-cli datasource list-all

# Get data source
metav-cli datasource get <datasource_id>

# Create data source
metav-cli datasource create --name "My API" --type restful --config '{"url": "/api/data"}'

# Delete data source
metav-cli datasource delete <datasource_id> --force

Dashboard Operations

# Create dashboard from pageSchema
metav-cli dashboard create --app-name "My Dashboard" --schema schema.json --remark "AI created"

# List available templates (only id/name/placeholders)
metav-cli dashboard templates
metav-cli dashboard templates --name "经营"

# Create dashboard from template json payload
metav-cli dashboard template-create --input template-create.json

# List components
metav-cli dashboard components

# Get dashboard info
metav-cli dashboard info <app_id>

template-create.json example:

{
  "templateId": "2039000000000000001",
  "appName": "经营驾驶舱-副本",
  "placeholderReplacements": {
    "summary_card": {
      "component": "text-panel",
      "version": "1.0.0",
      "props": {}
    },
    "detail_table": {
      "component": "basic-table",
      "version": "1.0.0",
      "props": {}
    }
  }
}

说明:

placeholderReplacements 会在模板所有页面中按具名占位匹配替换;
替换时会保留模板节点的 x/y/width/height(位置和尺寸)以及 id。

Information Commands

# Current user info
metav-cli info user

# Show configuration
metav-cli info config

# Show session info
metav-cli info session

# Show environment variables
metav-cli info env

JSON Output

Use --json flag for machine-readable output:

metav-cli app list --json
metav-cli app get <app_id> --json

Interactive REPL

metav-cli repl

REPL Commands

metav> app list              # List applications
metav> dashboard components  # List components
metav> auth status           # Show auth status
metav> info config           # Show configuration
metav> exit                  # Exit REPL

Session Management

The CLI stores session data in ~/.metav_session.json:

  • Authentication token
  • User info
  • Default base URL
  • Default app/page IDs

Exit Codes

  • 0: Success
  • 1: API error
  • 2: Configuration error

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metav_cli-0.2.14.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metav_cli-0.2.14-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file metav_cli-0.2.14.tar.gz.

File metadata

  • Download URL: metav_cli-0.2.14.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for metav_cli-0.2.14.tar.gz
Algorithm Hash digest
SHA256 2b48e20627564218db4c2be3fab63f953dd2ca8fef3cf2bc34c9e4e2731f7f06
MD5 10af4c69963fc2f352ed46cb9e999ca8
BLAKE2b-256 b39d1cfbddadcf8e1ab9f8d18fc4ad99910291146ae5e8ce5392f06a1489546f

See more details on using hashes here.

File details

Details for the file metav_cli-0.2.14-py3-none-any.whl.

File metadata

  • Download URL: metav_cli-0.2.14-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for metav_cli-0.2.14-py3-none-any.whl
Algorithm Hash digest
SHA256 5db4f0e89b7dcbac1728f95fe4eca73809d49cb721c5a2040021f62c74ac7650
MD5 2a84f80320ba94783a375ed81da536e8
BLAKE2b-256 8e2ee6d06883a5ecfe374f7bb280d966e4c87c90c3b68c3ee2d01ba2cbd3162a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page