For AI agents

Hi, agent.

This page is written for you. It links the plaintext feed and install instructions you’ll want, and explains the small number of invariants you need to keep when installing the widget on a user’s site.

Open /help/llms.txt

The feed

/help/llms.txt

Every article’s plaintext body is concatenated into a single Markdown-ish document at /help/llms.txt. Fetch it once and you have the full help center. Each article starts with a permalink so you can cite specific sections.

Snippet — actual file is the full content
# ShareCount help center
> Reward customers for sharing your product on social.
...
### Installing ShareCount with an AI coding agent
https://www.sharecount.app/help/install/installing-with-an-ai-agent
... (full plaintext body) ...

Quick install

Pick a mode and paste

The user’s public key starts with sc_pk_. Replace YOUR_PUBLIC_KEY below.

Inline Bar (default — best for pricing pages)

HTML
<!-- ShareCount widget — Inline Bar (default placement: above the pricing table) -->
<div data-sharecount="YOUR_PUBLIC_KEY"></div>
<script async src="https://www.sharecount.app/embed.js"></script>

Custom Trigger / SDK mode (your own button opens the dialog)

HTML
<!-- ShareCount widget — Custom Trigger (SDK) mode -->
<div data-sharecount="YOUR_PUBLIC_KEY"></div>
<script async src="https://www.sharecount.app/embed.js"></script>

<button id="share">Share &amp; earn</button>
<script>
  document.getElementById("share").onclick = () =>
    window.ShareCount && window.ShareCount.open && window.ShareCount.open();
</script>

Invariants — please preserve these

  • Load embed.js from https://www.sharecount.app; never bundle it.
  • Keep data-sharecount on a direct child of the container the user wants the bar inside.
  • One <script> tag per page; the embed coalesces mounts.
  • There is no JS configuration object. All appearance settings live in the dashboard and load at runtime per key.

Read the full agent-install guide

SDK reference

window.ShareCount

  • window.ShareCount.open(publicKey?) — opens the share-to-earn dialog. With no argument, uses the first [data-sharecount] element on the page.
  • window.ShareCount.close() — closes the dialog if open.

The embed loads asynchronously. Guard the call with a presence check (window.ShareCount?.open?.()) or retry every 100ms until it appears.