Hubfly CLI
The Hubfly CLI is a powerful tool for managing your resources and creating secure tunnels to your containers directly from your terminal.
Getting Started
Install the CLI
Install the CLI globally using npm.
npm install -g hubfly-cliLogin
Run the login command to authenticate.
hubfly loginAuthorize
A browser window will open. Log in to your Hubfly account and authorize the CLI.
Success!
The CLI will receive a Custom Hubfly Personal Access Token (PAT) and save it locally.
Tunnel Management
The primary use of the CLI now is to manage HubTunnels.
Create a Tunnel
Create a secure, ephemeral SSH tunnel to a specific container.
# Interactive mode
hubfly interactive
# or
hubfly tunnel create --project <project_id>
# One-line mode
hubfly tunnel create --project <project_id> --container <container_id> --port 80 --local 8080
Parameters:
--project: The ID of the project.--container: The ID of the target container.--port: The port inside the container you want to access.--local: (Optional) The local port to forward to.
List Tunnels
View all your active tunnels.
hubfly tunnel list
Stop a Tunnel
Stop a specific tunnel session.
hubfly tunnel stop <tunnel_id>
Unused tunnels will be automatically deleted after a certain period of inactivity.
API Reference
The CLI interacts with the Hubfly API. You can also use the API directly.
Base URL: https://hubfly.space/api
Authorization: Bearer <YOUR_PAT_TOKEN>
More endpoints will be added in the future.