Skip to main content

CLI tool for connecting to Polaris containers via terminal

Project description

Polaris Terminal

A command-line tool for connecting to Polaris containers via terminal.

Installation

From Source

# Clone the repository
git clone https://github.com/BANADDA/polaris-terminal.git
cd polaris-terminal

# Install the package
pip install -e .

Using pip

pip install polaris-terminal

Using Installer Script

# Download and run the installer
python install_polaris_terminal.py

Usage

List Available Containers

List all containers for the default miner:

polaris list

Show Container Details

View detailed information about a container. You can use either the container name or pod ID:

polaris info polaris-pod-1743999981-pod-1

Or using just the pod ID:

polaris info pod-1

Or using the timestamp part of the container name:

polaris info 1743999981-pod-1

Connect to a Container

Connect to a container terminal. Multiple formats are supported:

# Using full container name
polaris connect polaris-pod-1743999981-pod-1

# Using pod ID
polaris connect pod-1

# Using timestamp part
polaris connect 1743999981-pod-1

Configure Default Settings

View current configuration:

polaris config --show

Set default server URL:

polaris config --server-url http://148.76.188.132:8001

Set default miner ID:

polaris config --miner-id WWmHlBdA9KmiNHt3Hz7x

Specify Server URL for a Single Command

polaris connect polaris-pod-1743999981-pod-1 --server-url http://148.76.188.132:8001

Show Verbose Output

For detailed diagnostic information:

polaris connect polaris-pod-1743999981-pod-1 --verbose

Features

  • Smart Container Name Handling: Works with full container names, pod IDs, or partial names
  • Automatic Miner ID Detection: Automatically detects the correct miner ID for each container
  • WebSocket Terminal: Connect to container terminals via WebSocket
  • Detailed Container Information: View complete details about containers
  • Configuration Management: Persistent configuration stored in JSON file
  • Cross-Platform: Works on Windows, Linux, and macOS
  • Robust Error Handling: Helpful error messages and diagnostics

Container Name Formats

The tool intelligently handles different formats for container identification:

  • Full Container Name: polaris-pod-1743999981-pod-1
  • Pod ID: pod-1
  • Timestamp Format: 1743999981-pod-1

All these formats will be automatically detected and handled correctly.

Configuration

The tool stores its configuration in ~/.polaris/config.json. You can edit this file directly or use the polaris config command to update settings.

Default configuration:

{
  "server_url": "https://polaris-test-server.onrender.com",
  "miner_id": "WWmHlBdA9KmiNHt3Hz7x"
}

Troubleshooting

If you encounter connection issues:

  1. Check your server URL with polaris config --show
  2. Ensure your container exists with polaris list
  3. Try using the pod ID directly with polaris connect pod-1
  4. Use the --verbose flag for detailed diagnostics
  5. Try accessing the web terminal directly in your browser at https://polaris-test-server.onrender.com/api/v1/containers/{container_name}/terminal

Requirements

  • Python 3.7 or higher
  • requests library
  • websockets library "# polaris-terminal"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polaris_terminal-0.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polaris_terminal-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file polaris_terminal-0.1.0.tar.gz.

File metadata

  • Download URL: polaris_terminal-0.1.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for polaris_terminal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 06d2146d314f76c723a5cb85b3c7018b96c5fb59699ceb306fd26a4a85a12a58
MD5 726f39e02b0527a2b256689156df7f6e
BLAKE2b-256 3126ed382352002e2704ee73c5a11f3c7a60ab9ad355f040d1be3c1404b05485

See more details on using hashes here.

File details

Details for the file polaris_terminal-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for polaris_terminal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd00654f5412d25f49ee6d8f34df80764ba25d5db9ec4b1d5fc54b378728cfae
MD5 8ca38808101507dc520c05fc0b1ced4b
BLAKE2b-256 e80655dcc71e2091f9115db71bf9419f07e1effdc93f15fb7f2ce84016dccea9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page