@vcityio/cli 0.9.1 → 0.10.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 +89 -1
- package/dist/index.js +329 -88
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,11 +67,14 @@ Every read command accepts `--json` for scripting. Output auto-falls-back to JSO
|
|
|
67
67
|
| `vcity whoami [--json]` | Print the logged-in user + active org. |
|
|
68
68
|
| `vcity org list [--json]` | List orgs you can access. |
|
|
69
69
|
| `vcity org use <slug>` | Set the active org. |
|
|
70
|
+
| `vcity org settings [--org <slug>] [--json]` | The store's editable settings. |
|
|
71
|
+
| `vcity org set [--name --description --website --contact-email --phone --whatsapp --instagram --timezone --locale --country-code --seo-title --seo-description --color-main] [--data <json\|@file\|->]` | Change store settings; only the fields you pass change. Anything without a flag (tax, shipping days, address…) goes in `--data`. |
|
|
70
72
|
| `vcity products list [--org <slug>] [--limit <n>] [--skip <n>] [--visibility public\|draft\|hidden] [--created-from <date\|ms>] [--updated-from <date\|ms>] [--collection <id>] [--sort createdAt\|updatedAt] [--order asc\|desc] [--lang <locale>] [--json]` | List products of the active org with paging, filters and ordering; `--lang es` serves translated copy. |
|
|
71
73
|
| `vcity products get <id> [--org <slug>] [--lang <locale>] [--json]` | Print a single product (`--lang` as above). |
|
|
72
74
|
| `vcity products create [--name --price --currency --sku --data @file] [--json]` | Create a product. `--data` seeds the body; named flags override. |
|
|
73
75
|
| `vcity products update <id> [--name --price --currency --sku --visibility --availability --data]` | Patch product fields. |
|
|
74
76
|
| `vcity products delete <id> [--yes] [--json]` | Soft-delete a product. Asks y/N unless `--yes`. |
|
|
77
|
+
| `vcity products import <file.csv\|file.json> [--upsert-by sku\|none] [--images <dir>] [--dry-run] [--report <errors.json>] [--json]` | Bulk create/update. Rows whose `sku` already exists are updated, the rest created (`--upsert-by none`: always create). See [Importing products](#importing-products). |
|
|
75
78
|
| `vcity events list [--org <slug>] [--limit <n>] [--status active\|disabled] [--json]` | List events. |
|
|
76
79
|
| `vcity events get <id> [--org <slug>] [--json]` | Print a single event. |
|
|
77
80
|
| `vcity events create [--name --starts-at --ends-at --slug --data]` | Create an event. `--starts-at` / `--ends-at` accept ISO or epoch-ms. |
|
|
@@ -79,6 +82,7 @@ Every read command accepts `--json` for scripting. Output auto-falls-back to JSO
|
|
|
79
82
|
| `vcity events delete <id> [--yes]` | Soft-delete an event. |
|
|
80
83
|
| `vcity agents list [--org <slug>] [--limit <n>] [--json]` | List the org's AI agents (needs the `agents:read` scope). |
|
|
81
84
|
| `vcity agents get <id> [--org <slug>] [--json]` | Print one agent with its instructions and memory. |
|
|
85
|
+
| `vcity agents update <id> [--name <s>] [--description <s>] [--emoji <s>] [--avatar <https-url>] [--instructions <s> \| --instructions-file <path>] [--disable] [--org <slug>] [--json]` | Edit an agent's labels or instructions, or switch it off (needs `agents:write`). Turning it on, autonomy, trigger and tools stay in the web admin. The built-in Data Agent is read-only. If the agent changed while you edited, the command fails with a 409: run it again. |
|
|
82
86
|
| `vcity customer-agent get [--org <slug>] [--json]` | How the public Customer Agent is configured (needs `agents:read`). |
|
|
83
87
|
| `vcity customer-agent knowledge [--org <slug>] [--json]` | Documents the Customer Agent searches to answer shoppers. |
|
|
84
88
|
| `vcity conversations list [--org <slug>] [--status open\|all] [--awaiting-reply] [--json]` | Newest inbox conversations, at most 30 (needs `conversations:read`; contains customer names). |
|
|
@@ -99,20 +103,102 @@ Every read command accepts `--json` for scripting. Output auto-falls-back to JSO
|
|
|
99
103
|
| `vcity rooms create [--title --description --type --data]` | Create a room. |
|
|
100
104
|
| `vcity rooms update <id> [--title --description --type --disabled --data]` | Patch room fields. |
|
|
101
105
|
| `vcity rooms delete <id> [--yes]` | Soft-delete a room. |
|
|
102
|
-
| `vcity bookings list [--org <slug>] [--limit <n>] [--status <s>] [--json]` | List bookings. |
|
|
106
|
+
| `vcity bookings list [--org <slug>] [--limit <n>] [--status <s>] [--from <date>] [--to <date>] [--json]` | List bookings, optionally for a date range. |
|
|
107
|
+
| `vcity bookings today [--org <slug>] [--json]` | Today's agenda (your local day), earliest first, cancellations hidden. |
|
|
108
|
+
| `vcity bookings slots [--from <date>] [--to <date>] [--days <n>] [--type <bookingTypeId>]` | Free booking slots, the times a customer could book now. |
|
|
109
|
+
| `vcity bookings time-off list [--uid] [--from] [--to]` · `add --uid <uid> --from <date> --to <date> [--reason] [--all-day] [--recurring]` · `remove <id> [--yes]` | A member's time off, which closes their slots. |
|
|
110
|
+
| `vcity bookings hours <uid> [--data <json\|@file\|->]` | A member's weekly working hours; `--data` replaces them (`[{"dayOfWeek":1,"isWorkingDay":true,"startTime":"09:00","endTime":"17:00"},…]`). |
|
|
103
111
|
| `vcity bookings get <id> [--org <slug>] [--json]` | Print a single booking. |
|
|
104
112
|
| `vcity analytics summary [--org <slug>] [--from <YYYY-MM-DD>] [--to <YYYY-MM-DD>] [--json]` | Visit totals for a UTC day range (shortened to the org's analytics plan). |
|
|
105
113
|
| `vcity analytics visits [--org <slug>] [--from <d>] [--to <d>] [--group-by day\|type] [--json]` | Visits per day or page type. |
|
|
106
114
|
| `vcity analytics top-products [--org <slug>] [--from <d>] [--to <d>] [--limit <n>] [--json]` | Most viewed products. |
|
|
107
115
|
| `vcity orders list [--org <slug>] [--limit <n>] [--status <s>] [--json]` | List orders. |
|
|
108
116
|
| `vcity orders get <id> [--org <slug>] [--json]` | Print a single order. |
|
|
117
|
+
| `vcity orders export [--from <date>] [--to <date>] [--status <s>] [--format csv\|json] [--output <file>]` | Every matching order (paged through automatically) as CSV (default) or JSON, to stdout or `--output`. Text cells that start with `=`, `+`, `-` or `@` are prefixed with `'` so a spreadsheet won't run them. |
|
|
118
|
+
| `vcity orders ship <orderId> [lineItemId...] [--status shipped\|delivered] [--json]` | Mark the named line items shipped (or delivered), or every line of the order that is not there yet. Status only moves forward. |
|
|
119
|
+
| `vcity media upload <file> [file…]` | Upload images (≤10 MB), PDFs (≤25 MB) or videos (≤100 MB) to the store's media and print their public URLs, for product/event/blog images or `vcity org set --data '{"logo":"…"}'`. |
|
|
120
|
+
| `vcity status [--org <slug>] [--timeframe today\|week\|month\|quarter\|year\|all] [--json]` | Store health on one screen: unread inbox, pending orders/bookings, sales and visits, and what needs attention. |
|
|
109
121
|
| `vcity quotes list [--org <slug>] [--limit <n>] [--status <s>] [--json]` | List quote requests. |
|
|
110
122
|
| `vcity quotes get <id> [--org <slug>] [--json]` | Print a single quote. |
|
|
111
123
|
| `vcity quotes create [--name --email --product --quantity --phone --variation --company --note --data]` | Create a quote request. |
|
|
112
124
|
| `vcity quotes update <id> [--status --assignee --name --email --product --quantity --phone --variation --company --note --data]` | Patch quote fields. |
|
|
113
125
|
| `vcity quotes delete <id> [--yes] [--json]` | Delete a quote. Asks y/N unless `--yes`. |
|
|
126
|
+
| `vcity crm contacts list [--q <text>] [--tags a,b] [--sort …] [--archived] [--limit <n>] [--skip <n>] [--all] [--json]` | CRM contacts; `--all` pages through every match. |
|
|
127
|
+
| `vcity crm contacts get\|create\|update <id> [--name --email --phone --company --job-title --notes --tags a,b --source --data]` | Read or write one contact. |
|
|
128
|
+
| `vcity crm contacts archive <id> [--yes]` · `restore <id>` · `tag <id> [--add a,b] [--remove c]` (tag id, slug or name) · `timeline <id>` | Archive (restorable), tag and see every interaction of a contact. |
|
|
129
|
+
| `vcity crm contacts export [--q --tags --archived] [--format csv\|json] [--output <file>]` | Every matching contact as CSV (tags `\|`-joined) or JSON. |
|
|
130
|
+
| `vcity crm contacts import <file.csv> [--dry-run] [--report <errors.json>]` | Upsert by `id` (from an export) or email (case-insensitive); new contacts get `source: csv`. Rows matching a platform contact (a shopper, read-only) are skipped. Same columns as the export; exits `1` if any row failed. |
|
|
131
|
+
| `vcity crm tags list\|create [--name <s>] [--color <#hex>]` · `vcity crm follow-ups [--due-before <date>]` · `vcity crm audiences [<id>]` | Tags, follow-up cards that are due, and audiences with their contacts. |
|
|
132
|
+
| `vcity webhooks list\|get <id>` | Webhook endpoints (secrets and header values are never returned). |
|
|
133
|
+
| `vcity webhooks create --url <https://…> --events order.created,product.created,booking.created [--header "Name: value"] [--description <s>]` | Register an endpoint. Prints the signing secret once. |
|
|
134
|
+
| `vcity webhooks update <id> [--url --events --status active\|paused --description --data]` · `delete <id> [--yes]` | Change, pause or remove an endpoint. Custom headers are replaced as a whole: pass all of them with `--data '{"headers":{…}}'`. |
|
|
135
|
+
| `vcity webhooks test <id>` | Send a signed test event and show the receiver's answer; exits `1` if it failed. |
|
|
136
|
+
| `vcity webhooks deliveries <id> [--failed] [--limit <n>] [--before <ms>]` | Delivery log, newest first. |
|
|
137
|
+
| `vcity webhooks rotate <id> [--yes]` | New signing secret (shown once); the old one stops working immediately. |
|
|
138
|
+
| `vcity configurators list\|seeds` · `get <id>` · `create --seed <id> \| --data <json>` · `update <id> --data <patch> [--bump-version]` · `delete <id>` | Product configurators (Configurator module). |
|
|
139
|
+
| `vcity rooms show\|messages\|send\|search\|read <roomId>` | Any chat room you can open by id: DMs, your chats with stores, robot rooms, team channels (user login). |
|
|
140
|
+
| `vcity surveys create --title <s> [--data <json>]` · `update\|publish\|close\|delete <id>` | Write surveys (`crm:write`). |
|
|
141
|
+
| `vcity comments edit <id> --message <s>` · `delete\|pin\|unpin <id>` | Edit or delete your comments; store admins pin. |
|
|
142
|
+
| `vcity chat channel rename <channelId> [--name <s>] [--description <s>]` · `channel delete <channelId>` | Manage team channels (store admins). |
|
|
143
|
+
| `vcity billing [summary\|invoices\|usage\|credits]` | Plan by module, invoices, AI credits and recording storage (`billing:read` keys). |
|
|
144
|
+
| `vcity storefront [get]` · `domain <host>` · `verify` · `remove-domain` · `redirects` | Storefront settings, custom domain status with the DNS records to add, redirects. Domain changes need a user login. |
|
|
145
|
+
| `vcity newsletter config\|subscribers\|stats` | Newsletter settings, subscribers and growth. |
|
|
146
|
+
| `vcity surveys list [--status draft\|active\|closed]` · `get <id>` · `responses <id>` | Surveys and their answers. |
|
|
147
|
+
| `vcity comments list <table:id>` · `add <table:id> --message <s> [--parent <id>]` · `reactions <table:id>` · `react <table:id> <emoji> [--remove]` | Comments and reactions on products, events, cards… (user login). |
|
|
148
|
+
| `vcity inbox search <conversationId> --query <text>` | Find messages in a customer conversation. |
|
|
149
|
+
| `vcity pos session` · `open --cash <n> --currency USD\|COP` · `close <sessionId> --cash <n>` · `summary <sessionId>` · `sales` · `sale <id>` · `sell --data <json> [--idempotency-key <k>]` · `favorites [--set a,b]` | The register (`pos:read`/`pos:write`). |
|
|
150
|
+
| `vcity dropshipping connections\|products` · `import --connection <id> --products a,b (--markup-percent <n> \| --markup-fixed <n>)` · `fulfillments <orderId>` · `retry <fulfillmentId>` | Supplier products and orders; imports are queued, never called live. |
|
|
151
|
+
| `vcity coupons list [--active]` · `get <id>` | Store coupons, newest first. |
|
|
152
|
+
| `vcity coupons create --code <CODE> (--percent <n> \| --amount <n> --currency USD\|COP \| --type free-shipping) [--until <date>] [--max-uses <n>] [--min-order <n>]` | New coupon; anything else (buy X get Y, product scopes) via `--data`. |
|
|
153
|
+
| `vcity coupons update <id> …` · `activate <id>` · `deactivate <id>` · `validate <CODE> [--data '{"cart":{…}}']` | Edit, switch on/off, or check whether a code would redeem. |
|
|
154
|
+
| `vcity products\|events\|blogs draft <id>` · `stage <id> --data <json>` · `publish <id>` · `discard-draft <id> [--yes]` | The web editor's draft lifecycle: read or stage unpublished edits, publish them, or throw them away. |
|
|
155
|
+
| `vcity products\|events visibility <id> public\|hidden` | The live show/hide switch. |
|
|
156
|
+
| `vcity products\|events\|blogs list --search <text>` | Filter a list by text. |
|
|
157
|
+
| `vcity agents run <agentId>` · `runs [--agent <id>]` · `run-get <runId>` · `cancel-run <runId>` | Run an agent now and follow its runs (signed-in users only). |
|
|
158
|
+
| `vcity agents proposals [--status pending]` · `approve <id> [--yes] [--notify-customer]` · `reject <id>` | Review what agents propose before it reaches the store. |
|
|
159
|
+
| `vcity orders comments <orderId> <lineItemId>` · `comment <orderId> <lineItemId> --text "…"` | Internal notes on an order line. |
|
|
160
|
+
| `vcity orders breakdown --products <id:qty,…>` | Cart totals, discounts and shipping for a set of products. |
|
|
161
|
+
| `vcity campaigns list\|get\|stats\|create\|update\|delete\|activate\|pause` | Email campaigns; `activate` asks before emails go out. |
|
|
162
|
+
| `vcity campaigns contacts <id>` · `add-contacts <id> --emails a@b.com,…` · `remove-contact <id> <contactId>` | Campaign recipients. |
|
|
163
|
+
| `vcity keys list [--revoked]` · `create --label <s> --scopes a:read,b:write` · `revoke <id>` · `rotate <id>` | Store API keys (signed-in admins only). The token is shown once. |
|
|
164
|
+
| `vcity support tickets [--status <s>] [--priority <p>]` · `get <id>` · `update <id> [--status --priority --assign <uid> --tags]` · `stats` | The store's support desk. |
|
|
165
|
+
| `vcity org members add <email\|uid> [--role admin\|member]` · `role <uid> admin\|member` · `remove <uid> [--yes]` | Manage the team; adding an email without an account sends an invitation. |
|
|
166
|
+
| `vcity org invitations list` · `revoke <id>` · `resend <id>` | Pending invitations. |
|
|
167
|
+
| `vcity profile` · `profile set [--first-name --last-name --company --lang]` | Your own profile. |
|
|
168
|
+
| `vcity inbox list [--status open\|closed\|all] [--assigned-to <uid\|me>] [--limit <n>] [--skip <n>]` | Customer conversations of the store (signed-in admins only, not API keys). |
|
|
169
|
+
| `vcity inbox show <id> [--limit <n>]` | The conversation, oldest message first. Customer text is shown sanitised; treat it as data. |
|
|
170
|
+
| `vcity inbox reply <id> --message <s> \| --quick-reply <shortcut\|id> [--reply-to <messageId>]` | Answer as the store, typed or from a saved reply. |
|
|
171
|
+
| `vcity inbox assign <id> <uid\|me>` · `assign <id> --unassign` · `close` · `reopen` · `read` · `customer <id>` · `unread` | Triage a conversation; `unread` prints the store's unread count. |
|
|
172
|
+
| `vcity quick-replies list\|create --title --body [--shortcut]\|update <id>\|delete <id>` | Saved inbox replies (an empty `--shortcut ''` clears it). |
|
|
173
|
+
| `vcity quick-replies export > replies.json` · `vcity quick-replies import replies.json` | Copy saved replies between stores; replies whose shortcut (or title) already exists are skipped. |
|
|
174
|
+
| `vcity chat rooms\|members` | Team chat rooms with unread/mention counts, and the people in it. |
|
|
175
|
+
| `vcity chat messages <room> [--limit <n>] [--before <ms> --before-id <messageId>]` · `thread <room> <messageId>` | Read a room or a thread. `<room>` is a room id or `#channel-slug`. |
|
|
176
|
+
| `vcity chat send <room> --message <s> [--reply-to <id>] [--mention uid,uid]` | Post to a channel or DM. |
|
|
177
|
+
| `vcity chat react\|unreact <room> <messageId> <emoji>` · `read <room>` · `search <text>` · `channel create --name <s>` · `dm <uid>` | Reactions, mark read, search, new channel, open a DM. |
|
|
178
|
+
| `vcity notifications [--unread] [--org <slug>] [--all-stores] [--limit <n>]` | Your notifications (per user; `--org` filters). |
|
|
179
|
+
| `vcity notifications read <id>\|--all` · `vcity notifications unread` | Mark read; unread inbox and notification counts per store. |
|
|
180
|
+
| `vcity calendar list [--from <date>] [--to <date>] [--days <n>] [--no-overlays]` | Bookings, events, entries, holidays and imported calendars together (default: today + 7 days, at most 62). Dates mean your local day. Signed-in admins only. |
|
|
181
|
+
| `vcity calendar ics [<feedId>] [--output cal.ics]` | Download the iCalendar text of a subscription link. |
|
|
182
|
+
| `vcity calendar feeds list\|create [--scope org\|member] [--show-names\|--hide-names]\|rotate <id>\|revoke <id>` | Manage subscription links. Treat a link as a password: anyone holding it can read the calendar. |
|
|
183
|
+
| `vcity calendar add --title <s> --start <date> --end <date> [--all-day] [--category custom\|timeoff\|meeting --location virtual\|physical]` · `cancel <entryId> [--scope single\|following\|all]` | Create (a `custom` entry unless you pass a category; a meeting needs `--location`) or cancel a calendar entry. |
|
|
184
|
+
| `vcity calendar holidays [--country <CC>] [--year <n>]` · `settings` · `staff` · `external list\|add\|refresh\|remove` | Public holidays, calendar settings, staff, and calendars imported by URL. |
|
|
185
|
+
| `vcity vault list\|get <id>\|search <text>` | Knowledge Vault pages. |
|
|
186
|
+
| `vcity vault create --title <s> [--file page.md]` · `save <id> --file page.md` · `move <id> --parent <id\|root>` · `delete <id>` | Write pages. `save --file` on a file from `vault pull` merges with edits made since the pull; any other save replaces the page and fails with a conflict if it changed meanwhile. |
|
|
187
|
+
| `vcity vault pull <dir> [--force]` · `vcity vault push <dir> [--dry-run]` | The vault as a folder of Markdown files with front matter. `pull` refuses to overwrite edits you have not pushed (`--force` does). `push` sends edited pages (body, title or tags) with the pulled text as the merge base, and creates pages for new files without an `id`. It never deletes pages, and skips files whose page was deleted or renamed on the server. |
|
|
188
|
+
| `vcity desk latest` · `vcity desk download [--os mac\|windows\|linux]` | Latest Vcity Desk release, and the installer link for this (or the named) OS. |
|
|
114
189
|
| `vcity update [--check] [--yes] [--json]` | Self-update the CLI binary. |
|
|
115
190
|
|
|
191
|
+
### Importing products
|
|
192
|
+
|
|
193
|
+
CSV needs a header row. Columns: `name`, `price`, `currencyCode` (or `currency`), `sku`, `visibility`, `availability` (or `stock`), `cta`, `type`, `slug`, `description`, `thumbnail` (or `image`) and `gallery` (`|`-separated), and `tags` / `categories` / `collections` as `|`-separated lists. An image that is not an `http(s)` URL is a file in `--images <dir>` (default: the CSV's folder): it is uploaded once to the store's media and its URL used; `--dry-run` only checks the files exist. Blank cells are skipped, so an update never clears a field. JSON takes an array of product bodies as `POST /products` accepts them. A new product needs `name`, `price` and `currencyCode`.
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
vcity products import catalog.csv --dry-run # what would be created / updated
|
|
197
|
+
vcity products import catalog.csv --report errors.json
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Failing rows don't stop the run; they are listed at the end (and in `--report`), and the command exits `1`.
|
|
201
|
+
|
|
116
202
|
### `--data` flag
|
|
117
203
|
|
|
118
204
|
Create / update commands accept `--data <jsonOrPath>`:
|
|
@@ -188,6 +274,8 @@ Non-zero exit codes:
|
|
|
188
274
|
- `1` — generic error (no active org, no auth, request failed)
|
|
189
275
|
- `2` — usage / bad arguments
|
|
190
276
|
|
|
277
|
+
Bulk commands (`products import`, `orders ship`, `crm contacts import`) process every row first and exit `1` if any failed. Any command waits and retries (up to 3 times) when the API answers `429 Too Many Requests`.
|
|
278
|
+
|
|
191
279
|
## Running from source (monorepo contributors)
|
|
192
280
|
|
|
193
281
|
To exercise an unreleased command without publishing, run the CLI from the monorepo root:
|