@jsondb-cloud/cli 1.0.12 → 1.0.13

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.
Files changed (2) hide show
  1. package/README.md +160 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,160 @@
1
+ # @jsondb-cloud/cli
2
+
3
+ The official CLI tool for [jsondb.cloud](https://jsondb.cloud) — a hosted JSON document database.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@jsondb-cloud/cli)](https://www.npmjs.com/package/@jsondb-cloud/cli)
6
+ [![npm downloads](https://img.shields.io/npm/dm/@jsondb-cloud/cli)](https://www.npmjs.com/package/@jsondb-cloud/cli)
7
+ [![CI](https://github.com/JsonDBCloud/cli/actions/workflows/ci.yml/badge.svg)](https://github.com/JsonDBCloud/cli/actions)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
9
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)
10
+
11
+ ## Install
12
+
13
+ ### npm
14
+
15
+ ```bash
16
+ npm install -g @jsondb-cloud/cli
17
+ ```
18
+
19
+ ### Homebrew
20
+
21
+ ```bash
22
+ brew install jsondbcloud/tap/jsondb
23
+ ```
24
+
25
+ ### Standalone binaries
26
+
27
+ Download prebuilt binaries from [GitHub Releases](https://github.com/JsonDBCloud/cli/releases).
28
+
29
+ Available platforms: macOS (arm64, x64), Linux (x64, arm64).
30
+
31
+ ## Quick Start
32
+
33
+ ```bash
34
+ # Authenticate
35
+ jsondb login
36
+
37
+ # List collections
38
+ jsondb collections
39
+
40
+ # Push local data
41
+ jsondb push ./data/users.json --to users
42
+
43
+ # Get a document
44
+ jsondb get users/usr_abc123
45
+
46
+ # Pull collection to file
47
+ jsondb pull users --out users.json
48
+ ```
49
+
50
+ ## Configuration
51
+
52
+ ### Auth
53
+
54
+ `jsondb login` prompts for your API key interactively. Keys start with `jdb_sk_`.
55
+
56
+ Credentials are stored at `~/.config/jsondb/credentials.json`.
57
+
58
+ ### Environment variables
59
+
60
+ | Variable | Description |
61
+ |----------|-------------|
62
+ | `JSONDB_API_KEY` | API key (overrides stored credentials) |
63
+ | `JSONDB_PROJECT` | Default project namespace |
64
+ | `JSONDB_BASE_URL` | API base URL (for self-hosted or staging) |
65
+
66
+ ### Global flags
67
+
68
+ | Flag | Description |
69
+ |------|-------------|
70
+ | `--api-key <key>` | API key for this request |
71
+ | `--project <ns>` | Project namespace |
72
+ | `--base-url <url>` | API base URL |
73
+ | `--format <fmt>` | Output format: `json`, `raw`, `ndjson`, `table` |
74
+
75
+ ## Commands
76
+
77
+ ### Auth
78
+
79
+ | Command | Description |
80
+ |---------|-------------|
81
+ | `login` | Authenticate with your API key |
82
+ | `logout` | Remove stored credentials |
83
+ | `whoami` | Show the current authenticated user |
84
+
85
+ ### Documents
86
+
87
+ | Command | Description |
88
+ |---------|-------------|
89
+ | `get <path>` | Retrieve a document by path |
90
+ | `create <collection>` | Create a new document in a collection |
91
+ | `update <path>` | Replace a document at the given path |
92
+ | `patch <path>` | Partially update a document |
93
+ | `delete <path>` | Delete a document |
94
+
95
+ ### Collections
96
+
97
+ | Command | Description |
98
+ |---------|-------------|
99
+ | `collections` | List all collections |
100
+ | `documents <collection>` | List documents in a collection |
101
+
102
+ ### Import/Export
103
+
104
+ | Command | Description |
105
+ |---------|-------------|
106
+ | `push <file> --to <collection>` | Import a local JSON file into a collection |
107
+ | `pull <collection>` | Export a collection to a local file |
108
+
109
+ ### Schema
110
+
111
+ | Command | Description |
112
+ |---------|-------------|
113
+ | `schema get <collection>` | Retrieve the schema for a collection |
114
+ | `schema set <collection>` | Set or update a collection schema |
115
+ | `schema remove <collection>` | Remove the schema from a collection |
116
+
117
+ ### Versions
118
+
119
+ | Command | Description |
120
+ |---------|-------------|
121
+ | `versions list <collection> <id>` | List version history for a document |
122
+ | `versions get <collection> <id> <version>` | Retrieve a specific version |
123
+ | `versions diff <collection> <id>` | Show diff between versions |
124
+ | `versions restore <collection> <id> <version>` | Restore a document to a previous version |
125
+
126
+ ### Webhooks
127
+
128
+ | Command | Description |
129
+ |---------|-------------|
130
+ | `webhooks list <collection>` | List webhooks for a collection |
131
+ | `webhooks create <collection>` | Create a new webhook |
132
+ | `webhooks get <collection> <id>` | Get webhook details |
133
+ | `webhooks update <collection> <id>` | Update a webhook |
134
+ | `webhooks delete <collection> <id>` | Delete a webhook |
135
+ | `webhooks test <collection> <id>` | Send a test event to a webhook |
136
+
137
+ ### Utilities
138
+
139
+ | Command | Description |
140
+ |---------|-------------|
141
+ | `validate <collection>` | Validate documents against the collection schema |
142
+ | `count <collection>` | Count documents in a collection |
143
+ | `bulk <collection>` | Perform bulk operations on a collection |
144
+
145
+ ## Documentation
146
+
147
+ Full documentation at [jsondb.cloud/docs](https://jsondb.cloud/docs).
148
+
149
+ ## Related Packages
150
+
151
+ | Package | Description |
152
+ |---------|-------------|
153
+ | [@jsondb-cloud/client](https://github.com/JsonDBCloud/node) | JavaScript/TypeScript SDK |
154
+ | [@jsondb-cloud/mcp](https://github.com/JsonDBCloud/mcp) | MCP server for AI agents |
155
+ | [@jsondb-cloud/cli](https://github.com/JsonDBCloud/cli) | CLI tool |
156
+ | [jsondb-cloud](https://github.com/JsonDBCloud/python) (PyPI) | Python SDK |
157
+
158
+ ## License
159
+
160
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsondb-cloud/cli",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "CLI tool for jsondb.cloud — push, pull, manage your JSON database from the terminal",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",