zsxq-shared
Original:🇨🇳 Chinese
Translated
Knowledge Planet CLI Shared Basics: Authentication login/logout, view authentication status, diagnose configuration. Triggered when users need to log in for the first time, log out, view authentication status, or encounter authentication errors.
18installs
Sourceunnoo/zsxq-skill
Added on
NPX Install
npx skill4agent add unnoo/zsxq-skill zsxq-sharedTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →zsxq-cli Sharing Rules
This skill guides you on how to operate Knowledge Planet resources via zsxq-cli and what precautions to take.
Authentication
zsxq-cli uses OAuth 2.0 Device Authorization Grant Flow (RFC 8628) for authentication. The token is stored in the system Keychain and is permanently valid.
Login
bash
# Initiate login (an authorization link will be output; users open and authorize it on mobile/browser)
zsxq-cli auth loginLogin process:
- The command outputs a link and
verification_uriuser_code - Users open the link on mobile or browser and complete authorization
- The CLI automatically polls, and saves the token automatically after authorization is completed
When you help users log in as an AI Agent, runin the background, read the output, provide the authorization link to the user, and wait for the user to complete authorization.zsxq-cli auth login
View Authentication Status
bash
zsxq-cli auth status # Display current logged-in account in table format
zsxq-cli auth status --json # Output in JSON formatLogout
bash
zsxq-cli doctor # Diagnose whether configuration and authentication are normalConfiguration Diagnosis
bash
zsxq-cli doctor # Check CLI configuration and keychain authentication status
zsxq-cli config show # Display version information and current configuration
zsxq-cli config show --json # In JSON formatDirect API Calls
When Shortcuts cannot meet your needs, you can directly call the underlying MCP tools:
bash
zsxq-cli api list # List all available MCP tools and parameters
zsxq-cli api call <tool> --params '<json>' # Call the specified tool
zsxq-cli api raw --method GET --path /v3/users/selfExamples:
bash
zsxq-cli api call get_self_info --params '{}'
zsxq-cli api call search_groups --params '{"keyword":"Go语言"}'
zsxq-cli api call get_user_footprints --params '{"user_id":"123456","group_id":"123456789"}'
# Recommendation: Use the explicit-parameter raw subcommand for general HTTP APIs
zsxq-cli api raw --method GET --path /v2/groups/123456789/topics --query '{"count":10}'Security Rules
- Token is the login credential, it is prohibited to output it in plaintext in the terminal or share it with others
- Must confirm user intent before performing write/delete operations (posting, commenting, creating notes, etc.)
- When unsure about group_id / topic_id, use query commands to confirm first, then execute write operations
Common Error Handling
| Error | Cause | Solution |
|---|---|---|
| Token is invalid or expired | Re-run |
| Login not completed | Run |
| Missing required parameter | First query group_id with |
| Missing required parameter | First query topic_id with |