Get started
From an empty repository to a published config
Give your coding agent the skills, or run the CLI yourself. Either way the result is a config file in your repo that you review and publish to a dev environment.
npm packages comingThe CLI, the SDKs and the skills are built, but none is on npm yet. They install from a checkout of the repository, which is not public yet: ask us for access.
# Write a starter config
uc init
# Check it, then publish it to dev
uc validate
uc publish --environment dev --applyThe path
Five steps, in order
Steps 1 to 3 need only your repository. Steps 4 and 5 need a project in a UserCurrent console: its ingest endpoint and public key, and a personal or agent key.
No sign-up yetThere is no console to sign up for yet. Early users get a project and keys from us: write to us.
Build the tools
The CLI is one file that runs on Node 24. The web SDK installs from a tarball you pack once and keep with your release artifacts.
# From a checkout of the UserCurrent repository pnpm install --frozen-lockfile # Build the CLI; it writes packages/cli/dist/uc pnpm --filter @usercurrent/cli build # Pack the web SDK; it prints the path of the .tgz pnpm --filter @usercurrent/sdk-web package:artifactRun from a checkout of the repository. Give your agent the skills
Nine skills cover setup, the tracking plan, personalization, the catalog, experiments, insights, audits and in-app messages. They are plain Agent Skills, so any coding agent that reads skills follows the same files.
# Copy the skills into your app's repository, where your agent reads them mkdir -p .claude/skills cp -R /path/to/UserCurrent/packages/agent-skills/skills/* .claude/skills/ # Then, in your agent: # > Set up UserCurrent for this app. Use the usercurrent-setup skill.Copied skills do not update with the package. Copy them again after you upgrade. Write the config
uc init writes a starter usercurrent.config.ts. The setup skill fills it in from your code, or you declare events yourself and let validate and scan check them.
uc init # writes usercurrent.config.ts uc validate # checks the config and compiles it uc scan # compares tracking calls with the planAdd the web SDK or the Astro integration
Collection stays off until you call setConsent. The endpoint and the public ingest key are under Settings, Install in your project. The Astro integration is for a site on Workers or Node, and it is source-only TypeScript in the repository for now.
// npm install /absolute/path/to/usercurrent-sdk-web-0.2.0.tgz import { init } from '@usercurrent/sdk-web'; const uc = init({ endpoint: 'https://events.example.com', key: 'pk_live_...' }); // Call from your consent UI, with the choices the visitor made function onConsentChoice(analytics: boolean, personalization: boolean) { uc.setConsent({ analytics, personalization }); uc.track('setup_complete'); }// astro.config.mjs import { defineConfig } from 'astro/config'; import usercurrent from '@usercurrent/astro'; export default defineConfig({ integrations: [ usercurrent({ client: './src/lib/usercurrent.ts', slots: { home_hero: { fallback: { headline: 'Welcome' } } }, }), ], }); // src/pages/index.astro: the variant is in the first HTML --- import { usercurrentOf } from '@usercurrent/astro/runtime'; const hero = await usercurrentOf(Astro).slot('home_hero'); --- <Hero {...hero.props} />Publish to dev
The console address, the project and a personal or agent key come from your console. Publishing is a dry run until you pass --apply, and an agent key cannot publish to Production. Then open Live events and confirm your first event arrived.
export USERCURRENT_URL=https://console.example.com export USERCURRENT_PROJECT=YOUR_PROJECT_ID export USERCURRENT_TOKEN=... # a personal or agent key from the console uc diff # what differs from the project uc publish --environment dev # a dry run uc publish --environment dev --apply # save the drafts and publish them
Hand your agent a repository
Start with uc init, then let the setup skill propose the rest.
Why this button?
It is this page's own suggestion for now. As you read, this site keeps a small profile of who each page is for and what it is about, in your browser, and picks this button from it. Nothing is sent.