Skip to main content

keywright

The client half of Keywright, a just-in-time credential broker for AI agents.

  • kw run|put|get|capture|request|status|tool reach brokered SSH hosts and MCP tools from any shell.
  • kw hazards --hook is the destructive-command tripwire, usable as a Claude Code PreToolUse hook.
  • kw setup claude-code|codex|check configures the agent machine.

This is an unreleased source preview. Run installation commands from the repository root.

pipx install ./client
kw login https://keywright.example.org/mcp --paste
kw setup claude-code
kw setup check

The client requires Python 3.12 or newer. On a Raspberry Pi or other machine with an older system Python, uv can install a separate runtime for the client:

uv tool install --python 3.13 ./client

Run agent setup as the user who runs the agents. kw setup check validates the integrations present on that machine; a Codex-only installation does not require Claude Code hooks.

Codex sandbox and approvals

kw guide (also kw guides) explains the agent workflow. Codex execution permission controls whether the local command can reach the broker; Keywright separately controls each brokered operation and its phone approval. For blocked network access, request a narrow execution prefix such as ["kw", "resources"] or ["kw", "run", "dev-host"] through Codex's approval interface. Review those prefixes before saving them; do not blanket-allow kw or disable the sandbox. See the official Codex rules documentation. Setup installs agent instructions; it does not change Codex execution rules.

Network calls have a 15-second startup/handshake deadline and a separate response deadline of the requested operation timeout plus 30 seconds. Worker cleanup adds at most one second before termination. The worker inherits the sandbox and receives credentials over a private pipe. This also bounds stalls in DNS resolution or SDK shutdown. Phone approval polling and remote command timeouts keep their existing budgets. Transport errors exit 6 without retrying operations; check the audit record before repeating an operation with an unknown outcome.

Session attribution uses KW_SESSION first, then header-safe CODEX_THREAD_ID metadata when present, then Linux process ancestry. The metadata path was observed in Codex desktop; hosts that do not supply it retain the fallback. Compare kw session inside and outside the sandbox to check attribution. Process fallback is per process, not necessarily per conversation. Switching from process to thread identity requires fresh session-scoped approvals.

License

Keywright is licensed under Apache-2.0. Copyright 2026 Keywright contributors. See NOTICE and third-party notices. Commercial use and proprietary extensions are permitted under the license's terms. Unless explicitly stated otherwise, contributions intentionally submitted for inclusion in Keywright are provided under Apache-2.0.

Metadata

Release files for keywright 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for keywright 0.0.1
File Size Uploaded Provenance Actions
keywright-0.0.1.tar.gz 51.0 kB With provenance Details for keywright-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for keywright 0.0.1
File Interpreter ABI Platform Actions
keywright-0.0.1-py3-none-any.whl Python 3 none any Details for keywright-0.0.1-py3-none-any.whl

Total release size: 110.7 kB

Release files / keywright-0.0.1.tar.gz

Download URL keywright-0.0.1.tar.gz
Size 51.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ef372a23ab9fa03c231d7f4b5b49f334728c7f657d3fd5b55638492fd768f5f5
BLAKE2b-256 checksum
How to use checksums
36a55a20497c7b869fb7ba99d78be385eff6f20432dc036d9f57a86338f3cd0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / keywright-0.0.1-py3-none-any.whl

Download URL keywright-0.0.1-py3-none-any.whl
Size 59.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8b3390643b64104eb369b35eb0cfc7d266d559d8795602dbc7885fdb1a354b8
BLAKE2b-256 checksum
How to use checksums
105c87513cad18123326ab9e66e804165b1d9ef8c84383c838e8be7893791eac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for keywright 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for keywright-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page