- Help text showed wrong config path (~/.portainer-cli vs ~/.config/portainer-cli)
- --port without colon (e.g. --port 8080) crashed with nil/tcp key; now errors clearly
- --cmd used naive split(' ') breaking quoted args; switched to Shellwords.split
- --env without '=' (e.g. --env FOO) silently passed empty value; now errors clearly
- SSL/connection errors surfaced as raw exception; now caught with actionable message
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Config moved to ~/.config/portainer-cli/config.yml following XDG convention.
README covers installation, configuration, all commands, container name
resolution logic, and debugging. Tool noted as AI-generated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Silences stack/endpoint/container resolution messages for scripting
and AI use cases where only raw I/O should be on stdout/stderr.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
--run CMD wraps the command in the shell: /bin/sh -c CMD, keeping TTY
mode so interactive commands like 'rails c' or 'bash' work correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When omitted, tries: 1) same name as stack, 2) 'app'.
So 'portainer-cli console librarian' resolves to librarian-librarian-1,
and 'portainer-cli console myapp' falls back to myapp-app-1.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Portainer requires endpointId in the websocket/exec query string.
Was returning 400 "Missing query parameter".
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
400/4xx responses include a body (Content-Length) with the actual error
message, which was previously swallowed. Now captured and shown in the
RuntimeError so the root cause is visible without --debug.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shows WS URL, auth headers (truncated), full handshake request/response.
Also improves the handshake failure error to include the raw server response.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Raw OpenSSL sockets don't find the system CA bundle the same way Net::HTTP
does. ssl_verify (default: true) is now a config setting that applies to
both HTTP REST calls and WebSocket connections. Set via `portainer-cli configure`.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prefer exact "<stack>-<service>-<N>" compose naming over generic substring
match, so "librarian" in stack "librarian" resolves to "librarian-librarian-1"
unambiguously. Substring fallback is also scoped to the stack's own containers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Falls back to substring match when exact name isn't found. Auto-selects
if unambiguous (e.g. "librarian" → "librarian-librarian-1"), errors with
a disambiguation list if multiple containers match.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
portainer-cli console <stack> <container> looks up the stack by name to
find its endpoint ID automatically, so the user never needs to specify it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ruby CLI tool for interacting with the Portainer API. Supports listing
endpoints/stacks/containers/volumes/networks, creating stacks and containers,
and opening an interactive exec session in a container via WebSocket.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>