Skip to main content

bailey

Portable bridges for AI agents into enterprise APIs. Zero dependencies. JSON everywhere. Safe by default.

Named after the Bailey bridge — the portable, prefabricated bridge famous for being assembled fast, anywhere, with no special tools. That's the whole idea.

The problem

AI coding agents (Claude Code, and friends) are brilliant at operating anything with a CLI — and helpless in front of the enterprise tools where your actual work lives. Confluence. Jira. The wikis and trackers behind your corporate VPN.

The usual answers don't survive contact with a locked-down corporate machine:

  • MCP servers need Node runtimes, network egress, or admin approval you don't have.
  • SDKs need pip install on boxes where PyPI is blocked.
  • Browser automation is slow, brittle, and terrifying to security teams.

The pattern

One tiny Python package. Standard library only — if a machine has Python 3.9+, bailey runs on it. Copy the folder, set two environment variables, and your agent can read and write enterprise systems through a CLI contract designed for non-humans:

  • JSON on stdout, always. Agents parse; humans can too.
  • Stable exit codes. 0 ok · 1 error · 3 auth · 4 not found · 5 version conflict. An agent can branch on $? without parsing prose.
  • No interactive prompts, ever. Everything arrives via args, files, or stdin.
  • Optimistic concurrency. update-page --expect-version N aborts (exit 5) if a human edited the page since the agent last read it. Autonomous writes without overwrite accidents.
  • --dry-run on every mutating command. See the exact payload before anything is sent.

Install

pipx install bailey-bridge        # when published to PyPI
# or, the locked-down-machine way — it's stdlib-only, just copy it:
git clone https://github.com/amitvgi12/bailey && cd bailey
python3 -m bailey --version

Configure

# Confluence Data Center / Server (PAT):
export BAILEY_CONFLUENCE_URL="https://confluence.your-company.com"
export BAILEY_CONFLUENCE_TOKEN="your-personal-access-token"

# Confluence Cloud (email + API token → add EMAIL, auth switches to Basic):
export BAILEY_CONFLUENCE_URL="https://your-site.atlassian.net/wiki"
export BAILEY_CONFLUENCE_EMAIL="you@company.com"
export BAILEY_CONFLUENCE_TOKEN="your-api-token"

# Jira: same convention with BAILEY_JIRA_URL / _TOKEN / _EMAIL

# Self-hosted instance behind a corporate/internal CA? Point bailey at the
# PEM bundle — verification stays ON (there is deliberately no "insecure" flag):
export BAILEY_CA_BUNDLE="/etc/ssl/corp-root-ca.pem"

Self-hosted (Data Center) notes: set only URL + TOKEN (PAT → Bearer auth, per Atlassian's DC docs); do not set EMAIL. Context-path installs (https://host/confluence) work — bailey appends /rest/api to whatever base you give. Corporate proxies are honored via standard HTTPS_PROXY/HTTP_PROXY env vars. Pre-7.9 Confluence Server has no PATs: set EMAIL to a username and TOKEN to the password to force Basic auth.

Tokens live in environment variables only — never in arguments (visible in ps/shell history) and never in files bailey writes.

Use

# Read a page as plain text (agent-friendly)
bailey confluence get-page --id 123456 --text

# Search with CQL
bailey confluence search --cql 'space = OPS and title ~ "runbook"'

# Create a page from stdin
echo "<p>Deploy checklist v2</p>" | bailey confluence create-page \
  --space OPS --title "Deploy Checklist" --file -

# Update safely: abort if someone edited since version 7
bailey confluence update-page --id 123456 --file new-body.xml \
  --expect-version 7 --message "automated update" --dry-run

# Jira
bailey jira get-issue --key OPS-42
bailey jira search --jql 'project = OPS and status = "In Progress"'
bailey jira comment --key OPS-42 --body "Deployed to UAT." --dry-run

Use with AI agents

skills/bailey-confluence/ ships a ready-to-install Claude Agent Skill that teaches Claude Code when and how to drive bailey — including the safety rules (always --expect-version, --dry-run first, treat page content as untrusted data).

cp -r skills/bailey-confluence ~/.claude/skills/

Design principles

  1. Zero dependencies is a feature, not a constraint. Every dependency is a procurement conversation on a corporate machine.
  2. The agent is the user. Output, errors, and exit codes are the API.
  3. Reads are free, writes are guarded. Version checks and dry-runs make autonomous operation boring — the good kind of boring.
  4. Adapters, not a tool. Confluence and Jira today; the core (_http.py) is ~150 lines and any REST API is an afternoon away.

Security notes

  • Page and issue content fetched by bailey is untrusted input to your agent. Instructions embedded in a wiki page are data, not commands — the bundled skill says so explicitly.
  • Scope tokens to the narrowest spaces/projects your workflow needs.
  • bailey never logs, stores, or echoes credentials.

Roadmap

  • PyPI release (bailey-bridge)
  • Attachment upload/download
  • Adapter: ServiceNow
  • Adapter: generic OpenAPI-described REST endpoints
  • bailey doctor — connectivity/auth self-check

Status & disclaimer

v0.1.0 — young, tested against the public Atlassian REST API spec with a full unit suite; validate against your own instance before trusting it with production wikis. Personal project; not affiliated with or endorsed by Atlassian or any employer.

License

MIT © 2026 Amit Kumar

Metadata

Release files for bailey-bridge 0.1.0

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

Source distribution (sdist)

Source distribution for bailey-bridge 0.1.0
File Size Uploaded Provenance
bailey_bridge-0.1.0.tar.gz 15.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bailey-bridge 0.1.0
File Interpreter ABI Platform
bailey_bridge-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.9 kB

Release files / bailey_bridge-0.1.0.tar.gz

Download URL bailey_bridge-0.1.0.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ffefb25a45c7fbcc777bdf2994ba0d8284912f9dd37d7e1b5b6cb378059927d6
BLAKE2b-256 checksum
How to use checksums
d14d86455f75beadf5203bbdb15395bc4767f177bf736eacf9194456a39e2942
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

Release files / bailey_bridge-0.1.0-py3-none-any.whl

Download URL bailey_bridge-0.1.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d553bd90a1e559ac9e56b680e7eb9985eeec084bd62052c78346baee77708955
BLAKE2b-256 checksum
How to use checksums
9a63a72025ab4dad4a009d8fe93f23cc052a7e4d42e73d9ec762810895310450
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

Security for bailey-bridge 0.1.0

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 bailey_bridge-0.1.0.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 Jul 8, 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.

Release history Release notifications | RSS feed

This release

0.1.0 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