@cli4ai/mongodb 1.0.2 → 1.0.4

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.
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # @cli4ai/mongodb
2
+
3
+ > Official @cli4ai package • https://cli4ai.com • Install cli4ai: `npm i -g cli4ai`
4
+
5
+ MongoDB explorer and query helper (JSON in/out).
6
+
7
+ ## Setup
8
+
9
+ ```bash
10
+ npm i -g cli4ai
11
+ cli4ai add -g mongodb
12
+ ```
13
+
14
+ Optional: set a default connection URI (defaults to `mongodb://localhost:27017`):
15
+
16
+ ```bash
17
+ cli4ai secrets set MONGO_URI
18
+ ```
19
+
20
+ ## Commands
21
+
22
+ ```bash
23
+ cli4ai run mongodb databases
24
+ cli4ai run mongodb collections <db>
25
+ cli4ai run mongodb schema <db> <collection> [samples]
26
+ cli4ai run mongodb find <db> <collection> [queryJson] [limit]
27
+ cli4ai run mongodb one <db> <collection> [queryJson]
28
+ cli4ai run mongodb aggregate <db> <collection> <pipelineJson>
29
+ cli4ai run mongodb count <db> <collection> [queryJson]
30
+ cli4ai run mongodb indexes <db> <collection>
31
+ cli4ai run mongodb stats <db> <collection>
32
+ cli4ai run mongodb distinct <db> <collection> <field> [queryJson]
33
+ cli4ai run mongodb sample <db> <collection> [size]
34
+ cli4ai run mongodb explain <db> <collection> [queryJson]
35
+ ```
36
+
37
+ ## Examples
38
+
39
+ ```bash
40
+ # List databases
41
+ cli4ai run mongodb databases
42
+
43
+ # Find recent users (query/pipeline args are JSON)
44
+ cli4ai run mongodb find app users '{"status":"active"}' 10
45
+ cli4ai run mongodb aggregate app events '[{"$match":{"type":"signup"}},{"$limit":5}]'
46
+ ```
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongodb",
3
- "version": "1.0.0",
3
+ "version": "1.0.4",
4
4
  "description": "MongoDB queries",
5
5
  "author": "cliforai",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cli4ai/mongodb",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "MongoDB queries",
5
5
  "author": "cliforai",
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "type": "module",
12
12
  "keywords": [
13
- "c4ai",
13
+ "cli4ai",
14
14
  "cli",
15
15
  "ai-tools",
16
16
  "mongodb",
@@ -20,21 +20,20 @@
20
20
  ],
21
21
  "repository": {
22
22
  "type": "git",
23
- "url": "https://github.com/cli4ai/packages",
23
+ "url": "https://github.com/cliforai/packages",
24
24
  "directory": "packages/mongodb"
25
25
  },
26
- "homepage": "https://github.com/cli4ai/packages/tree/main/packages/mongodb",
26
+ "homepage": "https://github.com/cliforai/packages/tree/main/packages/mongodb",
27
27
  "bugs": {
28
- "url": "https://github.com/cli4ai/packages/issues"
28
+ "url": "https://github.com/cliforai/packages/issues"
29
29
  },
30
30
  "dependencies": {
31
- "@cli4ai/lib": "^1.0.0",
32
- "commander": "^14.0.0",
33
- "mongodb": "^6.0.0"
31
+ "mongodb": "^6.0.0",
32
+ "commander": "^14.0.0"
34
33
  },
35
34
  "files": [
36
35
  "run.ts",
37
- "c4ai.json",
36
+ "cli4ai.json",
38
37
  "README.md",
39
38
  "LICENSE"
40
39
  ],