Publishing and Sharing
There are two ways to share a Clip with others: publish and share.
Publish vs Share
Section titled “Publish vs Share”| Publish | Share | |
|---|---|---|
| What it means | Upload the code to the Registry | Expose a running Clip instance to other users |
| How others use it | pinix hub add @scope/name, then run it on their own machine | Invoke it remotely through the Cloud Hub, with the Clip running on your machine |
| Code ownership | The code is in the Registry; others download and run it themselves | You keep the code; others can only invoke it |
| Billing | Not directly supported | You can set per-call pricing (Credit) |
Publish to the Registry
Section titled “Publish to the Registry”-
Confirm you are logged in
Terminal window pinix registry whoami# → @yourscope -
Check clip.json
{"name": "@yourscope/my-clip","version": "0.1.0","description": "我的 Clip 做什么","main": "src/index.ts"} -
Publish
Terminal window pinix registry publish .
After publishing, anyone can install your Clip with pinix hub add @yourscope/my-clip.
Share a Clip
Section titled “Share a Clip”Sharing is done in the Console:
- Open the Sharing page in the Console
- Select the local Clip that is currently running
- Set the share name, tags, description, and access mode
- Publish
After sharing, your Clip appears in the Marketplace if you choose public mode. Other users can Add and use it, and invocation requests are routed through the Cloud Hub to your daemon.
Access Modes
Section titled “Access Modes”| Mode | Description |
|---|---|
| public | Visible in the Marketplace; anyone can add it |
| unlisted | Not shown in the Marketplace, but accessible to anyone with the link |
| private | Requires authorization to access |
| token | Requires a share token to subscribe |
Per-Call Billing
Section titled “Per-Call Billing”Shared Clips can set a price for each invocation, priced in Credit. Each time a user invokes the Clip, you receive the corresponding Credit.