Connect your marketing tools to Claude.

Cosmic CLI is the free way to build a weekly contribution margin report for a Shopify brand from the tools you already use. It pulls your ads, analytics, payments, email and CRM data into a database you own, then checks each supported figure against its source before your AI quotes it. Add your costs and the report shows contribution margin beside revenue. No account, on your own computer.

Install it in Terminal. Copy these two lines and paste them into Terminal. Needs Node 20 or newer, free from nodejs.org.

npm install -g https://github.com/jbauman-26/cosmic-lifecycle/releases/latest/download/cosmic-lifecycle.tgz
cosmic docs quickstart

Use an AI agent such as Claude Code or Codex? Paste this into the agent, not into Terminal. It tells your AI to run the install command, run cosmic demo to watch a check catch a broken sync, and follow the output of cosmic docs quickstart to connect your first tool. cosmic demo needs no keys and no account.

Install Cosmic CLI with: npm install -g https://github.com/jbauman-26/cosmic-lifecycle/releases/latest/download/cosmic-lifecycle.tgz
If Node 20 or newer is missing, help me install it first.
Then run cosmic demo, and set it up for my business by following the output of cosmic docs quickstart.

Rather set it up with a person? Book a setup call, 30 minutes with Jake, free.

Free and open source. Read only by default, and it never sends a message. Source on GitHub.

cosmic 0.21.0captured from cosmic demo --type saas
$ cosmic demo --type saas
1. A Stripe sync loses 6 charges without any error. Reconcile catches it:
   FAIL Charges in the daily table against every charge pulled from Stripe: 446 against 452, off by 1.33%. Do not trust reports built on this until it is fixed.
   WARN ad_claims: Meta claims 270 purchases since 2026-08-28. Stripe shows 51 new paying customers on the same days, so Meta claims 5.3 times as many. A claim is Meta's own attribution, not a sale.
The metrics that follow, each with its trust line, are left off this page.

An example run. One sync loses 6 charges, and the check catches it. The Meta and Stripe numbers are part of the example. No keys, no account.

Your AI can read your data. Can it tell when the data is wrong?

A sync can quietly drop orders or charges. A fresh query reads whatever is left, and the answer sounds just as sure either way.

An AI reading your data

  • Works out each answer fresh, so the same question can get two different numbers.
  • Reads what is there, even when a sync lost orders.
  • Says every number with the same confidence.

Checked numbers your agent can quote

  • One fixed formula per number, shown with every answer.
  • Checks your tools against your source of truth (Stripe, Shopify or HubSpot) before it reads a total.
  • Every number carries a trust line: checked, failed or not checked.

Build the weekly report: sync, check, then read.

Five things you will do first. Every command prints plain text for you and JSON for your agent. Panels marked captured are output from cosmic 0.21.0. Panels marked example show what the command prints once a store is connected.

Connect a source with a read-only key.

The key is read from an environment variable, checked with the source, and saved to your keychain. It is never printed, and you never paste it into a chat.

connectexample output
$ cosmic connect klaviyo --key-env KLAVIYO_READ_KEY
Checked the key with Klaviyo.
Saved to the keychain. It will not be shown again.
Connected: Klaviyo, Your Store, read only.
Reads flow, campaign and order totals. Never reads customer names or emails.

Free. One command to install, no account to make.

Install free

Not ready to install? Ask it first.

Ask about your margin, ad spend, email flows, or which report to trust. It answers the way the CLI checks your data, and names the command that would run it on your real numbers. Paste your store URL and it reads your site first.

Free, a few questions a day. We do not save what you type. Answers come from the CLI's docs and kits, not your data, so treat any number as a worked example until the CLI checks it.

Built for the person who answers for the number.

Each line below is a command you can run now. The figures are examples that show what a check does. They are not results from any business.

  • The same answer every time. cosmic metrics show contribution_margin prints the one query that metric always runs, and what it assumes.
  • Corrections it keeps. cosmic notes add saves business context once, and your agent gets it with every number.
  • One workspace per client. cosmic --workspace acme-co keeps each client's keys, data and notes apart. --all-stores adds a metric up across them.
  • Your database. Local by default, or your own Postgres. It keeps daily totals, with customer names, emails and addresses removed.
  • What a check catches. In the example run, a sync loses 6 charges without an error, and reconcile reports 446 against 452, off by 1.33%. It also shows Meta claiming 270 purchases where Stripe shows 51 new paying customers on the same days, 5.3 times as many.
  • What holds a number back. In the example month, cosmic verdict --period 2026-10 reports 1 figure and withholds 4, each with its reason.

Use Claude on a database you own, not each tool’s raw API.

Your agent asks, and the checks run first. cosmic mcp gives any MCP client, Claude included, 15 read-only tools: metrics, reconcile, schema, a capped read-only query and your notes. It starts before setup, so you can add it right after you install.

mcpexample session
$ cosmic mcp
Serving this store to your AI tool. Read only.
You: which flow earned the most last month?
Checked the numbers first. All checks passed.
Read revenue by flow for the last 30 days.
Abandoned Checkout is your strongest flow, with Welcome Series second.

Read only by default, with a record of every run.

  • Keys live in your keychain or an environment variable. No command prints one.
  • Nothing sends. A Klaviyo segment is a plan until you approve that exact plan, and no message is ever sent.
  • Queries are read only and capped at 1,000 rows unless you raise the cap.
  • Every tool run is recorded: what ran, when, and what it cost.

14 native sources. 50 more with code, readiness shown for each.

Native: Stripe, Google Analytics 4, HubSpot, Meta Ads, Google Ads, Microsoft Advertising, LinkedIn Ads, TikTok Ads, Pinterest Ads, Reddit Ads, Snapchat Ads, Google Merchant Center, Shopify and Klaviyo. In the catalog: 50 connectors with code and more on the way, and cosmic sources import takes daily totals from any other tool. Already load your tools into your own Postgres with a data pipeline? Cosmic reads any table it loads, in place and read-only. Every table gets a freshness check; the count checks run only on the built-in sources. cosmic sources catalog lists every source with its readiness, so you can see where each one stands before you connect it.

Can you use Claude on your marketing data? Questions answered

Can I use Claude instead of an analytics tool for my Shopify store?

You can ask Claude about your store once its data is in one place, and the CLI puts it there: your sources sync into a database you own, and Claude reads it through cosmic mcp. What an AI does not do on its own is check the data. Cosmic CLI reconciles each supported figure against its source and says whether the check passed, failed or did not run. It is a check on the tools you already use, not a replacement for them. Any MCP client works the same way.

Should my AI agent call marketing APIs directly or query a database you own?

We built it to query a database. A direct call returns what that one tool says and has no step that compares it with another source, so the same question can come back with two numbers. Cosmic CLI syncs first, ends every sync with a reconcile, and gives the agent a read-only query capped at 1,000 rows unless you raise the cap. Every number carries a trust line: checked, failed or not checked.

Does it connect Klaviyo data with Shopify sales?

Yes. Shopify and Klaviyo are two of the 14 native sources. When Klaviyo has no Placed Order data, the check says Not checked yet instead of passing. Add your costs and a store gets contribution margin too.

What is the Cosmic CLI and which data sources does it connect?

Cosmic CLI is a free, open-source command line tool that pulls your ads, analytics, payments, email and CRM data into a database you own. It has 14 native sources: Stripe, Google Analytics 4, HubSpot, Meta Ads, Google Ads, Microsoft Advertising, LinkedIn Ads, TikTok Ads, Pinterest Ads, Reddit Ads, Snapchat Ads, Google Merchant Center, Shopify and Klaviyo. The catalog adds 50 connectors with code, and cosmic sources import takes daily totals from any other tool.

How do I connect GA4, Shopify and Meta Ads data for Claude Code?

Paste the AI agent message at the top of this page into Claude Code. It installs the CLI, runs cosmic demo, and follows cosmic docs quickstart to connect your first tool. GA4, Shopify and Meta Ads are all native sources, and each one connects with a read-only key that is saved to your keychain and never printed.

Free on your computer. Paid when we run it for you.

Run the open-source CLI on your own computer today. Apply for the beta of a hosted workspace with managed account connections.

Free: run it on your own computer

$0

Run the CLI with your own database, credentials and AI. Run the checks, skills and MCP.

Pro: one hosted workspace

$39 per month

1 hosted workspace and 2 managed connections.

Agency: five hosted client workspaces

$99 per month

5 hosted client workspaces and 5 managed connections shared across them.

Each hosted workspace supports one account per ad platform. Extra managed accounts are $15 per month each. Extra Agency workspaces are $19 per month each.

Apply for the Cloud beta

Choose Pro or Agency. We’ll email you when your plan opens. Joining is free and requires no card.

Plan

Your business, or one client's.

We use your email to tell you when your plan opens, and you will also get Jake's AI newsletter: three short emails a week. Unsubscribe in one click from any email. Privacy policy

Get the free Cosmic CLI

The install command opens as soon as you send this. No account, no card.

At least 40 characters.

We will send you personalized resources based on your answer, starting with one email from Jake. Unsubscribe any time. Privacy