@rexipt/ai-employee
v0.2.0
Published
AI-powered business intelligence CLI for ecommerce operators
Maintainers
Readme
@rexipt/ai-employee
AI-powered business intelligence CLI for ecommerce operators.
📖 First time setup? See the Complete Setup Guide for detailed instructions, especially for Shopify integration which requires specific configuration steps.
Install (Recommended)
This project assumes:
- Node.js
20+ - npm
11+
Install Node.js and npm from:
- https://nodejs.org
npm i -g @rexipt/ai-employeeBinary Names
The package exposes two binaries:
rexipt-airai(short alias)
Examples:
# after global install
rexipt-ai d
rexipt-ai ra
# short alias
rai d
rai raAdvanced (Optional)
# run without global install
npx @rexipt/ai-employee <command>Developer Setup (Local Repo)
npm install
# shorthand also works:
npm i
npm run buildQuickstart
# 1) Initialize config
rexipt-ai init
# 2) Connect Shopify (recommended OAuth code flow)
rexipt-ai shopify oauth-connect
# 3) Run diagnostics
rexipt-ai doctor
# 4) Run all enabled skills once
rexipt-ai run-all
# 5) Start continuous scheduler in daemon mode
rexipt-ai start --daemon
# 6) Inspect runtime and logs
rexipt-ai status
rexipt-ai logs --limit 20
# 7) Stop daemon
rexipt-ai stop⚠️ Shopify Setup - Important Steps
Before shopify oauth-connect will work, you must configure your Shopify app:
- Create app in Shopify Dev Dashboard (not legacy custom apps)
- Add redirect URL:
http://127.0.0.1:3456/callback - Enable Protected Customer Data Access - required for order/customer data
- Release and install the app to your store
Without step 3, you'll get 403: Protected customer data errors.
👉 See SETUP_GUIDE.md for detailed step-by-step instructions.
AI in This Release
dailyBriefing: multi-source performance synthesis (Shopify, Ads, Klaviyo) with validation.anomalyDetection: baseline-aware anomaly detection with severity + recommended actions.customerSegmentation: high-value / at-risk / churned segment generation.- action queue + approval flow for human-in-the-loop decisions.
Secrets and Configuration
Run init first. It auto-creates the config file at:
~/.rexipt/ai-employee/config.jsonUsers do not need to create this file manually.
Recommended enterprise workflow:
- Run
initonce to generate baseline config. - After that, manage secrets in
.env.local(preferred) instead of editing encrypted values inconfig.json. - Use
rexipt-ai config --validateafter changes. - For Shopify, preferred setup is
rexipt-ai shopify oauth-connect(token generated then encrypted/stored).
If you must reset broken/rotated encrypted values, use:
rexipt-ai config --list-secrets
rexipt-ai config --reset-secret llm.apiKey integrations.shopify.accessToken
rexipt-ai config set-secret llm.apiKey LLM_API_KEYOr with npm aliases:
npm run cfg:list-secrets
npm run cfg:list-keys
npm run cfg:set -- integrations.shopify.storeUrl your-store.myshopify.com
npm run cfg:reset-secret -- llm.apiKey
npm run cfg:set-secret -- llm.apiKey LLM_API_KEYstoreUrl is not in secret paths because it is not encrypted. Set it with:
rexipt-ai config set integrations.shopify.storeUrl your-store.myshopify.comList all editable keys (secret keys are marked):
rexipt-ai config --list-keysSet an entire object (JSON value):
rexipt-ai config set integrations.shopify '{"enabled":true,"storeUrl":"your-store.myshopify.com","accessToken":"","apiVersion":"2024-01"}'Overwriting with init is also valid, but it re-runs the full setup flow:
rexipt-ai init
# choose overwrite = yesSupported secret paths:
llm.apiKeyintegrations.shopify.accessTokenintegrations.googleAds.customerIdintegrations.googleAds.loginCustomerIdintegrations.googleAds.developerTokenintegrations.googleAds.accessTokenintegrations.googleAds.refreshTokenintegrations.googleAds.clientIdintegrations.googleAds.clientSecretintegrations.metaAds.adAccountIdintegrations.metaAds.accessTokenintegrations.klaviyo.apiKeyintegrations.tiktokAds.advertiserIdintegrations.tiktokAds.accessTokenintegrations.tiktokShop.appKeyintegrations.tiktokShop.appSecretintegrations.tiktokShop.accessTokenintegrations.tiktokShop.shopIdnotifications.slack.webhookUrlnotifications.telegram.botTokennotifications.telegram.chatId
Example:
{
"integrations": {
"shopify": {
"enabled": true,
"storeUrl": "your-store.myshopify.com",
"accessToken": "shpat_xxx",
"apiVersion": "2024-01"
}
}
}Sensitive values are encrypted at rest when config is saved.
Main Commands
init(i) - initialize configdoctor(d) - configuration and runtime diagnosticsstart(s) - run scheduler (--onceor--daemon)stop(x) - stop daemon processrun(r) - run one skill:run <skillId>run-all(ra) - run all enabled skills oncelogs(l) - query run historybackfill(bf) - compute/update baseline metricsshopify oauth-connect(shop oc) - generate token via browser OAuth code flow (recommended)shopify connect(shop c) - generate short-lived token from client credentialsactions(a) - action queue workflow (list/approve/reject)status(st) - overall status
Short Command Examples
rexipt-ai r dailyBriefing
rexipt-ai ra
rexipt-ai d
rexipt-ai l --limit 5
rexipt-ai a ls --status pendingEnvironment Variables
You can override config values with environment variables from:
.env.env.local(loaded after.env, so it overrides.env)
In the directory where you run the project.
If the same setting exists in both config.json and env, env wins at runtime.
Examples:
REXIPT_ORG_NAMELLM_PROVIDER,LLM_MODEL,LLM_BASE_URL,LLM_API_KEYSHOPIFY_ENABLED,SHOPIFY_STORE_URL,SHOPIFY_ACCESS_TOKENGOOGLE_ADS_ENABLED,GOOGLE_ADS_CUSTOMER_ID,GOOGLE_ADS_DEVELOPER_TOKEN,GOOGLE_ADS_ACCESS_TOKEN,GOOGLE_ADS_REFRESH_TOKENMETA_ADS_ENABLED,META_ADS_ACCOUNT_ID,META_ADS_ACCESS_TOKENKLAVIYO_ENABLED,KLAVIYO_API_KEYSLACK_ENABLED,SLACK_WEBHOOK_URL,SLACK_CHANNEL,SLACK_ALERTS_CHANNEL
Example:
# .env.local
SHOPIFY_ENABLED=true
SHOPIFY_STORE_URL=your-store.myshopify.com
SHOPIFY_ACCESS_TOKEN=shpat_xxxRelease
npm run release:prepare
npm run release:dry-run
# npm run release:publishSee RELEASE_CHECKLIST.md for full release steps.
