JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q25935F
  • License ISC

Adis CLI for interacting with Qdrant and Milvus databases.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (adis-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Adis CLI Usage

    Run the database containers (Milvus and Qdrant)

    docker compose up -d
    pnpm link --global
    adis --help
    To view subcommands available under a specific top-level command, use the command without arguments. For example, to explore the seed subcommand:
    adis seed
    To access detailed help for a specific command or subcommand, use the --help flag:
    adis COMMAND [SUBCOMMAND ...] --help
    For example, to view help for the query command for Qdrant:
    adis query qdrant --help

    Qdrant

    • Does not natively support databases. All collections exist within the same Qdrant instance.
    • To mimic database behavior, you can use the --db-name flag to simulate multiple databases.

    Seed Example Usage

    adis seed qdrant \
      --db-url http://127.0.0.1:6333 \
      --db-name my_database \
      --collection-name my_collection \
      --num-vectors 100 \
      --vector-dim 128 \
      --metric-type Cosine \
      --vector-config '{"size":128,"distance":"Cosine"}' \
      --payload-template '{"type":"user", "age":30}'

    Simple Query Example Usage

    adis query qdrant -dn my_database -cl my_collection -vec vec.json 

    Milvus:

    • Supports the concept of databases. Each database can contain multiple collections.
    • You can specify a database name using the --db-name flag.

    Seed Example Usage

    adis seed milvus \
      --db-url http://localhost:19530 \
      --db-name my_database \
      --collection-name my_collection \
      --num-vectors 100 \
      --vector-dim 128 \
      --index-type IVF_FLAT \
      --metric-type COSINE \
      --custom-fields '[{"name":"age","data_type":"Int64"}]' \
      --payload-template '{"type":"user", "age":30}' \
      --schema-description "Schema for my collection"

    Simple Query Example Usage

    adis query milvus -dn my_database -cl my_collection -vec vec.json --metric-type COSINE

    Milvus vs. Qdrant CLI Comparison

    Aspect Milvus Qdrant
    Database Type Argument (dbType) Required as an argument for CLI commands (milvus or qdrant) Required as an argument for CLI commands (milvus or qdrant)
    Database Name (dbName) Required, allows using multiple databases. Passed explicitly during seeding and queries. Optional. Simulated by concatenating it with the collection name (e.g., db_collection).
    Database URL (dbUrl) Required. Defaults to http://localhost:19530 but can be overridden in CLI commands. Required. Defaults to http://127.0.0.1:6333 but can be overridden in CLI commands.
    Collection Name (collectionName) Required. Used directly without concatenation. Required. Combined with dbName to simulate multi-database behavior.
    Metric Type (metricType) Optional for queries. Can be specified ad hoc (L2, COSINE, etc.) in search operations. Required during collection creation. Fixed for all queries against the collection.
    Vector Dimension (vectorDim) Required during seeding. Specifies the dimensionality of the vector field. Required during seeding. Specifies the dimensionality of the vector field.
    Number of Vectors (numVectors) Required during seeding. Specifies how many vectors are seeded. Required during seeding. Specifies how many vectors are seeded.
    Custom Fields (customFields) Optional during seeding. JSON defining additional fields for the collection schema. Not applicable. Payload fields are added directly in the payloadTemplate.
    Payload Template (payloadTemplate) Optional during seeding. Defines default values for payload fields. Optional during seeding. Defines default values for payload fields.
    Index Type (indexType) Required during seeding. Defaults to HNSW. Determines the indexing strategy. Not applicable. Indexing is handled implicitly based on the metric type.
    Query Vector (vector) Required during queries. JSON array of numbers to perform similarity search. Required during queries. JSON array of numbers to perform similarity search.
    Query Limit (limit) Optional during queries. Defaults to 5. Specifies the number of search results. Optional during queries. Defaults to 5. Specifies the number of search results.
    Collection Creation Behavior Dynamically checks and recreates collections if needed. Dynamically checks and recreates collections if needed.
    Seeding Behavior Requires collection schema, including vector field and additional fields (customFields). Requires collection schema, including vector configuration and payload template.
    Query Flexibility Metric type can be specified per query. Metric type is fixed per collection, based on seeding configuration.
    Default Metric Type Defaults to COSINE but can be overridden for each query. Defaults to Cosine during seeding and cannot be changed for queries.
    Indexing Explicitly specified during seeding (IVF_FLAT, HNSW, etc.). Implicitly determined based on the metric type specified during seeding.
    Collection Loading Explicitly loaded into memory before queries. No explicit loading required; queries are performed directly on existing collections.
    Seeding Multi-Databases Supports true multi-database behavior (dbName directly passed to Milvus). Simulated by concatenating dbName and collectionName.
    Query Multi-Databases Supports true multi-database behavior with explicit dbName argument. Simulated by concatenating dbName and collectionName.
    CLI Subcommand adis seed milvus and adis query milvus adis seed qdrant and adis query qdrant
    Performance Focus Flexibility: Query metric type and indexing strategy can be changed. Consistency: Metric type and indexing strategy fixed for each collection.