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
β βββ 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 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!