StoreSEO

Language

  • English
  • 日本語 Not available
  • Polski Not available
  • Italiano Not available
Gemini CLI llms.txt and agents.md

Publish llms.txt and agents.md with Gemini CLI

Publishing llms.txt and agents.md with Gemini CLI means asking Google's terminal agent, connected to StoreSEO, to check what your Shopify store serves to AI crawlers, generate both files and roll llms.txt back to an earlier version.

Last updated: October 2026

01

Set up Gemini CLI for StoreSEO

Skip this if Gemini CLI is already connected. The full guide, with the alternatives, is on the Gemini CLI page.

  1. 1

    Add StoreSEO to Gemini CLI

    Run this in any terminal. The user scope writes the server to ~/.gemini/settings.json so every project sees it. Without --scope user the command writes to the current project's .gemini/settings.json.

    Terminal
    gemini mcp add --scope user --transport http storeseo https://mcp.storeseo.com/mcp
  2. 2

    Sign in to your store

    Start gemini. The first time it calls StoreSEO it opens your browser: pick your Shopify store and approve access. If the window does not open, type /mcp auth storeseo inside Gemini CLI. Then gemini mcp list should show storeseo as connected.

    Prompt
    /mcp auth storeseo
02

How does this work in Gemini CLI?

You run gemini in a terminal after adding the StoreSEO server and signing in through the browser. Ask whether the store's llms.txt and agents.md are live and Gemini CLI calls the StoreSEO tools, which it names with an mcp_ prefix and the server name, so storeseo_get_llms_txt_status appears as mcp_storeseo_storeseo_get_llms_txt_status in the tool list. After storeseo_start it reads both statuses and reports the active version, the public URLs and whether a rebuild is due.

Gemini CLI asks you to confirm tool calls unless a server is trusted, which is useful here. When the agent reaches storeseo_generate_llms_txt you see a confirmation prompt, and the agent should already have told you in the conversation that the run writes a template into your live theme and a copy into Shopify Files. The same applies to storeseo_generate_agents_md, which publishes live and spends AI Content Optimizer credit. After generating, it polls storeseo_get_llms_txt_status through the minute or two the run takes, and you can leave the terminal open.

For rollback, ask for the versions and name the one you want. Gemini CLI calls storeseo_list_llms_txt_versions and then storeseo_activate_llms_txt_version, and for deleting a version or resetting agents.md you get both the agent's question and the CLI's confirmation. If you run the CLI over SSH with no browser, the sign-in cannot complete, so use the access token header from Settings, AI Toolkit. Either way, the status checks are a cheap first command in a fresh session, because they confirm the connection and show the live state in one go before you decide whether to generate anything.

Gemini CLI + StoreSEO Illustrative session
  1. You: Go back to my previous llms.txt, I think the new one is wrong.

  2. storeseo_start read-only
  3. storeseo_list_llms_txt_versions read-only
  4. Gemini CLI: Version 8 is active and version 7 is the one before it. Activating version 7 republishes it to your storefront and leaves version 8 stored. Shall I activate version 7?

  5. You: Yes, version 7.

  6. storeseo_activate_llms_txt_version needs approval
  7. storeseo_get_llms_txt_status read-only
03

What to ask Gemini CLI

Prompt 1
Use StoreSEO to check my llms.txt and agents.md. Report the live version and public URLs only.
Prompt 2
Generate a new llms.txt. Tell me it writes to the live theme, wait for my yes, then poll the status until it is done.
Prompt 3
List my llms.txt versions and reset nothing. I only want to see which one is active.
  • Is my llms.txt up to date, and which version is live right now?
  • Generate a new llms.txt that includes products and collections but not blog posts. Warn me before it goes live.
  • Show me my llms.txt versions and switch back to the one from last week.
  • Does my store serve a custom agents.md or Shopify's default?
  • Write an agents.md for my store and publish it. Tell me what it costs first.
  • Reset agents.md to Shopify's default.
04

What StoreSEO does: llms.txt and agents.md

llms.txt is a curated map of your store for AI crawlers, and agents.md tells AI shopping agents who you are and how to buy. StoreSEO generates both from your store data and publishes them to your live theme; the agent checks status, generates, switches llms.txt versions and resets agents.md to Shopify's default.

Requires: agents.md generation spends AI Content Optimizer credit and needs at least one published product.

  1. 1

    Check what is live

    The agent reads the llms.txt status (settings, latest version, whether a rebuild is due, public URL) and the agents.md status (custom file or Shopify's default, public URL).

  2. 2

    Warn before publishing

    Generating llms.txt writes a template to your live theme and uploads a copy to Shopify Files in the same run, with no separate publish step. Generating agents.md publishes it live at once and spends credit. The agent says so and waits for your yes.

  3. 3

    Generate and wait

    llms.txt generation takes a minute or two; the agent polls the status until it finishes. agents.md returns the published text and its URL straight away.

  4. 4

    Manage versions

    StoreSEO keeps the latest ten llms.txt versions. The live file serves the active version, which is not always the newest, and any version can be made active again.

  5. 5

    Roll back

    Deleting a version is permanent. Resetting agents.md drops the custom file so Shopify's default serves again, and there is no history to restore it from.

storeseo_get_llms_txt_statusstoreseo_generate_llms_txtstoreseo_list_llms_txt_versionsstoreseo_activate_llms_txt_versionstoreseo_delete_llms_txt_versionstoreseo_get_agents_md_statusstoreseo_generate_agents_mdstoreseo_reset_agents_md
05

llms.txt and agents.md reference

llms.txt Generated from your products, collections, pages and posts; served at your store's /llms.txt
Where it is written A template in the live theme plus a copy in Shopify Files, in the same run
Schedule llms.txt can regenerate on a saved schedule; settings passed with a run are saved for scheduled runs
Versions kept The latest ten; the live file serves the active one
Generation time About one to two minutes for llms.txt
agents.md AI-written from your brand profile, top products, collections and contact details; served at /agents.md
agents.md publish Live immediately; replaces Shopify's native default
agents.md reset Shopify's default serves again within seconds; the custom text is gone for good
06

Rules Gemini CLI follows

  • The agent tells you that llms.txt generation writes to your live theme before it starts.
  • agents.md generation publishes live and spends credit, so the agent says both and waits for your yes.
  • Deleting an llms.txt version and resetting agents.md cannot be undone; the agent confirms each one.
  • Deleting the active llms.txt version promotes the next newest automatically, so the agent says which version will go live.

In Gemini CLI

Do not set --trust or trust: true on the storeseo server for this job. Trust skips every tool confirmation, and then the confirmation StoreSEO asks for in chat is the only check before a live theme write or a reset of agents.md. Google's site also says Gemini CLI was replaced by Antigravity CLI on June 18th, 2026 for unpaid tier and Google One users, so confirm which terminal agent your account can use first.

What runs without asking. Reads such as SEO scores, store listings, settings and Google reports run straight away. Generating a preview spends AI credit but writes nothing, and StoreSEO tells the agent to say what a generation will cost before it runs one. Applying content, optimizing images, changing settings, publishing llms.txt or agents.md, writing a product description and deleting anything wait for your yes in the conversation. That yes is an instruction the agent follows, not a lock on the server, so your client's own tool-approval setting is the hard stop.

07

Questions

Will Gemini CLI ask before it generates llms.txt?

Yes, if you have not trusted the server. Gemini CLI asks you to confirm tool calls by default, and StoreSEO tells the agent to say that generation writes to your live theme and wait for your yes. Trust mode removes the CLI prompt, so leave it off.

How does Gemini CLI sign in to StoreSEO on a remote machine?

The browser OAuth sign-in needs a browser on the same machine and does not work headless. On a server or over SSH, create a personal access token in Settings, AI Toolkit and send it as an Authorization Bearer header in the server entry.

What is the difference between llms.txt and agents.md?

llms.txt is a curated map of your store for AI crawlers and answer engines, served at /llms.txt. agents.md is the file AI shopping agents read to understand your brand and how to shop with you, served at /agents.md. StoreSEO can generate both.

Does generating llms.txt change my theme?

Yes. The same run writes an llms.txt template into your live theme and uploads a copy to Shopify Files. There is no separate publish step, which is why the agent should warn you before it starts.

Can I go back to an older llms.txt?

Yes. StoreSEO keeps the latest ten versions, and any of them can be made the active one, which republishes it to your storefront. Deleting a version is permanent.

Can I undo a generated agents.md?

You can reset it, which makes Shopify's native default serve again within seconds. The custom text is discarded with no history, so keep a copy if you might want it back.

08

Keep going

llms.txt and agents.md with other agents

More Gemini CLI guides