aihealingmecli
v0.0.9
Published
Official CLI for AIHealingMe public APIs
Downloads
71
Maintainers
Readme
AIHealingMe CLI
AIHeal is an AI-powered emotional healing platform for daily stress relief, emotional regulation, and long-term inner growth.
Website: https://aihealing.me/
On AIHeal, users can:
- listen to personalized healing audio content
- create single-session healing experiences for immediate emotional support
- create deep healing plans with staged progress
- chat with AI for reflective and supportive conversations
- track emotion-space entries and trends
- manage personal profile, notifications, and subscriptions
aihealingmecli is the official CLI for AIHeal public APIs. It lets users complete core platform workflows from terminal: authentication, profile operations, browsing content, creating single healing sessions, managing deep healing plans, chat, emotion space, subscriptions, notifications, feedback, and raw API requests.
If you prefer a visual and interactive flow, you are warmly invited to experience AIHeal directly at https://aihealing.me/.
中文镜像文档: README_CN.md
CLI Capability Map
- account and session:
config,auth,whoami,update - user center:
user - audio ecosystem:
audioandaudio comments - healing creation:
single-job,plan,plan-stage-job - conversational healing:
chat - emotion-space workflows:
emotion - billing and entitlement:
subscription - user communications:
notification,feedback - memory and behavior context:
memory,behavior - advanced or custom calls:
api,healing
1. Install
Node.js >= 18 is required.
Global install:
npm install -g aihealingmecli
aiheal --helpOne-off run without global install:
npx -y -p aihealingmecli aiheal --helpProject-local install:
npm install aihealingmecli
npx aiheal --help2. Default API and auth model
- Default API base:
https://aihealing.me/api - Runtime auth: user token-based requests (
Authorization: Bearer ...) where required
3. Local config and session
The CLI stores local state in user home:
~/.aihealingmecli/config.json~/.aihealingmecli/session.json
Show current runtime config:
aiheal config getSet API base:
aiheal config set apiBaseUrl https://aihealing.me/apiSet token manually:
aiheal config token-set --region zh --token <TOKEN>Clear token:
aiheal config token-clear --region zh4. Global options
All commands support:
--api-base <url>: override API base URL for one command--locale <zh|en>: overrideX-Locale--region <zh|en>: overrideX-Regionand token slot--token <token>: temporary auth token for one command--version: print CLI version and exit--update: update CLI package using npm default channel and exit--mock: mark command context as mock mode--timeout-ms <ms>: request timeout in milliseconds
5. Request body input rules
Complex payload commands accept:
--payload-file <path>--body '{...json...}'
Merge rule: if both are provided, --body wins for overlapping keys.
6. Authentication model
No-auth commands include common public reads such as:
audio list/get/by-requestaudio comments list- auth recovery/register/login endpoints
feedback submitchat configapi request --no-auth
Most write operations require login first.
Quick login:
aiheal auth login --email [email protected] --password '***'
aiheal whoami7. Command reference
7.1 config
config getconfig set <key> <value>- key:
apiBaseUrl|locale|region|mock|timeoutMs
- key:
config token-set --token <token> [--region <zh|en>]config token-clear [--region <zh|en>]
7.2 auth
auth send-code --email <email> [--type register|reset_password]auth send-sms-code --phone <phone> [--type register|reset_password|login]auth register --email <email> --password <pwd> --code <code>auth register-phone --phone <phone> --password <pwd> --code <code>auth login --email <email> --password <pwd>auth login-phone --phone <phone> --code <code>auth login-phone-password --phone <phone> --password <pwd>auth reset-password --email <email> --code <code> --password <pwd>auth reset-password-phone --phone <phone> --code <code> --password <pwd>auth meauth onboarding-complete [--payload-file <path> | --body <json>]auth password-update [--payload-file <path> | --body <json>]auth logout [--region <zh|en>]
7.3 user
user profile <userId>user profile-update [--payload-file <path> | --body <json>]user follow <userId>user unfollow <userId>user followers <userId>user following <userId>user avatar-upload --file <path>
7.4 audio
audio list [--category <v>] [--search <v>] [--sort <trending|newest|popular>] [--locale <zh|en>] [--page <n>] [--limit <n>]audio recommended [--limit <n>] [--locale <zh|en>]audio get <audioId>audio by-request <requestId>audio user <userId> [--sort <v>] [--locale <zh|en>] [--page <n>] [--limit <n>](best effort: scans public audios visible in current locale)audio my [--sort <v>] [--page <n>] [--limit <n>]audio mine [--sort <v>] [--page <n>] [--limit <n>](alias ofaudio my)audio liked [--sort <v>] [--page <n>] [--limit <n>]audio update <audioId> [--payload-file <path> | --body <json>]audio delete <audioId>audio clear-my --yesaudio like <audioId>audio favorite <audioId>audio heart-echo <audioId> [--payload-file <path> | --body <json>]audio web-url <audioId>audio links <audioId>audio download-url --url <url> --output <path> [--audio-id <audioId>]audio download <audioId> --output <path>
audio comments:
audio comments list <audioId> [--page <n>] [--limit <n>]audio comments count <audioId>audio comments my [--page <n>] [--limit <n>](best effort: scans public + my audios that are reachable by current locale/session)audio comments user <userId> [--sort <v>] [--locale <zh|en>] [--page <n>] [--limit <n>](best effort: scans comments under public audios visible in current locale)audio comments add <audioId> [--payload-file <path> | --body <json>]audio comments delete <audioId> <commentId>audio comments clear-my --yes(best effort: scans public + my audios that are reachable by current locale/session)audio comments like <audioId> <commentId>
7.5 plan
plan create [--payload-file <path> | --body <json>]plan my [--status <draft|active|completed>] [--page <n>] [--limit <n>]plan get <planId>plan by-request <requestId>plan update <planId> [--payload-file <path> | --body <json>]
7.6 single-job
single-job create [--payload-file <path> | --body <json>]single-job get <jobId>single-job by-request <requestId>single-job wait --request-id <requestId> [--interval-ms <ms>] [--timeout-ms <ms>]
single-job create notes:
requestIdis optional in payload; CLI auto-generates it when missing or blank.- CLI performs local payload validation before request and returns
error.code=VALIDATION_ERRORon failure. - Validation output is field-level in
error.issues[]withfield/message/expected/actual/suggestion.
7.7 plan-stage-job
plan-stage-job create [--payload-file <path> | --body <json>]plan-stage-job get <planId> <stageIndex>plan-stage-job wait <planId> <stageIndex> [--interval-ms <ms>] [--timeout-ms <ms>]
plan-stage-job create notes:
- CLI performs local payload validation before request and returns
error.code=VALIDATION_ERRORon failure. - Validation output is field-level in
error.issues[]withfield/message/expected/actual/suggestion. requestIdremains optional in payload (no auto-generation).
7.8 chat
chat configchat quotachat send <sessionId> --message <text>chat send-stream <sessionId> --message <text>chat single-healing-create <sessionId>
chat session:
chat session createchat session list [--page <n>] [--limit <n>]chat session rename <sessionId> --title <title>chat session turns <sessionId> [--page <n>] [--limit <n>]
chat draft:
chat draft get <sessionId>chat draft generate <sessionId> [--regenerate]
7.9 emotion
emotion overviewemotion planetemotion curve [--days <n>]emotion timeline [--status <active|released|all>] [--page <n>] [--limit <n>]emotion text-job-create [--payload-file <path> | --body <json>]emotion text-job-get <jobId>emotion text-job-wait <jobId> [--interval-ms <ms>] [--timeout-ms <ms>]emotion text-entry-create [--payload-file <path> | --body <json>]emotion voice-entry-create --file <path> [--occurred-at <iso>]emotion release <entryId> [--payload-file <path> | --body <json>]
7.10 subscription
subscription statussubscription orderssubscription order-get <orderId>subscription order-cancel <orderId>subscription admin-refund --order-id <orderId> [--reason <text>]subscription create-order --plan-type <7d|1m|1y>subscription confirm --order-id <orderId>subscription paypal-create-order --plan-type <7d|1m|1y>subscription paypal-capture-order --order-id <orderId> --paypal-order-id <paypalOrderId>subscription creem-create-order --plan-type <7d|1m|1y>subscription creem-confirm-order --order-id <orderId> [--checkout-id <id>]subscription consume --feature <single|plan>
7.11 notification
notification list [--locale <zh|en>] [--page <n>] [--limit <n>]notification unread-count [--locale <zh|en>]notification read-allnotification read <id>
7.12 feedback
feedback submit [--payload-file <path> | --body <json>]
7.13 memory
memory context [--mode <single|plan>]memory compact-plan <planId>
7.14 behavior
behavior ingest [--payload-file <path> | --body <json>]behavior rebuildbehavior memory
7.15 healing (optional direct healing service)
healing health --base <url>healing pipeline --base <url> [--payload-file <path> | --body <json>]healing plan --base <url> [--payload-file <path> | --body <json>]healing voice-preview --base <url> --output <path> [--payload-file <path> | --body <json>]healing download-file --base <url> --path <remotePath> --output <path>
7.16 api raw fallback
api request --method <METHOD> --path <endpointPath> [--query key=value ...] [--payload-file <path> | --body <json>] [--no-auth]
7.17 whoami
whoami: print current config, redacted token status, andauth/meprobe result
7.18 update
update [--tag <tag>] [--npm-client <npm|pnpm|yarn>]--update: shortcut forupdate --tag latest --npm-client npm
7.19 Parameter glossary (all commands)
<userId>: target user identifier<email>: email used for auth commands<phone>: phone number used for auth commands<pwd>: password value in command examples<code>: email or sms verification code<audioId>: audio identifier<planId>: healing plan identifier<requestId>: async request identifier (job correlation id; optional insingle-job createpayload because CLI can auto-generate, and optional inplan-stage-job createpayload without auto-generation)<jobId>: async job identifier<stageIndex>: zero-based plan stage index<commentId>: comment identifier under one audio<sessionId>: chat session identifier<entryId>: emotion entry identifier<orderId>: subscription order identifier<id>: notification identifier<METHOD>: HTTP method such asGET|POST|PUT|DELETE|PATCH<endpointPath>: API path, e.g./audio<base>: healing service base URL<path>: remote file path argument forhealing download-file<remotePath>: remote file path for healing file download endpoint<paypalOrderId>: PayPal platform order id<title>: new title for chat session rename<text>/--message: plain text input for chat turn--type: auth code purpose, allowed values vary by endpoint (register,reset_password, orlogin)--plan-type: subscription plan enum:7d|1m|1y--feature: quota feature enum:single|plan--status:plan my:draft|active|completedemotion timeline:active|released|all
--sort:audio list:trending|newest|popularaudio my/liked: service-supported sort value
--locale: locale enumzh|en--region: region enumzh|en(also decides token slot)--tag: target npm dist-tag or version forupdate--npm-client: package manager used byupdate(npm|pnpm|yarn)--version: print CLI version and exit--update: run CLI self-update with default npm/latest settings--page: 1-based page index for paginated endpoints--limit: page size for paginated endpoints--days: time window in days for emotion curve aggregation--interval-ms: polling interval for wait commands--timeout-ms: timeout in milliseconds for request/polling command--file: local file path used by upload commands (avatar-upload,voice-entry-create)--output: local output file path for download/export commands--url: direct source URL/path foraudio download-url(supports OSS URL,/api/media/oss?..., absolute URL)--audio-id: optional audio id inaudio download-url, used to return website detail URL together--occurred-at: ISO-8601 datetime for voice emotion entry timestamp--query key=value: repeated query kv pairs (raw API mode)--body: inline JSON payload string--payload-file: JSON payload file path--no-auth: disable auth header for raw API request--regenerate: regenerate chat draft instead of returning current draft--checkout-id: optional checkout identifier for creem confirm--reason: optional reason text forsubscription admin-refund--yes: explicit confirmation required by destructive bulk-delete commands
7.20 Required vs optional fields by feature
Rules:
- Positional arguments like
<audioId>are required. - Required flags are written as
.requiredOption(...)in CLI and shown without[]in syntax. - Payload fields (
--body/--payload-file) mostly use server-side validation rules;single-job createandplan-stage-job createalso run CLI local validation before request.
Payload field matrix:
auth send-code: R=email; O=typeauth send-sms-code: R=phone; O=typeauth register: R=email,password,codeauth register-phone: R=phone,password,codeauth login: R=email,passwordauth login-phone: R=phone,codeauth login-phone-password: R=phone,passwordauth reset-password: R=email,password,codeauth reset-password-phone: R=phone,password,codeauth password-update: R=currentPassword,newPasswordauth onboarding-complete:- R=
birthDate,gender,lifeStage,traitRationality,traitPace,interests - O=
nickname,lifeStageDetail,longTermGoals,responseLengthPreference,encouragementStrength,mbti,lowMoodCoping,therapyHistory,healingPreference,motto,bio
- R=
user profile-update: all fields optional (partial update)audio update: all fields optional (partial update)audio clear-my: R=yesaudio heart-echo: R=helpful; O=fitScore,whisperaudio web-url: R=audioIdaudio links: R=audioIdaudio download-url: R=url,output; O=audioIdaudio comments add: R=content; O=parentCommentaudio comments clear-my: R=yes(best effort via client-side scan + delete)plan create:- R=
title - O=
description,stages,currentStage,status,totalDuration,healingRequestId,healingTheme,launchWish,userSelections
- R=
plan update: all fields optional (partial update)single-job create:- R=
userRequest - O=
requestId(auto-generated when missing),shareText,voiceId,selectedEmotions,intensity,energyLevel,selectedScenarios,bodySensations,currentEnvironment,sessionGoal,sessionApproach,avoidTopics,useHistoryMemory,selectedGoals,gender,age,mbti,lifeStage,sleepQuality,meditationExp
- R=
plan-stage-job create:- R=
planId,stageIndex,planPath,day - O=
requestId(optional),userRequest,shareText,voiceModel,voiceId,userSelections,fixedTags
- R=
chat send: R=messagechat send-stream: R=messagechat session rename: R=titleemotion text-job-create: R=text; O=occurredAtemotion text-entry-create: R=text; O=occurredAtemotion voice-entry-create: R=file; O=occurredAtemotion release: O=style,message(if omitted, server uses default style)subscription create-order: R=planTypesubscription admin-refund: R=orderId; O=reasonsubscription confirm: R=orderIdsubscription paypal-create-order: R=planTypesubscription paypal-capture-order: R=orderId,paypalOrderIdsubscription creem-create-order: R=planTypesubscription creem-confirm-order: R=orderId; O=checkoutIdsubscription consume: R=featurefeedback submit: R=content; O=contact,pageUrlbehavior ingest: O=events(array, recommended)api request: R=method,path; O=query,body,payloadFile,noAuthhealing pipeline: R=base+ payloadhealing plan: R=base+ payloadhealing voice-preview: R=base,output; O=payload
8. End-to-end examples
Login and browse newest content:
aiheal auth login --email [email protected] --password '***'
aiheal audio list --sort newest --limit 5Create and wait single-healing job:
aiheal single-job create --payload-file ./single-job.json
aiheal single-job wait --request-id <requestId> --timeout-ms 600000Use data.job.requestId from the single-job create response as <requestId> for the wait command.
Plan-stage healing job:
aiheal plan-stage-job create --payload-file ./plan-stage.json
aiheal plan-stage-job wait <planId> <stageIndex>Chat streaming:
aiheal chat session create
aiheal chat send-stream <sessionId> --message "I feel anxious today"Resolve website URL and downloadable URL:
aiheal audio links <audioId>
aiheal audio web-url <audioId>Download directly from OSS/source URL:
aiheal audio download-url --url "<source-url-or-path>" --output ./audio.mp39. Troubleshooting
AUTH_ERROR: login again, then checkaiheal config getandaiheal whoamiAPI_ERRORwithstatus=0: verify network and API basenpxcacheEPERM: run with temp cache
NPM_CONFIG_CACHE=/tmp/aiheal-npm-cache npx -y -p aihealingmecli aiheal --help- Polling timeout: use
get/by-requestto inspect job status and progress
10. Codex skill usage (npm package mode)
If you use the built-in Codex skill aiheal-cli-operator, run it in npm-package mode (aiheal or npx -p aihealingmecli).
11. Release (maintainers)
npm login
NPM_CONFIG_CACHE=/tmp/aiheal-npm-cache-release npm run check
NPM_CONFIG_CACHE=/tmp/aiheal-npm-cache-release npm run build
NPM_CONFIG_CACHE=/tmp/aiheal-npm-cache-release npm run pack:dry-run
NPM_CONFIG_CACHE=/tmp/aiheal-npm-cache-release npm run publish:publicToken-based auth alternative:
export NPM_TOKEN=your_token
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
NPM_CONFIG_CACHE=/tmp/aiheal-npm-cache-release npm run publish:public