qdrant-rest-cli 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qdrant_rest_cli-0.1.0/PKG-INFO +198 -0
- qdrant_rest_cli-0.1.0/README.md +170 -0
- qdrant_rest_cli-0.1.0/pyproject.toml +45 -0
- qdrant_rest_cli-0.1.0/src/qdrant_rest_cli/__init__.py +1 -0
- qdrant_rest_cli-0.1.0/src/qdrant_rest_cli/cli.py +20 -0
- qdrant_rest_cli-0.1.0/src/qdrant_rest_cli/spec.yaml +17357 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: qdrant-rest-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A full-coverage CLI for the Qdrant vector database REST API, generated from the official OpenAPI spec
|
|
5
|
+
Project-URL: Homepage, https://github.com/shivaam/openapi-cli-gen
|
|
6
|
+
Project-URL: Source, https://github.com/shivaam/openapi-cli-gen/tree/main/wrappers/qdrant-rest-cli
|
|
7
|
+
Project-URL: Issues, https://github.com/shivaam/openapi-cli-gen/issues
|
|
8
|
+
Project-URL: Generator, https://github.com/shivaam/openapi-cli-gen
|
|
9
|
+
Author: Shivam Rastogi
|
|
10
|
+
License: MIT
|
|
11
|
+
Keywords: api,cli,generated,openapi,rest
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Software Development
|
|
24
|
+
Classifier: Topic :: Utilities
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Requires-Dist: openapi-cli-gen>=0.0.14
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# qdrant-rest-cli
|
|
30
|
+
|
|
31
|
+
**A full-coverage CLI for the [Qdrant](https://qdrant.tech) vector database REST API.** Every endpoint in Qdrant's OpenAPI spec, exposed as a typed command. Generated from [Qdrant's official OpenAPI spec](https://github.com/qdrant/qdrant/tree/master/docs/redoc) using [openapi-cli-gen](https://github.com/shivaam/openapi-cli-gen).
|
|
32
|
+
|
|
33
|
+
## Why
|
|
34
|
+
|
|
35
|
+
Qdrant ships excellent client SDKs (Python, Rust, Go, JS), but no REST CLI. For shell scripting, Makefile targets, CI pipelines, and interactive ad-hoc queries, most people drop to raw `curl` and hand-build JSON payloads.
|
|
36
|
+
|
|
37
|
+
This CLI gives you the entire Qdrant REST API as flat shell commands with typed flags — collections, points, snapshots, cluster, shards — without writing any Python or curl boilerplate. When Qdrant adds endpoints, a regeneration picks them up.
|
|
38
|
+
|
|
39
|
+
## Install
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pipx install qdrant-rest-cli
|
|
43
|
+
|
|
44
|
+
# Or with uv
|
|
45
|
+
uv tool install qdrant-rest-cli
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Setup
|
|
49
|
+
|
|
50
|
+
Point it at your Qdrant instance (default is `http://localhost:6333`):
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
export QDRANT_REST_CLI_BASE_URL=http://localhost:6333
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If your instance uses an API key:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
export QDRANT_REST_CLI_API_KEY=your-api-key
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The CLI sends it as the `api-key` header automatically, matching Qdrant's security scheme.
|
|
63
|
+
|
|
64
|
+
## Quick Start
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Server health
|
|
68
|
+
qdrant-rest-cli service root
|
|
69
|
+
qdrant-rest-cli service healthz
|
|
70
|
+
|
|
71
|
+
# List collections
|
|
72
|
+
qdrant-rest-cli collections get-collections
|
|
73
|
+
|
|
74
|
+
# Create a collection (4-dim vectors, cosine distance)
|
|
75
|
+
qdrant-rest-cli collections create \
|
|
76
|
+
--collection-name pets \
|
|
77
|
+
--vectors '{"size": 4, "distance": "Cosine"}'
|
|
78
|
+
|
|
79
|
+
# Upsert points with payloads
|
|
80
|
+
qdrant-rest-cli points upsert --collection-name pets --root '{
|
|
81
|
+
"points": [
|
|
82
|
+
{"id": 1, "vector": [0.1, 0.2, 0.3, 0.4], "payload": {"name": "Rex", "species": "dog"}},
|
|
83
|
+
{"id": 2, "vector": [0.2, 0.1, 0.4, 0.3], "payload": {"name": "Whiskers", "species": "cat"}}
|
|
84
|
+
]
|
|
85
|
+
}'
|
|
86
|
+
|
|
87
|
+
# Count points
|
|
88
|
+
qdrant-rest-cli points count --collection-name pets
|
|
89
|
+
|
|
90
|
+
# Semantic search
|
|
91
|
+
qdrant-rest-cli points search --collection-name pets \
|
|
92
|
+
--vector '[0.15, 0.15, 0.35, 0.35]' \
|
|
93
|
+
--limit 5
|
|
94
|
+
|
|
95
|
+
# Scroll through all points
|
|
96
|
+
qdrant-rest-cli points scroll --collection-name pets --limit 10
|
|
97
|
+
|
|
98
|
+
# Get a collection's info
|
|
99
|
+
qdrant-rest-cli collections get --collection-name pets
|
|
100
|
+
|
|
101
|
+
# Delete a collection
|
|
102
|
+
qdrant-rest-cli collections delete --collection-name pets
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Discover All Commands
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Top-level groups
|
|
109
|
+
qdrant-rest-cli --help
|
|
110
|
+
|
|
111
|
+
# Commands in a group
|
|
112
|
+
qdrant-rest-cli collections --help
|
|
113
|
+
|
|
114
|
+
# Flags for a specific command
|
|
115
|
+
qdrant-rest-cli points search --help
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Output Formats
|
|
119
|
+
|
|
120
|
+
Every command accepts `--output-format`:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
qdrant-rest-cli collections get-collections --output-format table
|
|
124
|
+
qdrant-rest-cli collections get-collections --output-format yaml
|
|
125
|
+
qdrant-rest-cli collections get-collections --output-format raw
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Command Groups
|
|
129
|
+
|
|
130
|
+
| Group | What it covers |
|
|
131
|
+
|---|---|
|
|
132
|
+
| `service` | Server root, health, telemetry, metrics, readiness |
|
|
133
|
+
| `collections` | Full CRUD for collections + aliases + info |
|
|
134
|
+
| `points` | Upsert, get, delete, scroll, count, batch operations |
|
|
135
|
+
| `search` | Vector search, recommend, discover, query |
|
|
136
|
+
| `snapshots` | Create / list / delete / download snapshots |
|
|
137
|
+
| `cluster` | Cluster status, peer management |
|
|
138
|
+
| `shards` | Shard key operations |
|
|
139
|
+
| `indexes` | Payload index management |
|
|
140
|
+
|
|
141
|
+
## Passing Complex JSON Bodies
|
|
142
|
+
|
|
143
|
+
Qdrant endpoints with deeply nested unions (like `points upsert`, batch operations) accept a JSON string via `--root`:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
qdrant-rest-cli points upsert --collection-name pets --root '{
|
|
147
|
+
"points": [...]
|
|
148
|
+
}'
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Flat endpoints (like `collections create`) accept typed flags directly:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
qdrant-rest-cli collections create --collection-name pets --vectors '{"size": 4, "distance": "Cosine"}'
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Both styles work; use whichever is clearer for a given call.
|
|
158
|
+
|
|
159
|
+
## Real Example: End-to-End Vector Search
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
$ qdrant-rest-cli collections create \
|
|
163
|
+
--collection-name movies \
|
|
164
|
+
--vectors '{"size": 4, "distance": "Cosine"}'
|
|
165
|
+
{"result": true, "status": "ok", "time": 0.012}
|
|
166
|
+
|
|
167
|
+
$ qdrant-rest-cli points upsert --collection-name movies --root '{
|
|
168
|
+
"points": [
|
|
169
|
+
{"id": 1, "vector": [0.9, 0.1, 0.1, 0.1], "payload": {"title": "The Matrix"}},
|
|
170
|
+
{"id": 2, "vector": [0.1, 0.9, 0.1, 0.1], "payload": {"title": "Titanic"}}
|
|
171
|
+
]
|
|
172
|
+
}'
|
|
173
|
+
{"result": {"operation_id": 0, "status": "completed"}, "status": "ok"}
|
|
174
|
+
|
|
175
|
+
$ qdrant-rest-cli points search --collection-name movies \
|
|
176
|
+
--vector '[0.85, 0.15, 0.1, 0.1]' \
|
|
177
|
+
--limit 2
|
|
178
|
+
{
|
|
179
|
+
"result": [
|
|
180
|
+
{"id": 1, "score": 0.998, "payload": {"title": "The Matrix"}},
|
|
181
|
+
{"id": 2, "score": 0.204, "payload": {"title": "Titanic"}}
|
|
182
|
+
],
|
|
183
|
+
"status": "ok"
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## How It Works
|
|
188
|
+
|
|
189
|
+
This package is a thin wrapper:
|
|
190
|
+
- Embeds the Qdrant OpenAPI spec (`spec.yaml`)
|
|
191
|
+
- Delegates CLI generation to [openapi-cli-gen](https://github.com/shivaam/openapi-cli-gen) at runtime
|
|
192
|
+
- Default base URL: `http://localhost:6333`
|
|
193
|
+
|
|
194
|
+
Since it's spec-driven, new Qdrant endpoints show up automatically on regeneration — no manual wrapping to fall behind.
|
|
195
|
+
|
|
196
|
+
## License
|
|
197
|
+
|
|
198
|
+
MIT. Not affiliated with Qdrant — this is an unofficial community CLI built on top of their public OpenAPI spec.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# qdrant-rest-cli
|
|
2
|
+
|
|
3
|
+
**A full-coverage CLI for the [Qdrant](https://qdrant.tech) vector database REST API.** Every endpoint in Qdrant's OpenAPI spec, exposed as a typed command. Generated from [Qdrant's official OpenAPI spec](https://github.com/qdrant/qdrant/tree/master/docs/redoc) using [openapi-cli-gen](https://github.com/shivaam/openapi-cli-gen).
|
|
4
|
+
|
|
5
|
+
## Why
|
|
6
|
+
|
|
7
|
+
Qdrant ships excellent client SDKs (Python, Rust, Go, JS), but no REST CLI. For shell scripting, Makefile targets, CI pipelines, and interactive ad-hoc queries, most people drop to raw `curl` and hand-build JSON payloads.
|
|
8
|
+
|
|
9
|
+
This CLI gives you the entire Qdrant REST API as flat shell commands with typed flags — collections, points, snapshots, cluster, shards — without writing any Python or curl boilerplate. When Qdrant adds endpoints, a regeneration picks them up.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pipx install qdrant-rest-cli
|
|
15
|
+
|
|
16
|
+
# Or with uv
|
|
17
|
+
uv tool install qdrant-rest-cli
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Setup
|
|
21
|
+
|
|
22
|
+
Point it at your Qdrant instance (default is `http://localhost:6333`):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
export QDRANT_REST_CLI_BASE_URL=http://localhost:6333
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
If your instance uses an API key:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
export QDRANT_REST_CLI_API_KEY=your-api-key
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The CLI sends it as the `api-key` header automatically, matching Qdrant's security scheme.
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Server health
|
|
40
|
+
qdrant-rest-cli service root
|
|
41
|
+
qdrant-rest-cli service healthz
|
|
42
|
+
|
|
43
|
+
# List collections
|
|
44
|
+
qdrant-rest-cli collections get-collections
|
|
45
|
+
|
|
46
|
+
# Create a collection (4-dim vectors, cosine distance)
|
|
47
|
+
qdrant-rest-cli collections create \
|
|
48
|
+
--collection-name pets \
|
|
49
|
+
--vectors '{"size": 4, "distance": "Cosine"}'
|
|
50
|
+
|
|
51
|
+
# Upsert points with payloads
|
|
52
|
+
qdrant-rest-cli points upsert --collection-name pets --root '{
|
|
53
|
+
"points": [
|
|
54
|
+
{"id": 1, "vector": [0.1, 0.2, 0.3, 0.4], "payload": {"name": "Rex", "species": "dog"}},
|
|
55
|
+
{"id": 2, "vector": [0.2, 0.1, 0.4, 0.3], "payload": {"name": "Whiskers", "species": "cat"}}
|
|
56
|
+
]
|
|
57
|
+
}'
|
|
58
|
+
|
|
59
|
+
# Count points
|
|
60
|
+
qdrant-rest-cli points count --collection-name pets
|
|
61
|
+
|
|
62
|
+
# Semantic search
|
|
63
|
+
qdrant-rest-cli points search --collection-name pets \
|
|
64
|
+
--vector '[0.15, 0.15, 0.35, 0.35]' \
|
|
65
|
+
--limit 5
|
|
66
|
+
|
|
67
|
+
# Scroll through all points
|
|
68
|
+
qdrant-rest-cli points scroll --collection-name pets --limit 10
|
|
69
|
+
|
|
70
|
+
# Get a collection's info
|
|
71
|
+
qdrant-rest-cli collections get --collection-name pets
|
|
72
|
+
|
|
73
|
+
# Delete a collection
|
|
74
|
+
qdrant-rest-cli collections delete --collection-name pets
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Discover All Commands
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Top-level groups
|
|
81
|
+
qdrant-rest-cli --help
|
|
82
|
+
|
|
83
|
+
# Commands in a group
|
|
84
|
+
qdrant-rest-cli collections --help
|
|
85
|
+
|
|
86
|
+
# Flags for a specific command
|
|
87
|
+
qdrant-rest-cli points search --help
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Output Formats
|
|
91
|
+
|
|
92
|
+
Every command accepts `--output-format`:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
qdrant-rest-cli collections get-collections --output-format table
|
|
96
|
+
qdrant-rest-cli collections get-collections --output-format yaml
|
|
97
|
+
qdrant-rest-cli collections get-collections --output-format raw
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Command Groups
|
|
101
|
+
|
|
102
|
+
| Group | What it covers |
|
|
103
|
+
|---|---|
|
|
104
|
+
| `service` | Server root, health, telemetry, metrics, readiness |
|
|
105
|
+
| `collections` | Full CRUD for collections + aliases + info |
|
|
106
|
+
| `points` | Upsert, get, delete, scroll, count, batch operations |
|
|
107
|
+
| `search` | Vector search, recommend, discover, query |
|
|
108
|
+
| `snapshots` | Create / list / delete / download snapshots |
|
|
109
|
+
| `cluster` | Cluster status, peer management |
|
|
110
|
+
| `shards` | Shard key operations |
|
|
111
|
+
| `indexes` | Payload index management |
|
|
112
|
+
|
|
113
|
+
## Passing Complex JSON Bodies
|
|
114
|
+
|
|
115
|
+
Qdrant endpoints with deeply nested unions (like `points upsert`, batch operations) accept a JSON string via `--root`:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
qdrant-rest-cli points upsert --collection-name pets --root '{
|
|
119
|
+
"points": [...]
|
|
120
|
+
}'
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Flat endpoints (like `collections create`) accept typed flags directly:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
qdrant-rest-cli collections create --collection-name pets --vectors '{"size": 4, "distance": "Cosine"}'
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Both styles work; use whichever is clearer for a given call.
|
|
130
|
+
|
|
131
|
+
## Real Example: End-to-End Vector Search
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
$ qdrant-rest-cli collections create \
|
|
135
|
+
--collection-name movies \
|
|
136
|
+
--vectors '{"size": 4, "distance": "Cosine"}'
|
|
137
|
+
{"result": true, "status": "ok", "time": 0.012}
|
|
138
|
+
|
|
139
|
+
$ qdrant-rest-cli points upsert --collection-name movies --root '{
|
|
140
|
+
"points": [
|
|
141
|
+
{"id": 1, "vector": [0.9, 0.1, 0.1, 0.1], "payload": {"title": "The Matrix"}},
|
|
142
|
+
{"id": 2, "vector": [0.1, 0.9, 0.1, 0.1], "payload": {"title": "Titanic"}}
|
|
143
|
+
]
|
|
144
|
+
}'
|
|
145
|
+
{"result": {"operation_id": 0, "status": "completed"}, "status": "ok"}
|
|
146
|
+
|
|
147
|
+
$ qdrant-rest-cli points search --collection-name movies \
|
|
148
|
+
--vector '[0.85, 0.15, 0.1, 0.1]' \
|
|
149
|
+
--limit 2
|
|
150
|
+
{
|
|
151
|
+
"result": [
|
|
152
|
+
{"id": 1, "score": 0.998, "payload": {"title": "The Matrix"}},
|
|
153
|
+
{"id": 2, "score": 0.204, "payload": {"title": "Titanic"}}
|
|
154
|
+
],
|
|
155
|
+
"status": "ok"
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## How It Works
|
|
160
|
+
|
|
161
|
+
This package is a thin wrapper:
|
|
162
|
+
- Embeds the Qdrant OpenAPI spec (`spec.yaml`)
|
|
163
|
+
- Delegates CLI generation to [openapi-cli-gen](https://github.com/shivaam/openapi-cli-gen) at runtime
|
|
164
|
+
- Default base URL: `http://localhost:6333`
|
|
165
|
+
|
|
166
|
+
Since it's spec-driven, new Qdrant endpoints show up automatically on regeneration — no manual wrapping to fall behind.
|
|
167
|
+
|
|
168
|
+
## License
|
|
169
|
+
|
|
170
|
+
MIT. Not affiliated with Qdrant — this is an unofficial community CLI built on top of their public OpenAPI spec.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "qdrant-rest-cli"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A full-coverage CLI for the Qdrant vector database REST API, generated from the official OpenAPI spec"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Shivam Rastogi" },
|
|
14
|
+
]
|
|
15
|
+
keywords = ["cli", "openapi", "rest", "api", "generated"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Environment :: Console",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"License :: OSI Approved :: MIT License",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Topic :: Software Development",
|
|
29
|
+
"Topic :: Utilities",
|
|
30
|
+
]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"openapi-cli-gen>=0.0.14",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://github.com/shivaam/openapi-cli-gen"
|
|
37
|
+
Source = "https://github.com/shivaam/openapi-cli-gen/tree/main/wrappers/qdrant-rest-cli"
|
|
38
|
+
Issues = "https://github.com/shivaam/openapi-cli-gen/issues"
|
|
39
|
+
Generator = "https://github.com/shivaam/openapi-cli-gen"
|
|
40
|
+
|
|
41
|
+
[project.scripts]
|
|
42
|
+
qdrant-rest-cli = "qdrant_rest_cli.cli:main"
|
|
43
|
+
|
|
44
|
+
[tool.hatch.build.targets.wheel]
|
|
45
|
+
packages = ["src/qdrant_rest_cli"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""qdrant-rest-cli CLI — generated by openapi-cli-gen."""
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from openapi_cli_gen import build_cli
|
|
4
|
+
|
|
5
|
+
# Base URL: override via QDRANT_REST_CLI_BASE_URL env var, fall back to spec default
|
|
6
|
+
_base_url = os.environ.get("QDRANT_REST_CLI_BASE_URL") or "http://localhost:6333"
|
|
7
|
+
|
|
8
|
+
app = build_cli(
|
|
9
|
+
spec=Path(__file__).parent / "spec.yaml",
|
|
10
|
+
name="qdrant-rest-cli",
|
|
11
|
+
base_url=_base_url,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def main():
|
|
16
|
+
app()
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
if __name__ == "__main__":
|
|
20
|
+
main()
|