npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aihealingmecli

v0.0.9

Published

Official CLI for AIHealingMe public APIs

Downloads

71

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: audio and audio 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 --help

One-off run without global install:

npx -y -p aihealingmecli aiheal --help

Project-local install:

npm install aihealingmecli
npx aiheal --help

2. 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 get

Set API base:

aiheal config set apiBaseUrl https://aihealing.me/api

Set token manually:

aiheal config token-set --region zh --token <TOKEN>

Clear token:

aiheal config token-clear --region zh

4. Global options

All commands support:

  • --api-base <url>: override API base URL for one command
  • --locale <zh|en>: override X-Locale
  • --region <zh|en>: override X-Region and 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:

  1. --payload-file <path>
  2. --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-request
  • audio comments list
  • auth recovery/register/login endpoints
  • feedback submit
  • chat config
  • api request --no-auth

Most write operations require login first.

Quick login:

aiheal auth login --email [email protected] --password '***'
aiheal whoami

7. Command reference

7.1 config

  • config get
  • config set <key> <value>
    • key: apiBaseUrl|locale|region|mock|timeoutMs
  • 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 me
  • auth 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 of audio my)
  • audio liked [--sort <v>] [--page <n>] [--limit <n>]
  • audio update <audioId> [--payload-file <path> | --body <json>]
  • audio delete <audioId>
  • audio clear-my --yes
  • audio 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:

  • requestId is optional in payload; CLI auto-generates it when missing or blank.
  • CLI performs local payload validation before request and returns error.code=VALIDATION_ERROR on failure.
  • Validation output is field-level in error.issues[] with field/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_ERROR on failure.
  • Validation output is field-level in error.issues[] with field/message/expected/actual/suggestion.
  • requestId remains optional in payload (no auto-generation).

7.8 chat

  • chat config
  • chat quota
  • chat send <sessionId> --message <text>
  • chat send-stream <sessionId> --message <text>
  • chat single-healing-create <sessionId>

chat session:

  • chat session create
  • chat 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 overview
  • emotion planet
  • emotion 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 status
  • subscription orders
  • subscription 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-all
  • notification 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 rebuild
  • behavior 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, and auth/me probe result

7.18 update

  • update [--tag <tag>] [--npm-client <npm|pnpm|yarn>]
  • --update: shortcut for update --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 in single-job create payload because CLI can auto-generate, and optional in plan-stage-job create payload 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 as GET|POST|PUT|DELETE|PATCH
  • <endpointPath>: API path, e.g. /audio
  • <base>: healing service base URL
  • <path>: remote file path argument for healing 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, or login)
  • --plan-type: subscription plan enum: 7d|1m|1y
  • --feature: quota feature enum: single|plan
  • --status:
    • plan my: draft|active|completed
    • emotion timeline: active|released|all
  • --sort:
    • audio list: trending|newest|popular
    • audio my/liked: service-supported sort value
  • --locale: locale enum zh|en
  • --region: region enum zh|en (also decides token slot)
  • --tag: target npm dist-tag or version for update
  • --npm-client: package manager used by update (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 for audio download-url (supports OSS URL, /api/media/oss?..., absolute URL)
  • --audio-id: optional audio id in audio 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 for subscription 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 create and plan-stage-job create also run CLI local validation before request.

Payload field matrix:

  • auth send-code: R=email; O=type
  • auth send-sms-code: R=phone; O=type
  • auth register: R=email,password,code
  • auth register-phone: R=phone,password,code
  • auth login: R=email,password
  • auth login-phone: R=phone,code
  • auth login-phone-password: R=phone,password
  • auth reset-password: R=email,password,code
  • auth reset-password-phone: R=phone,password,code
  • auth password-update: R=currentPassword,newPassword
  • auth onboarding-complete:
    • R=birthDate,gender,lifeStage,traitRationality,traitPace,interests
    • O=nickname,lifeStageDetail,longTermGoals,responseLengthPreference,encouragementStrength,mbti,lowMoodCoping,therapyHistory,healingPreference,motto,bio
  • user profile-update: all fields optional (partial update)
  • audio update: all fields optional (partial update)
  • audio clear-my: R=yes
  • audio heart-echo: R=helpful; O=fitScore,whisper
  • audio web-url: R=audioId
  • audio links: R=audioId
  • audio download-url: R=url,output; O=audioId
  • audio comments add: R=content; O=parentComment
  • audio 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
  • 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
  • plan-stage-job create:
    • R=planId,stageIndex,planPath,day
    • O=requestId(optional),userRequest,shareText,voiceModel,voiceId,userSelections,fixedTags
  • chat send: R=message
  • chat send-stream: R=message
  • chat session rename: R=title
  • emotion text-job-create: R=text; O=occurredAt
  • emotion text-entry-create: R=text; O=occurredAt
  • emotion voice-entry-create: R=file; O=occurredAt
  • emotion release: O=style,message (if omitted, server uses default style)
  • subscription create-order: R=planType
  • subscription admin-refund: R=orderId; O=reason
  • subscription confirm: R=orderId
  • subscription paypal-create-order: R=planType
  • subscription paypal-capture-order: R=orderId,paypalOrderId
  • subscription creem-create-order: R=planType
  • subscription creem-confirm-order: R=orderId; O=checkoutId
  • subscription consume: R=feature
  • feedback submit: R=content; O=contact,pageUrl
  • behavior ingest: O=events (array, recommended)
  • api request: R=method,path; O=query,body,payloadFile,noAuth
  • healing pipeline: R=base + payload
  • healing plan: R=base + payload
  • healing 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 5

Create and wait single-healing job:

aiheal single-job create --payload-file ./single-job.json
aiheal single-job wait --request-id <requestId> --timeout-ms 600000

Use 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.mp3

9. Troubleshooting

  • AUTH_ERROR: login again, then check aiheal config get and aiheal whoami
  • API_ERROR with status=0: verify network and API base
  • npx cache EPERM: run with temp cache
NPM_CONFIG_CACHE=/tmp/aiheal-npm-cache npx -y -p aihealingmecli aiheal --help
  • Polling timeout: use get/by-request to 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:public

Token-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