aigne hub
The aigne hub command is your central tool for managing connections to the AIGNE Hub. The Hub provides access to managed large language models, handles API key management, and tracks your credit usage. Properly configuring your Hub connection is essential for running agents that utilize Hub-provided models.
This command set allows you to connect to new Hubs (both the official Arcblock Hub and self-hosted instances), list your existing connections, switch between them, and monitor your account status.
Usage#
Basic Command Structure
aigne hub <subcommand>Commands#
The aigne hub command includes several subcommands to manage different aspects of your Hub connections.
Command | Alias | Description |
|---|---|---|
| Connect to a new AIGNE Hub. | |
|
| List all configured AIGNE Hub connections. |
| Switch the active AIGNE Hub. | |
|
| Display the currently active AIGNE Hub. |
|
| Remove a configured AIGNE Hub connection. |
|
| Show detailed information for a specific Hub connection. |
connect [url]#
Connects your local CLI to an AIGNE Hub instance. This process authenticates your machine and stores an API key for future requests in the ~/.aigne/aigne-hub-connected.yaml file.
Usage
Connect to a Hub
aigne hub connect [url]Behavior
- Interactive Mode: If you run the command without a URL, an interactive prompt will appear, allowing you to choose between the official AIGNE Hub or a custom, self-hosted Hub URL.
Interactive Connection
$ aigne hub connect ? Choose a hub to connect: › - Use arrow-keys. Return to submit. ❯ Official Hub (https://hub.aigne.io) Custom Hub URL - Direct Mode: If you provide a URL, the CLI will attempt to connect to that specific Hub directly.
Direct Connection
$ aigne hub connect https://my-hub.example.com
In both cases, a browser window will open for you to authenticate and authorize the CLI connection. Once completed, the credentials will be saved locally.
list#
Displays a table of all AIGNE Hubs you have previously connected to. It also indicates which Hub is currently active.
Usage
List Connections
aigne hub list
# or using the alias
aigne hub lsExample Output
$ aigne hub ls
Connected AIGNE Hubs:
┌───────────────────────────────────────────────────┬────────┐
│ URL │ ACTIVE │
├───────────────────────────────────────────────────┼────────┤
│ https://hub.aigne.io │ YES │
├───────────────────────────────────────────────────┼────────┤
│ https://my-hub.example.com │ NO │
└───────────────────────────────────────────────────┴────────┘
Use 'aigne hub use' to switch to a different hub.use#
Switches the active AIGNE Hub. This command is useful when you have multiple Hub connections (e.g., a personal account and a team account) and need to change which one is used by default for commands like aigne run.
Usage
Switch Active Hub
aigne hub useBehavior
Running this command will present an interactive list of your saved Hub connections. Select the one you wish to make active.
Interactive Switch
$ aigne hub use
? Choose a hub to switch to: › - Use arrow-keys. Return to submit.
https://hub.aigne.io
❯ https://my-hub.example.com
✓ Switched active hub to https://my-hub.example.comstatus#
Quickly shows the URL of the currently active AIGNE Hub and its connection status.
Usage
Check Status
aigne hub status
# or using the alias
aigne hub stExample Output
$ aigne hub status
Active hub: https://hub.aigne.io - onlineremove#
Removes a saved AIGNE Hub connection from your local configuration file.
Usage
Remove a Hub
aigne hub remove
# or using the alias
aigne hub rmBehavior
This command will interactively prompt you to select which of your saved Hub connections you want to remove.
Interactive Removal
$ aigne hub remove
? Choose a hub to remove: › https://my-hub.example.com
✓ Hub https://my-hub.example.com removedinfo#
Fetches and displays detailed account information for a selected Hub connection. This includes user details, credit balance, and important links.
Usage
Get Hub Info
aigne hub info
# or using the alias
aigne hub iBehavior
First, you will be prompted to select a configured Hub. Then, the CLI will display its connection status and your account details.
Example Output
$ aigne hub info
AIGNE Hub Connection
──────────────────────────────────────────────
Hub: https://hub.aigne.io
Status: Connected ✅
User:
Name: John Doe
DID: z2qa...w9vM
Email: john.doe@example.com
Credits:
Used: 1,234
Total: 100,000
Links:
Payment: https://hub.aigne.io/payment/...
Profile: https://hub.aigne.io/profile/...