Skip to main content

Milvus_CLI🚀

GitHub release (latest by date including pre-releases) PyPI PyPI - Downloads GitHub release (latest by date including pre-releases) Docker Pulls GitHub repo size PyPI - License

Overview

Milvus Command Line Interface based on Milvus Python SDK.

  • Applicable to most platforms: MS Windows, macOS, Ubuntu

  • Support pip install & offline installation package

  • Support single executable file

  • Milvus Python SDK full function coverage

  • Built-in help function

  • Support auto completion

Project Structure

milvus_cli/
├── Core Modules
│   ├── main.py          # Main entry point
│   ├── Cli.py           # CLI command interface
│   ├── Connection.py    # Milvus connection management
│   ├── Collection.py    # Collection operations
│   ├── Database.py      # Database management
│   ├── Index.py         # Index management
│   ├── Partition.py     # Partition management
│   ├── Data.py          # Data import/export
│   ├── Role.py          # Role management
│   ├── User.py          # User management
│   ├── Alias.py         # Alias management
│   ├── Fs.py            # File system operations
│   ├── Types.py         # Data type definitions
│   ├── utils.py         # Utility functions
│   └── Validation.py    # Input validation
├── scripts/             # CLI command implementations
│   ├── milvus_cli.py    # Main CLI script
│   ├── connection_cli.py # Connection-related commands
│   ├── collection_cli.py # Collection-related commands
│   ├── database_cli.py  # Database-related commands
│   ├── index_cli.py     # Index-related commands
│   ├── partition_cli.py # Partition-related commands
│   ├── data_cli.py      # Data-related commands
│   ├── role_cli.py      # Role-related commands
│   ├── user_cli.py      # User-related commands
│   ├── alias_cli.py     # Alias-related commands
│   └── helper_cli.py    # Helper commands
├── test/                # Unit tests (internal APIs)
│   ├── test_config.py
│   ├── test_connection_client.py
│   ├── test_collection_client.py
│   └── ...
└── tests/               # Integration tests (CLI commands)
    ├── conftest.py
    ├── test_connection.py
    ├── test_collection.py
    └── ...

Core Components

  • Core Modules: Implement the main functionality logic of Milvus CLI, each module handles specific Milvus feature domains
  • scripts/: Contains all CLI command implementations, providing user interaction interfaces
  • milvus_cli/test/: Unit tests for internal Python modules and classes
  • tests/: Integration tests for CLI commands and user interface

Installation methods

🔝Install in a Python environment

Prerequisites

Python >= 3.8.5

Run pip install pymilvus>=2.5.0 Run pip install milvus-cli==1.0.2

Install from a tarball

  1. Download the latest release of milvus_cli-<version>.tar.gz.
  2. Run pip install milvus_cli-<version>.tar.gz.

Install from source code

  1. Run git clone https://github.com/zilliztech/milvus_cli.git.
  2. Run cd milvus_cli.
  3. Run pip install --editable .

Docker image in docker hub

docker run -it zilliz/milvus_cli:latest

Usage

Run milvus_cli (in a Python environment) or double click milvus_cli-<version>.exe file (in a Windows environment).

Run Milvus_CLI

  • In a Python environment, run milvus_cli.

Document

https://milvus.io/docs/cli_commands.md

Testing

This project has two types of tests:

Integration Tests (CLI Commands)

Test the command-line interface and user experience.

# Run all integration tests
source venv/bin/activate
python run_tests.py --uri http://localhost:19530

# Or use pytest directly
MILVUS_URI=http://localhost:19530 pytest tests/ -v

See TESTING.md for detailed guide.

Unit Tests (Internal APIs)

Test Python modules and classes directly.

# Run all unit tests
python -m unittest discover milvus_cli/test

# Run specific test
python -m unittest milvus_cli.test.test_connection_client

See milvus_cli/test/README.md for configuration details.

Community

💬 Community isn’t just about writing code together. Come join the conversation, share your knowledge and get your questions answered on Milvus Slack Channel!

Miluvs Slack Channel






Release files for milvus-cli 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for milvus-cli 1.2.1
File Size Uploaded
milvus_cli-1.2.1.tar.gz 91.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for milvus-cli 1.2.1
File Interpreter ABI Platform
milvus_cli-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 216.5 kB

Release files / milvus_cli-1.2.1.tar.gz

Download URL milvus_cli-1.2.1.tar.gz
Size 91.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ae8818265dac647985235d721b1ca988f32270e386f40d15cb4f96078cb5c8ed
BLAKE2b-256 checksum
How to use checksums
0c5e7709a7291736f66bc8a5b6da56d3ee1b5dcdc2d14fba0105f4e5f3ca847a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.18

Release files / milvus_cli-1.2.1-py3-none-any.whl

Download URL milvus_cli-1.2.1-py3-none-any.whl
Size 125.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c85a98ee649fc81fbb05bbec7cc6bae758dd9001d38fc088587efb9b06396a86
BLAKE2b-256 checksum
How to use checksums
6a7ecc03bc2703534d446f447d3f542f2f02af06c4f2059faa9636309ca41283
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.18

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page