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
milvus_cli/
โโโ Core Modules
โ โโโ main.py # Main entry point
โ โโโ Cli.py # CLI command interface
โ โโโ BaseClient.py # Base class for all client modules
โ โโโ ConnectionClient.py # Milvus connection management
โ โโโ CollectionClient.py # Collection operations
โ โโโ DatabaseClient.py # Database management
โ โโโ IndexClient.py # Index management
โ โโโ PartitionClient.py # Partition management
โ โโโ DataClient.py # Data import/export/search
โ โโโ RoleClient.py # Role management
โ โโโ UserClient.py # User management
โ โโโ AliasClient.py # Alias management
โ โโโ ResourceGroup.py # Resource group management
โ โโโ PrivilegeGroup.py # Privilege group management
โ โโโ CliClient.py # Main CLI client (aggregates all modules)
โ โโโ OutputFormatter.py # Output formatting (table/json/csv)
โ โโโ 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
โ โโโ init_client_cli.py # CLI initialization and global state
โ โโโ helper_client_cli.py # REPL loop, command groups, output settings
โ โโโ helper_cli.py # Help, version, history commands
โ โโโ connection_client_cli.py # Connection commands
โ โโโ collection_client_cli.py # Collection commands
โ โโโ database_client_cli.py # Database commands
โ โโโ index_client_cli.py # Index commands
โ โโโ partition_client_cli.py # Partition commands
โ โโโ data_client_cli.py # Data commands
โ โโโ role_client_cli.py # Role commands
โ โโโ user_client_cli.py # User commands
โ โโโ alias_client_cli.py # Alias commands
โ โโโ resource_group_cli.py # Resource group commands
โ โโโ privilege_group_cli.py # Privilege group 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 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
Python >= 3.8.5
Run pip install pymilvus>=2.5.0
Run pip install milvus-cli==1.0.2
- Download the latest release of
milvus_cli-<version>.tar.gz. - Run
pip install milvus_cli-<version>.tar.gz.
- Run
git clone https://github.com/zilliztech/milvus_cli.git. - Run
cd milvus_cli. - Run
pip install --editable .
docker run -it zilliz/milvus_cli:latest
Run milvus_cli (in a Python environment) or double click milvus_cli-<version>.exe file (in a Windows environment).
- In a Python environment, run
milvus_cli.
https://milvus.io/docs/cli_commands.md
This project has two types of tests:
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/ -vSee TESTING.md for detailed guide.
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_clientSee milvus_cli/test/README.md for configuration details.
๐ฌ Community isnโt just about writing code together. Come join the conversation, share your knowledge and get your questions answered on Milvus Slack Channel!