Skip to content

Free and open source · For Shopify brands on Klaviyo

Klaviyo numbers
your AI can prove.

Cosmic Lifecycle gives Claude Code a clean view of your Shopify and Klaviyo results. It syncs totals into a database you own, checks that the two agree, and shows which flows to fix first. Nothing sends.

MIT licensed. Your keys stay in your keychain. Your data stays in your database.

It catches the number
that would fool you.

AI agents will happily quote a revenue figure from a broken sync. This tool checks each source against the others first, and says so out loud when they disagree.

The demo runs with no keys and no accounts. It loses 14 orders on purpose, then shows the check that catches it.

lifecycle demoSample data
SAMPLE DATA. Every number below is invented.

1. A sync loses 14 orders without any error. Reconcile catches it:
   FAIL Orders pulled against Shopify’s own count: 787 against 801,
        off by 1.75%. Do not trust reports built on this until it is fixed.

2. After a clean sync, the checks pass:
   PASS orders_complete
   PASS orders_vs_cohorts
   PASS klaviyo_orders
   WARN attributed_share
   PASS freshness

3. Revenue per flow.
   Abandoned Checkout: $23.33 per recipient
   Welcome Series: $7.38 per recipient
   Post-Purchase Thank You: $1.86 per recipient

4. Flow audit found 3 things to fix. The top three:
   [high] No Browse abandonment flow found
   [high] Win-back flow is not live
   [medium] Post-Purchase Thank You revenue per recipient fell

Every number checked.
Every fix ranked.

Built for the person running lifecycle at a Shopify brand who already works in Claude Code.

Checks the numbers first.

Every report opens with a reconcile result. Orders pulled are checked against Shopify’s own count, and Klaviyo’s Placed Order count against Shopify’s orders. When they disagree, you see it before anyone quotes a number.

Answers the same way every time.

Twelve verified metrics, such as average order value and flow share of revenue, run fixed SQL. Monday’s answer matches Friday’s, and each result shows its inputs.

Ranks what to fix.

The flow audit looks for missing core flows, flows that stopped sending, falling revenue per recipient and spam complaints. Each finding comes with its evidence.

Builds a win-back segment from your own timing.

It reads how long your customers actually take to reorder, then writes a plan. The segment is created in Klaviyo only after you approve that exact plan.

What it will not do.

A tool that reads your revenue should earn trust by what it refuses.

  • Send a message, edit a flow or launch a campaign.
  • Store customer names, emails, phone numbers or addresses. It keeps totals.
  • Put your data on a server of ours. Your keys and database stay yours.
  • Call attributed revenue proof that an email caused a sale.

Two ways to start.
Same tool either way.

Set it up yourself in an afternoon, or bring your accounts to a call and we do it together.

Set it up yourself

For anyone comfortable running a few commands, or letting their coding agent run them.

FreeMIT licensed, open source

  • Klaviyo connects in about 2 minutes
  • Shopify takes about 15, across two dashboards
  • Works from Claude Code, Cursor and the terminal
  • An optional daily sync from your own GitHub account

Have Jake set it up

For brands that want the numbers without learning the setup.

Scoped on a callFree thirty-minute call first. No posted price.

  • We look at your Klaviyo and Shopify accounts together
  • I connect both and set up the daily sync in your accounts
  • We read the first reconcile and flow audit together
  • You own every key, repo and database at the end
Book a free call

Thirty minutes with me. If now is not the time, that is fine.

From install
to a number
you can trust.

Node 20 or newer. macOS keeps keys in the keychain. On Linux, use environment variables.

Source, docs and the full test record are on GitHub.

  1. 01

    Install, then watch the demo.

    npm install -g https://github.com/jbauman-26/cosmic-lifecycle/releases/latest/download/cosmic-lifecycle.tgz
    lifecycle demo
  2. 02

    Connect Klaviyo first, Shopify after.

    A Read-Only Klaviyo key is enough. Keys go in an environment variable, never in a chat.

    lifecycle init
    lifecycle connect klaviyo --key-env KLAVIYO_READ_KEY
  3. 03

    Sync, check, and see what to fix.

    lifecycle sync
    lifecycle reconcile
    lifecycle dashboard

Or paste one line into Claude Code, Cursor or Codex and let your agent do it:

Set up Cosmic Lifecycle using https://raw.githubusercontent.com/jbauman-26/cosmic-lifecycle/main/llms.txt

A few things
worth knowing.

It is an early release, and the test record says exactly what has and has not been tried.

Does it send anything to my customers?

No. It reads Klaviyo and Shopify and writes totals to your own database. The only thing it can create is one Klaviyo segment, and only after you approve the plan and confirm it. It never sends a message.

What does it store?

Daily totals, such as orders, revenue, flow recipients and flow revenue. There is no column for a name, email, phone or address, and the Shopify app is set up so those fields are refused.

Do I need to write code?

You run a few commands in a terminal, or your coding agent runs them for you. Claude Code, Cursor or Codex can set it up from one pasted line. If you would rather not, that is what the setup call is for.

How is this different from Klaviyo’s own reports?

Klaviyo reports the revenue it attributes to each flow. Cosmic Lifecycle checks Klaviyo against Shopify’s own order count, says plainly when they disagree, and keeps the history in a database you control.

What has been tested so far?

It is an early release. It has been tested on a Shopify development store with 150 labeled sample orders and one real Klaviyo flow send. It has not yet run on a production store or on real flow revenue. The full record is in the README.

What does it cost to have you set it up?

The tool is free. For setup, we talk first on a free thirty-minute call, look at your Klaviyo and Shopify accounts together, and settle scope and price there. There is no posted price.

Start with numbers
you can trust.

Install it free, or bring your Klaviyo account to a call and we set it up together.

Book a free call