Skip to main content
Each command below shows the text that tolstoy <service> <command> --help prints in version 0.4.0 of @tolstoy-ai/cli. tolstoy --version shows the version you have. See Tolstoy CLI to install the CLI and sign in.

ai-widgets

AI widget projects, HTML publishing, plugins, storefront analytics, shopper submissions, reference files, past chats

ai-widgets add-media-to-playlist

Add one media-library item to a playlist.

ai-widgets clone-project

Clone a referenced AI Widget project into a local or temporary folder for inspection

ai-widgets create-playlist

Create a media-library playlist.

ai-widgets delete-playlist

Delete a media-library playlist. Its media stay in the library.

ai-widgets execute-analytics-sql

Run a read-only SQL query on one AI widget’s storefront analytics: its events, the orders it influenced, and video and page performance, for up to 90 days.

ai-widgets execute-store-analytics-sql

Run one read-only SELECT over the whole workspace’s analytics: orders, revenue, sessions, videos, widgets and Meta ads performance. The account filter is added for you and results are capped at 100 rows, so aggregate in SQL.

ai-widgets get-analytics-panels

Get complete analytics panel definitions for an AI widget

ai-widgets get-playlists

List the playlists a widget can show: built-in source playlists (system) and the merchant’s media-library playlists (custom).

ai-widgets get-shopper-store-settings

Read which product pages of a widget show the See it on you and beauty try-on buttons. Change them with plugin-configure —plugin-id shopper-store-settings.

ai-widgets legacy-project-details

Get an older Tolstoy widget (carousel, stories, hero, or player) by its publish ID: settings, filters, media, and brand profile.

ai-widgets list-canvas-assets

List the media assets of up to 20 chats, with createdAt, URL, isHighlighted (proposed for review, not approval) and likedByUser (the person hearted it). —chat-id is a chat you can open; —query ’{“chatIds”:[“id1”,“id2”],“limit”:100}’ picks the chats to read. Page with nextOffset.

ai-widgets list-chats

List workspace chats newest activity first, with creator, folder, team, source and parent chat. dateFrom/dateTo filter on the creation time. The CLI inherits the current chat team. Without an explicit team or inherited context, it lists Main. Sub-agent and automation chats are left out unless includeChildChats is true or parentChatId is given. Page with nextCursor.

ai-widgets list-context-files

List the reference files the AI can use for a widget: the files of its Studio project and the brand files of the project’s stores.

ai-widgets list-customer-data

List what shoppers saved through a widget (quiz answers, preferences, emails), newest first, with filters and a total count. The newest submissions can be missing.

ai-widgets list-live-customer-data

List what shoppers saved through a widget, up to the second, one page at a time, with no filter or sort. Needs a paid plan.

ai-widgets list-projects

List AI Widget projects (widget IDs, names, statuses). Uses the current chat team when inherited; otherwise lists the workspace.

ai-widgets list-subagent-chats

Where the sub-agent chats of a chat’s family stand now: each item with its subagentRunId, chat, name and state (queued, running, completed, failed, abandoned). —chat-id is any chat of the family; the items of one spawn-subagents call share its subagentRunId.

ai-widgets plugin-configure

Replace the saved configuration of one widget plugin: tolstoy-media (media rules), analytics, interactive-quiz, or shopper-store-settings.

ai-widgets project-details

Get one AI widget project by widget ID: name, status, template, publish method, and latest commit.

ai-widgets publish-ai-widget-project

Build the widget and publish it with its publish method: website page, embed, script or Liquid snippet, Tapcart block, or Shopify theme pages. The new version goes live.

ai-widgets publish-html

Publish HTML text or a local HTML file as a public website and return its URL. Each call creates a new page.

ai-widgets read-chat

Read past workspace chats by chat ID, as role and content messages in time order. With includeToolCalls, each tool call shows its input and output (clipped), which carry the IDs of what the chat produced.

ai-widgets read-context-file

Read the text, passages, or download URL of one widget reference file.

ai-widgets remove-media-from-playlist

Remove one media-library item from a playlist.

ai-widgets rename-playlist

Rename a media-library playlist.

ai-widgets search-chats

Semantic search over prior chats and their images and assets. The CLI inherits the current chat team; without an explicit team or inherited context, it searches the teams available to the caller. Use it whenever the user refers to an earlier conversation, decision, draft, brief, headline, file, image or asset. Results carry chat IDs for read-chat —chat-ids.

ai-widgets search-context-files

Search a widget’s reference files by meaning and return the matching passages.

ai-widgets set-analytics-panels

Replace all analytics panels for an AI widget

billing

Credits left and spent, plan and entitlements, Shoppable Videos views

billing get-account-balance

Get the credits the account has left now and has spent this period, for Studio and Shopper, plus Shoppable Videos views.

billing get-billable-impressions-time-series

Get billable Shoppable Videos views per day for a date range, and this period’s views against the plan limit.

billing get-billing-info

Get the account’s current plans, paid-until dates, billing provider, and top-up settings, and the plans offered in the given plan group.

billing get-credits-usage-time-series

Get credits spent per day by Studio or by Shopper for a date range.

billing get-current-billing-store

Get the Shopify store whose subscription pays for the account. Empty when the account pays through Stripe.

billing get-entitlements

Get which features the account’s plan includes, as feature: true or false.

billing get-token-activity

Get the usage history. studio and ai_shopper rows count credits: spent per Studio chat and per Shopper day, and added. ai_player rows count Shoppable Videos views, not credits, and have no costInCents. Usage rows also carry costInCents and userIds; Studio usage rows split it into llmCostInCents and generationCostInCents. sourceChatId links a row to its chat. total is the number of rows.

billing get-usage-data

Get the plan names, monthly credit allowance, credits spent this period, Shoppable Videos views, and billing dates.

brand

The brand profile of each store: name, logo, colors, fonts, audience, size guide, and brand files

brand assign-model-sizes

Propose a size label from the store’s size guide for each ready fashion model, from its measurements. It saves nothing; brand profile field modelSizeOverrides keeps the sizes.

brand delete-brand-context-file

Delete one brand file of a store.

brand extract-brand-kit

Read the logo, colors, fonts, and tone of any public website. It saves nothing. Status extracting means the result is not ready yet.

brand get-brand-context

Get the brand profile of a store: name, website, description, audience, logos, colors, fonts, social links, size guide, and model sizes.

brand get-brand-context-file-download-url

Get a temporary download URL for one brand file.

brand list-brand-context-files

List a store’s brand files (PDFs, images, documents) that the AI uses as brand knowledge, with their status and URL.

brand update-brand-context

Change fields of a store’s brand profile. Each field you send replaces the saved value, and the live storefront widgets use the new value.

folders

Studio projects and their folders, which hold chats, generated media, and widgets

folders create-folder

Create a Studio project, or a folder inside a project when parentFolderId is set

folders list-folders

List the Studio projects and the folders inside them

folders rename-folder

Rename a Studio project or folder

meta-ads

The merchant’s Meta (Facebook and Instagram) ad accounts, campaigns, ads, and performance

meta-ads get-campaign-project-details

Get one Meta campaign that Tolstoy launched or manages, with its catalog, product set, and video.

meta-ads get-campaign-projects

List the Meta campaigns Tolstoy launched or manages, from Tolstoy’s saved records across all ad accounts. Status can be out of date.

meta-ads get-create-campaign-project-status

Get the progress of a Meta campaign launch from Tolstoy by job ID, and the created Meta IDs when it completes.

meta-ads get-meta-ad-preview

Get a preview of a Meta ad creative as iframe HTML, for one placement (feed, story, or reels).

meta-ads get-meta-insights-for-app

Get Meta performance per campaign, ad set, or ad for a date preset: spend, impressions, clicks, CTR, CPC, purchases, and ROAS.

meta-ads get-tolstoy-launched-ads-spend-in-range

Get the total Meta spend, between two dates, of the campaigns Tolstoy launched or manages.

meta-ads list-ad-accounts

List the Meta ad accounts connected to this workspace.

meta-ads list-all-meta-campaigns

List campaigns live from one Meta ad account: the ones Tolstoy launched or manages, or every campaign in the account with showAllMeta.

meta-ads list-connected-meta-ad-accounts

List the Meta ad accounts connected to this workspace.

meta-ads list-meta-ad-sets-for-app

List ad sets live from Meta, with budget, goal, schedule, and countries, filtered by campaign. Only Tolstoy campaigns unless showAllMeta is set.

meta-ads list-meta-ads-for-app

List ads live from Meta, with status, issues, creative, and thumbnail, filtered by campaign or ad set. Only Tolstoy campaigns unless showAllMeta is set.

meta-ads list-pages

List the Facebook Pages the Meta connection can use for ads.

meta-ads list-videos

List the videos already uploaded to one Meta ad account.

meta-ads meta-graph-get

Run a read-only Meta Graph API GET call using the connected Meta Ads integration

meta-ads search-targeting-countries

Search, by name, the countries a Meta campaign can target.

models

The workspace’s fashion models: the people used for try-on and on-model photos, with their images

models create-model-folder

Create an empty folder for fashion models.

models delete-model

Delete a fashion model from the workspace and from every team.

models delete-model-folder

Delete a fashion-model folder. Its models stay in the workspace and in their other folders.

models edit-model

Change a fashion model: name, description, measurements, gender, age group, or images.

models get-model

Get one fashion model by ID, with its images and measurements.

models get-model-folders

List the folders that organize the workspace’s fashion models.

models get-models

List the workspace’s fashion models and Tolstoy’s stock models (defaultModels): name, gender, age group, measurements, and images.

models move-models

Move fashion models that are in at most one folder into another folder, or out of all folders.

models rename-model-folder

Rename a fashion-model folder.

models update-model-folder-membership

Add fashion models to a folder, or remove them from it. Their other folders do not change.

models update-model-team-membership

Share a fashion model with one more team, or remove it from one team. Other teams keep it.

products

The store’s product catalog from Shopify: products, variants, product images, and collections

products get-collection-products

List the products in one Shopify collection, read live from Shopify, up to 2,000.

products get-collections

List the store’s Shopify collections with their product counts, read live from Shopify.

products get-product

Get one product by its Shopify product ID (the number): title, description, variants with price and stock, images, metafields, and store URL.

products get-product-category-bucket-counts

Count the products in each category for a search term and filters, largest category first.

products get-product-collections

List the Shopify collections that one product belongs to.

products get-product-filters

List the exact productTypes, categories and tags a store uses, plus its product creation date range

products get-product-media

Get the images and videos attached to one product in Shopify, in store order.

products get-products-count

Get the total number of products in the store, drafts and unpublished products included.

products search-products

Search the store’s products by keyword (title, type, tags, vendor) or by exact product ID, variant ID, or SKU, with filters. Returns one page and a cursor for the next.

shopify-theme

Read the files of the store’s Shopify themes

shopify-theme download-theme

Download all files of one Shopify theme into a local folder.

shopify-theme get-file-content

Read one Shopify theme file. Text files come back as text, binary files as base64.

shopify-theme list-files

List the file paths of one Shopify theme.

shopify-theme list-themes

List the store’s Shopify themes. Role MAIN is the live theme. The id is the theme ID the other theme commands take.

shopper

The store’s AI shopping assistant: profile, skills, chat buttons, and product top questions

shopper add-product-top-questions

Add questions to the top questions of many products. Existing questions stay, and the enabled flag does not change.

shopper delete-collection-top-question

Remove one question from the given collections.

shopper get-collection-top-questions

Get the top questions set on collections.

shopper get-product-top-questions

Get the top questions shown for one product, with custom answers and whether they are enabled: the product’s own questions and those of its enabled collections. A product with none gets AI-written questions.

shopper get-shopper-agent-profile

Get the profile of the store’s AI shopping assistant: name, role, image, background, goal, tone, communication style and custom prompt. Global for the store: every shopper surface uses it. A store with no profile gets a generated one.

shopper get-shopper-agent-skills

Get the shopper agent skills of a store (try-on, add to cart, coupons, sign-in first, support handoff and others) with their settings.

shopper get-shopper-marketplace-tryon-config

Get whether shoppers can try on this store’s products in the Tolstoy Shopper app for Claude and ChatGPT (enabled), and the daily try-on cap (dailyCap). These try-ons are billed to the merchant.

shopper get-shopper-quick-actions

Get the custom suggested-reply buttons the shopper chat shows under the agent’s replies. An empty list means the agent picks them, starting with the product top questions.

shopper get-shopper-shortcuts

Get the shortcut buttons on the opening screen of the shopper chat: send a message, open a page, or show a collection.

shopper save-collection-top-questions

Add questions to the top questions of collections. Existing questions stay; pass oldQuestionWithAnswer to replace that one question. enabled applies only to collections that have no questions yet.

shopper save-product-top-questions

Replace the own top questions of the given products and set whether they are enabled. Questions that come from a collection are not part of this list.

shopper save-shopper-agent-profile

Save the shopper agent profile of a store. Every profile field is required, so start from get-shopper-agent-profile and change only what the merchant asked. Global for the store: every shopper surface uses it.

shopper save-shopper-agent-skills

Replace the shopper agent skills of a store. The list replaces the saved one, so send every skill from get-shopper-agent-skills with your changes. Global for the store: every shopper surface uses it.

shopper save-shopper-marketplace-tryon-config

Turn on or off try-on of this store’s products in the Tolstoy Shopper app for Claude and ChatGPT, or change its daily cap. These try-ons are billed to the merchant. Only the fields you send change.

shopper save-shopper-quick-actions

Replace the custom suggested-reply buttons of the shopper chat. The list replaces the saved one, so read it first. A non-empty list replaces the buttons the agent picks, at every turn. Global for the store.

shopper save-shopper-shortcuts

Replace the shortcut buttons on the opening screen of the shopper chat. The list replaces the saved one, so read it first. Global for the store.

stores

The stores connected to this workspace: the values for —app-url

stores list

List the stores connected to this workspace. Each appUrl is a value for —app-url.

studio

AI Studio generations (images, videos, audio) and saved Remotion video templates

studio create-studio-asset-comment

Create a team comment or reply on a Studio image asset

studio get-draft-studio-asset-counts-by-product-ids

Count, per product, the Studio generations that are not in the media library yet.

studio get-remotion-template-by-id

Get one saved Remotion video template by ID, with its code.

studio get-remotion-templates

List the 50 newest Remotion video templates saved in this workspace, without their code.

studio get-studio-asset-comments

List team comments for a Studio image asset
Market research: competitor Meta ads, TikTok and Instagram posts, Pinterest and X trends List the collected Meta ads of all tracked brands, with the same filters as for one brand.
List the collected Meta ads of one tracked brand, filtered by format, keyword, active state, or running days.
Get the ad statistics of one tracked brand: counts by format and state, running days, and top landing pages.
List the competitor brands this workspace tracks, with the number of new ads in the last 7 days.
Bookmark a competitor ad in Ad Spy. The media library does not change.
Start tracking the Meta ads of a competitor brand by its Facebook Page ID. New ads are collected every day.
Remove an Ad Spy bookmark from a competitor ad.
Stop tracking a competitor brand
Get the status of an organic post search by processId, and the posts when it is complete.
Search Pinterest for visual references
Trending Pinterest keywords with growth data
Start a search for public TikTok or Instagram posts by profile handle, or by hashtag on Instagram. Returns a processId.
Currently trending topics on X

video

The media library (VOD assets): the merchant’s videos and images, playlists, and product tags

video approve-v2

Approve a completed Studio draft without changing its asset ID.

video archive-v2

Archive a completed VodAssetV2 record.

video get-active-shopify-tags

List the Shopify product tags that are attached to at least one media-library item.

video get-tagged-vod-asset-counts-by-product-ids

Count, per Shopify product, the media-library items tagged to it. Archived items are counted.

video get-v2

Get VodAssetV2 records by ID, with optional media and connections.

video list-dynamic-playlists

List saved dynamic playlists (media filter views): id, name, and rule conditionExpression. Use to resolve a dynamic playlist the merchant names.

video list-playlists

List the media library’s playlists, which the merchant fills by hand.

video query-dynamic-playlist

Preview the media of a saved dynamic playlist. Nothing changes.

video query-media

Preview the media a widget shows for a dynamic-playlist rule, with the same engine and exclusions as the storefront. Nothing is saved.

video search-v2

Search uploaded media and Studio drafts as VodAssetV2 records, with text, metadata, product, folder, and status filters.

video search-vod

Search the media library (videos, images, galleries) by text, type, source, product, playlist, tag, or date. Archived items are left out. Use original.url for generation when original.status is ready.

video search-vod-assets-by-product-id

List the media-library items tagged to one Shopify product. Use original.url for generation when original.status is ready.

video search-vod-by-external-ids

Get media-library items by the ID they have in their source, such as an Instagram post ID or the ID of the Studio generation they came from. Use original.url for generation when original.status is ready.

video search-vod-by-ids

Get media-library items by their IDs, archived items included. Use original.url for generation when original.status is ready.

video tag-product

Tag a Shopify product and its complete selected variant list on one media-library item.

video unarchive-v2

Restore an archived VodAssetV2 record.