Metadata-Version: 2.4
Name: jackedin
Version: 1.3.1
Summary: Python client for the JackedIN command line
Author: JackedIN
License-Expression: LicenseRef-JackedIN-EULA
Keywords: network,ssh,automation
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Dynamic: license-file

# jackedin

Python client for the [JackedIN](https://getpathprobe.com/jackedin/) command line. It wraps `jackedin exec`, dry-run, saved sessions, and the print-only commit-confirmed plan.

```bash
pip install jackedin
```

Set `JACKEDIN_BIN` when the `jackedin` program is not on `PATH`.

## Why

Network automation already speaks Python. This client lets a script call the same JackedIN engine as the terminal, including a dry-run that does not connect and YAML expect rules the command line already understands. It does not open its own SSH stack.

Run, dry-run, expect rules, saved sessions, and the print-only commit plan are free. They are not a separate paid feature.

`Jackedin.batch` calls `jackedin fleet` for an inventory. That command is Pro. The licensed binary enforces the check. The library does not run the commands itself.

## Password

A password is never a command-line argument and never written to the log.

- Leave it in `JACKEDIN_PASSWORD`. The child process inherits that variable.
- Or pass `password=` to `run`. The library sends it on stdin with `--password-stdin`.

`--password` is rejected before the process starts. An expect file that contains `password:` or `secret:` is rejected before it is written.

An enable secret is the `enable` or `secret` argument. The library passes `--enable-password-env JACKEDIN_ENABLE_PASSWORD` and puts the value only in that child environment variable. On a Cisco session, or a serial session with no vendor, `enable` is sent once before the other commands. Junos does not get that command. A list that ends in `exit`, `logout`, or `quit` is refused when expect rules are set.

## Example

Hosts in examples are `192.0.2.10` and `router1`. The user is `netops`.

```python
from jackedin import Jackedin

device = Jackedin("192.0.2.10", username="netops")
console = Jackedin("COM5", protocol="serial", vendor="cisco")  # no --user unless you set one
plan = device.dry_run(["show version"])
assert plan.sent is False

report = device.run(
    ["show version"],
    expect="- command: show version\n  expect_match: Version\n",
)
print(report.commands[0].output)

print(device.commit_confirmed(minutes=5).text)
```

`commit_confirmed` only prints the Junos or Cisco plan. It does not connect.

A saved session is `Jackedin.from_session("router1")`. The name is the session label, not a secret.
