Skip to content

Hub

The Hub is where Clips are discovered and invoked.

When you run pinix invoke todo list, the CLI sends the request to the Hub. The Hub finds the Clip instance for todo in its routing table, forwards the request, receives the result, and returns it to you. Agents invoke Clips through the same flow.

The Hub does not care how a Clip is implemented. TypeScript, Go, and native programs are all the same to the Hub. They are Clips with aliases and commands.

PlantUML Diagram

No type branches. No special cases.

Each Clip has a unique alias on the Hub. This is the identifier used for invocation:

Terminal window
pinix hub add @pinix/todo # alias: todo
pinix hub add @pinix/todo --alias my-tasks # alias: my-tasks
pinix invoke todo list # 通过 alias 调用

If no alias is specified, one is generated automatically from the package name.

Pinix has two types of Hub:

Local HubCloud Hub
Where it runsOn your machine, built into the daemonhub.pinixai.com
Who can access itLocal CLI / ConsoleAny signed-in device
Clip sourcesLocally installed ClipsClips from all users connected to the Cloud Hub

After pinix login, the daemon connects to the Cloud Hub as a Provider. Your local Clips become visible on the Cloud Hub, and you can also invoke Clips shared by others.

PlantUML Diagram
  1. The Client (CLI / Console / Agent) sends a request to the Hub
  2. The Hub checks the routing table and finds the Provider for the target Clip
  3. The Provider sends the request to the Clip instance
  4. The Clip executes and returns the result
  5. The result is returned along the same path

Calls between Clips follow the same flow. When one Clip invokes another Clip, the call is still routed through the Hub.