dating-cli
v0.2.5
Published
CLI wrapper for dating APIs used by AI agents
Readme
dating-cli
npm-based Dating API command-line wrapper for direct AI/Agent invocation.
1. Installation
Install dependencies locally in this directory:
Global installation (development machine):
npm install -g dating-cli
dating-cli --help2. Configuration
Default config file path: ~/.dating-cli/config.json
dating-cli config showAfter successful task create|get|update|stop, the latest task state is automatically saved:
lastTask(object containingtaskId/taskName/status/matchStatus/resultVersion/operation/updatedAt)lastTaskIdlastTaskStatuslastTaskMatchStatuslastTaskOperationlastTaskUpdatedAt
task create returns the created task payload, including taskId and taskName, so CLI saves lastTask directly from backend response.
Auth state is also persisted automatically:
register/loginalways savetoken/tokenHead/memberId/usernamelogoutalways clears local auth fields and writes the config
Environment variables are also supported:
DATING_API_TOKENDATING_API_TOKEN_HEADDATING_API_CONFIG
3. Typical Workflow
3.1 Register (token auto-saved)
dating-cli registerTo try a specific username first:
dating-cli register --username alice3.2 Login (token auto-saved)
dating-cli login --username demo_user --password demo_pass3.3 Logout and clear local token
dating-cli logout3.4 Upload image to MinIO
dating-cli upload "./photos/me-1.jpg" "./photos/me-2.jpg"This command uploads each file via POST /minio/upload, then automatically calls PUT /member-profile with photoUrls array.
Returned URLs are in top-level photoUrls.
3.5 Update profile
dating-cli profile update \
--gender Male \
--character-text "gentle,introverted" \
--hobby-text "sports" \
--ability-text "basketball" \
--city Shanghai \
--photo-url "https://cdn.example.com/photos/me-1.jpg" \
--photo-url "https://cdn.example.com/photos/me-2.jpg" \
--email "[email protected]" \
--whatsapp "85260000000"For profile images, prefer dating-cli upload <filePaths...> to upload and update photoUrls in one step.
3.6 Create task
dating-cli task create \
--task-name "Find female match" \
--preferred-gender-filter '{"eq":"Female"}' \
--preferred-city-filter '{"eq":"Shanghai"}' \
--preferred-height-filter '{"gte":165,"lte":180}' \
--intention "serious relationship"Success response includes the created task object in response.data, including taskId and taskName.
--*-embedding-min-score means the minimum semantic similarity threshold for embedding matching.
Default recommendation is to leave it unset; when omitted on task create, backend defaults to 0.1.
Update by taskId:
dating-cli task update 12 \
--task-name "Updated criteria" \
--preferred-gender-filter '{"eq":"Female"}' \
--preferred-city-filter '{"eq":"Hangzhou"}' \
--intention "long-term relationship"task update and task stop still return success-only payloads (response.data is usually null). CLI infers the local taskState from the controller behavior:
task updatesavesstatus=active,matchStatus=UNMATCHED,resultVersion=0task stopsavesstatus=stopped,matchStatus=STOPPED
CLI still treats any non-code=200 response as an error and prints backend message.
3.7 Single check
dating-cli check 12Check a specific page (10 candidates per page):
dating-cli check 12 --page 2check preserves the controller's top-level response.watchStatus and response.serverTime, and normalizes response.data.candidates[].photoUrls to an array.
3.8 Re-check until matched
dating-cli check 12Re-check when unmatched
3.9 Reveal contact after match
dating-cli reveal-contact 2013.10 Submit review
dating-cli review 201 --rating 5 --comment "Great communication"4. Main Commands
dating-cli registerdating-cli logindating-cli logoutdating-cli config path|show|set-token|clear-tokendating-cli upload <filePaths...>dating-cli profile updatedating-cli task create|get|update|stopdating-cli checkdating-cli reveal-contactdating-cli reviewdating-cli admin violation-reviewdating-cli admin ranking-getdating-cli admin ranking-set
5. Parameter Input
dating-clinow uses direct command-line parameters only.--json/--json-file/--criteria-json/--criteria-fileare no longer supported.- Task criteria filter options use GraphQL filter JSON object strings (for example
--preferred-gender-filter '{"eq":"female"}'). - Use
--helpon each command to view all supported direct options.
6. Output Format
Default output is JSON for easy parsing by upstream AI.
Error response:
{
"ok": false,
"error": {
"message": "...",
"status": 500,
"payload": {}
}
}