A natural shell for debugging Juju Kubernetes workload containers via Pebble
Project description
borescope
A natural shell for debugging Juju Kubernetes workload containers.
Kubernetes charm workload containers usually run a rock
with no shell — so when something breaks, juju ssh --container=workload … drops
you nowhere useful. borescope gives you a prompt that feels like bash but talks to
the container's Pebble instead of a real shell:
$ borescope myapp/0
pebble:/# ls /var/log/myapp
pebble:/# tail -f /var/log/myapp/error.log
pebble:/# services
pebble:/# logs --follow myapp
pebble:/# plan
pebble:/# exit
No setup ceremony: borescope picks up your current Juju controller/model and uses your
existing juju authority — if you can juju ssh to the unit, borescope works; if you
can't, it fails the same way.
Install
v1 is under active development. For now, from a checkout:
uv tool install . # or: pipx install .
Usage
borescope <unit> # default (first) workload container
borescope <unit> --container=<name> # a specific workload container
borescope --model <model> <unit>
borescope <unit> --command "services" # one-shot, no REPL (for scripts)
borescope <unit> --snapshot # dump container state as JSON
Documentation
Full documentation — a tutorial, how-to guides, and CLI/command reference — is at https://tonyandrewmeyer.github.io/borescope/.
The docs are plain Markdown under docs/src/, built into static
HTML with a small script (no docs framework). To build them locally:
uv run python docs/src/_build.py # or: tox -e docs
See docs/README.md for the authoring rules.
How it works
borescope is three thin, independently-testable layers:
- Transport — talks to a Pebble. The primary backend (
CliTransport) reaches the workload's Pebble through the charm container —juju ssh <unit>(the charm container always has a shell) pointed at the workload's socket, which Juju mounts there at/charm/containers/<name>/pebble.socket. This works even against rocks with no shell (the shell lives in the charm container, not the rock) and stays entirely within your Juju authority — nokubectlor cluster-admin. It drivespebblevia shimmer (a drop-inops.pebble.Clientover the Pebble CLI). When the Pebble socket is directly reachable (running inside the charm, or a local Pebble),SocketTransportuses the realops.pebble.ClientHTTP API instead. - Discovery — turns a unit reference into the right Pebble: confirms the unit,
reads the charm's
metadata.yamlfor workload container names, and sanity-checks the container is alive. Everything uses your Juju model access — nokubectl/ cluster-admin. - Shell — a small REPL:
cd/pwd, path-aware tab completion, history, and a minimal command set. Pebble's own vocabulary (services,logs,plan, …) is first-class, not hidden behind apebbleprefix. For anything else,exec <cmd>runs a binary that's already in the container.
Scope
borescope is for Kubernetes charms (which run Pebble). Machine charms already have
a real shell and are out of scope. It deliberately ships a minimal command set and
grows on request — if a tool exists in the container, reach it with exec.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file borescope-0.1.0b1.tar.gz.
File metadata
- Download URL: borescope-0.1.0b1.tar.gz
- Upload date:
- Size: 64.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7217f6065310c0961a95205fbf16cae202903be81b38b208b879cbe9ee2a58ee
|
|
| MD5 |
3e3c46d0c62a711de72d1c2c04e919f2
|
|
| BLAKE2b-256 |
a77be0dbcd31d83e3759452ecf78be4ec8cdff46742a90e121aaea2ffafd8c28
|
Provenance
The following attestation bundles were made for borescope-0.1.0b1.tar.gz:
Publisher:
publish.yaml on tonyandrewmeyer/borescope
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
borescope-0.1.0b1.tar.gz -
Subject digest:
7217f6065310c0961a95205fbf16cae202903be81b38b208b879cbe9ee2a58ee - Sigstore transparency entry: 1678486626
- Sigstore integration time:
-
Permalink:
tonyandrewmeyer/borescope@74190a657eb711d503a1548d2209fff18b9b8de0 -
Branch / Tag:
refs/tags/v0.1.0b1 - Owner: https://github.com/tonyandrewmeyer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@74190a657eb711d503a1548d2209fff18b9b8de0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file borescope-0.1.0b1-py3-none-any.whl.
File metadata
- Download URL: borescope-0.1.0b1-py3-none-any.whl
- Upload date:
- Size: 47.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37816181addcf5293b23ae514360cbdec46a8063a0f3f5bcc6a609d35256601a
|
|
| MD5 |
ab3b8b7d781c27a7d67eb1e36bc3990c
|
|
| BLAKE2b-256 |
39549b474e908d4172dc3bec64d77bd20c79eec0d714493ed9b199c0819b9a34
|
Provenance
The following attestation bundles were made for borescope-0.1.0b1-py3-none-any.whl:
Publisher:
publish.yaml on tonyandrewmeyer/borescope
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
borescope-0.1.0b1-py3-none-any.whl -
Subject digest:
37816181addcf5293b23ae514360cbdec46a8063a0f3f5bcc6a609d35256601a - Sigstore transparency entry: 1678486700
- Sigstore integration time:
-
Permalink:
tonyandrewmeyer/borescope@74190a657eb711d503a1548d2209fff18b9b8de0 -
Branch / Tag:
refs/tags/v0.1.0b1 - Owner: https://github.com/tonyandrewmeyer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@74190a657eb711d503a1548d2209fff18b9b8de0 -
Trigger Event:
push
-
Statement type: