@moxt-ai/cli 0.2.0 → 0.3.1

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 CHANGED
@@ -103,7 +103,7 @@ moxt file get-url -w <workspace-id> --team-space-id <teamSpaceId> -p <path>
103
103
  # Resolve URL in a teammate space (by teammate ID)
104
104
  moxt file get-url -w <workspace-id> --teammate-id <teammateId> -p <path>
105
105
 
106
- # Upload a file
106
+ # Upload a file by path
107
107
  moxt file put -w <workspace-id> -p <path> -l <local-path> [-r]
108
108
 
109
109
  # Upload a file to a teamspace (by name or ID)
@@ -113,6 +113,9 @@ moxt file put -w <workspace-id> --team-space-id <teamSpaceId> -p <path> -l <loca
113
113
  # Upload a file to a teammate space (by teammate ID)
114
114
  moxt file put -w <workspace-id> --teammate-id <teammateId> -p <path> -l <local-path> [-r]
115
115
 
116
+ # Overwrite an existing file by its Moxt URL
117
+ moxt file put --url <moxt-url> -l <local-path>
118
+
116
119
  # Create a directory
117
120
  moxt file mkdir -w <workspace-id> -p <path> [-r]
118
121
  moxt file mkdir -w <workspace-id> -s <teamspace-name> -p <path> [-r]
@@ -126,7 +129,7 @@ moxt file del -w <workspace-id> -s <teamspace-name> -p <path>
126
129
 
127
130
  | Option | Description |
128
131
  |--------|-------------|
129
- | `-w, --workspace <id>` | Workspace ID (required for all except URL mode) |
132
+ | `-w, --workspace <id>` | Workspace ID (required for path mode) |
130
133
  | `-s, --space <name>` | Space name (`personal` or teamspace name) |
131
134
  | `--personal` | Use personal space (default when no space specified) |
132
135
  | `--team-space-id <id>` | Team space ID |
@@ -134,11 +137,12 @@ moxt file del -w <workspace-id> -s <teamspace-name> -p <path>
134
137
  | `-p, --path <path>` | File or directory path |
135
138
  | `-u, --url <url>` | Moxt file URL (e.g., `https://moxt.ai/w/{workspaceId}/{fileId}`) |
136
139
  | `-l, --local-path <path>` | Local file path (for upload) |
137
- | `-r, --recursive` | Create parent directories if needed |
140
+ | `-r, --recursive` | Create parent directories if needed (path mode only) |
138
141
 
139
142
  > **Note**: `-s`, `--personal`, `--team-space-id`, and `--teammate-id` are mutually exclusive.
140
- > For `file read`, use either `--url` or `--workspace` with `--path`. They are mutually exclusive.
141
- > `file get-url` returns a stable Moxt URL (e.g., `https://moxt.ai/w/{workspaceId}/{fileId}`) for the given path; the URL is unchanged across writes to the same path and can be fed back into `file read --url`.
143
+ > For `file read` and `file put`, use either `--url` or `--workspace` with `--path`. They are mutually exclusive.
144
+ > `--url` with `file put` overwrites an existing file identified by the URL; it never creates new files. Use `--recursive` is not allowed in URL mode.
145
+ > `file get-url` returns a stable Moxt URL (e.g., `https://moxt.ai/w/{workspaceId}/{fileId}`) for the given path; the URL is unchanged across writes to the same path and can be fed back into `file read --url` or `file put --url`.
142
146
 
143
147
  ## Configuration
144
148
 
@@ -147,7 +151,64 @@ Set the following environment variables:
147
151
  | Variable | Description |
148
152
  |----------|-------------|
149
153
  | `MOXT_API_KEY` | Your Moxt API key |
150
- | `MOXT_API_URL` | API endpoint (default: `https://api.moxt.ai`) |
154
+ | `MOXT_HOST` | API hostname (default: `api.moxt.ai`) |
155
+ | `MOXT_TELEMETRY_DISABLED` | Set to `1` to disable anonymous usage telemetry |
156
+ | `DO_NOT_TRACK` | Set to `1` to disable anonymous usage telemetry (community standard) |
157
+
158
+ ## Telemetry
159
+
160
+ Moxt CLI collects **anonymous usage data** by default to help us understand how the tool
161
+ is used, prioritize features, and catch regressions. Telemetry is easy to turn off.
162
+
163
+ ### What we collect
164
+
165
+ Every invocation of a Moxt CLI command may record:
166
+
167
+ | Field | Example | Purpose |
168
+ |-------|---------|---------|
169
+ | `command` / `subcommand` | `workspace` / `list` | Which command was invoked |
170
+ | `cli_version` | `1.2.3` | Distribution of CLI versions in use |
171
+ | `node_version` | `20.11.0` | Minimum-supported runtime planning |
172
+ | `os` | `darwin` / `linux` / `win32` | OS support prioritization |
173
+ | `arch` | `arm64` / `x64` | Architecture support prioritization |
174
+ | `status` | `success` / `error` | Success and error rates |
175
+ | `error_code` | `uncaught_exception` | Error classification (best-effort; may be dropped on crash) |
176
+ | `is_ci` | `true` / `false` | Separate CI traffic from human usage |
177
+ | Duration | `0.42` seconds | Performance tracking |
178
+
179
+ User identification: telemetry is only sent while you are authenticated with a Moxt API
180
+ key. Your **user ID is attached server-side** so that product decisions reflect real
181
+ usage patterns.
182
+
183
+ ### What we do NOT collect
184
+
185
+ - Command argument values (file paths, workspace IDs, emails, etc.)
186
+ - File contents, directory names, or any data from your workspace
187
+ - Environment variables
188
+ - Standard output, standard error, or error messages
189
+
190
+ ### How to opt out
191
+
192
+ Any one of the following disables all telemetry:
193
+
194
+ ```bash
195
+ # Environment variable (recommended for CI)
196
+ export MOXT_TELEMETRY_DISABLED=1
197
+
198
+ # Or the community-standard variable
199
+ export DO_NOT_TRACK=1
200
+
201
+ # Or persist the choice
202
+ moxt telemetry disable
203
+ ```
204
+
205
+ Check current status with `moxt telemetry status`. Re-enable with `moxt telemetry enable`.
206
+
207
+ ### Where the data is sent
208
+
209
+ Metrics are sent to `POST /openapi/v1/cli-metrics` on Moxt's API endpoint, authenticated
210
+ with your API key. They are stored in Datadog and used to produce aggregated dashboards
211
+ and reliability monitors.
151
212
 
152
213
  ## License
153
214