@suiyongsuiqi/sysq-cli
v0.1.0
Published
Official agent-first CLI for SYSQ mailbox automation.
Readme
@suiyongsuiqi/sysq-cli
Official agent-first CLI for SYSQ mailbox automation.
Install
Install from npm:
npm i -g @suiyongsuiqi/sysq-cli
sysq --helpOr run without installing globally:
npx @suiyongsuiqi/sysq-cli --helpBuild from source:
git clone https://github.com/suiyongsuiqi/sysq-cli.git
cd sysq-cli
pnpm install
pnpm build
node dist/cli.js --helpDesign
This CLI is optimized for agents and scripts first.
- Use explicit commands, not natural-language prompts.
- Use
--jsonfor stable machine-readable output. - Use
--yesfor destructive commands in non-interactive flows. - Treat
stdoutas success output andstderras human-readable error output.
Get Credentials
If you are using the official hosted SYSQ service:
- Visit
https://suiyongsuiqi.com/. - Register an account.
- Sign in to your account.
- Open
Console -> API Keys. - Create or copy an API key from that page.
For the hosted service, use:
SYSQ_BASE_URL=https://suiyongsuiqi.com/apiSYSQ_API_KEY=<your API key from Console -> API Keys>
Configuration
The CLI reads configuration from flags or environment variables.
| Option | Environment Variable | Required |
| --- | --- | --- |
| --base-url | SYSQ_BASE_URL | Yes |
| --api-key | SYSQ_API_KEY | Yes |
| --json | N/A | No |
| --yes | N/A | No |
Example:
export SYSQ_BASE_URL="https://suiyongsuiqi.com/api"
export SYSQ_API_KEY="ak-xxxxxxxx"If you are self-hosting SYSQ, replace SYSQ_BASE_URL with your own deployment URL.
The CLI always sends the platform-required header Tenant-Id: 000000.
SYSQ backend responses are keyed by errorKey, and localization is handled client-side, so the CLI does not expose a locale override.
Commands
Mailbox asset commands:
sysq mailbox listsysq mailbox remove <mailboxId>sysq mailbox remove-batch [mailboxIds...] --file <path>sysq mailbox buy --prefix <prefix> [--suffix <suffix>]sysq mailbox buy-random [--suffix <suffix>] [--count <n>]sysq mailbox buy-batch --file <path>sysq mailbox bind --target-user-id <id> (--mailbox-id <id> | --full-address <address>)
Mail reading commands:
sysq mail unread-summarysysq mail unread-listsysq mail messages --mailbox-id <id> [--current <n>] [--size <n>] [--after-id <id>]sysq mail mark-read --mailbox-id <id> --message-id <id> [...]
JSON Contract
Successful --json output is wrapped in a stable envelope:
{
"ok": true,
"data": {},
"meta": {
"command": "sysq mailbox list"
}
}Failed --json output is also normalized:
{
"ok": false,
"error": {
"type": "biz",
"errorKey": "mail.box.notFound",
"message": "Mailbox not found"
}
}Exit codes:
0: success1: remote or business error2: usage or configuration error130: cancelled by user
Agent Workflows
List purchased mailboxes:
sysq mailbox list --jsonRemove one mailbox in agent mode:
sysq --json --yes mailbox remove 2234567890123456789Buy one mailbox with a custom prefix:
sysq --json mailbox buy --prefix demo --suffix gmail.comPull unread mailboxes, then fetch messages:
sysq --json mail unread-list
sysq --json mail messages --mailbox-id 2234567890123456789 --current 1 --size 20Mark messages as read:
sysq --json mail mark-read --mailbox-id 2234567890123456789 --message-id 1001 --message-id 1002Batch File Formats
Batch remove accepts either of these JSON shapes:
["2234567890123456789", "2234567890123456790"]{
"mailBoxIds": ["2234567890123456789", "2234567890123456790"]
}Batch buy accepts either of these JSON shapes:
[
{ "prefix": "demo1", "suffix": "gmail.com" },
{ "prefix": "demo2", "suffix": "outlook.com" }
]{
"items": [
{ "prefix": "demo1", "suffix": "gmail.com" },
{ "prefix": "demo2", "suffix": "outlook.com" }
]
}Development
pnpm install
pnpm build
pnpm typecheck