Skip to main content

CLI tool for publishing tools and UI modules to the BrowsEZ platform

Project description

BrowsEZ CLI

A command-line tool for publishing tools and UI modules to the BrowsEZ platform.

Installation

From PyPI

pip install browsez-cli

From Source (GitHub)

# Clone and install in editable mode
cd BrowsEZ-CLI
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e ".[dev]"

Quick Start

# Login to the platform. Local workspaces use password login; Microsoft Entra
# workspaces open the browser and return a saved Platform session to the CLI.
browsez login

# Validate a tool before publishing
browsez validate path/to/tool_directory

# Publish a tool
browsez publish path/to/tool_directory

For Phase 1 AgentCore flows, the expected publish lifecycle is:

  1. Create a credential binding in the BrowsEZ Platform Settings UI.
  2. Reference that binding from tool.yaml via credential_binding: <binding_slug>.
  3. Run browsez publish ....
  4. The Platform stores the artifact, creates or updates the Lambda package, and later syncs it to an AgentCore Gateway target when the tool is assigned to an instance.

Commands

Command Description
browsez login Login to the BrowsEZ platform; uses password login for local workspaces and browser SSO for Microsoft Entra workspaces
browsez logout Clear the current session
browsez validate <dir> Validate a tool without uploading
browsez publish <dir> Publish a tool to the backend
browsez publish-ui <dir> Publish a UI module (coming soon)
browsez config show Show current configuration
browsez config set <key> <value> Set a config value

Configuration

The CLI uses a .toolrc.json file for configuration. It is auto-created on first run:

{
  "api_base_url": "https://browsez-platform-backend-production.up.railway.app",
  "tenant_id": "sample-tenant-123",
  "default_risk_level": "MEDIUM",
  "upload_timeout": 300,
  "retry_attempts": 3
}

tenant_id is now a legacy compatibility field. Current publish requests are scoped from the authenticated platform session instead of sending an explicit tenant identifier.

Login Behavior

browsez login first asks for the workspace slug and checks that workspace's login mode:

  • Local workspaces keep the existing username/password prompt.
  • Microsoft Entra workspaces ask for confirmation, open the browser for Microsoft sign-in, listen on a localhost callback, and exchange a one-time code for a normal BrowsEZ session_id.
  • The saved .toolrc.json session format is unchanged. browsez publish continues to authenticate with the stored Platform session.
  • If the workspace setup is incomplete or Entra OIDC is not configured, the CLI fails before opening the browser.

Override settings via CLI:

browsez config set api-url https://api.example.com
browsez config set risk-level HIGH

Tool Directory Structure

A valid tool directory must have:

tool_name/
├── tool.yaml           # Metadata (name, inputs, outputs)
├── requirements.txt    # Python dependencies
└── src/
    ├── __init__.py
    └── main.py         # Entry point (run function, Input/Output classes)

Example tool.yaml with a credential binding:

name: order_lookup
description: |
  Look up customer orders and return the authoritative order status, line items,
  and fulfillment details from the source system.
inputs:
  type: object
  properties:
    order_id:
      type: string
outputs:
  type: object
  properties:
    result:
      type: object
credential_binding: billing_api

If credential_binding is set, the Platform will resolve that binding and inject the resulting credential environment into the Lambda package used by AgentCore. The Platform preserves the full description for the model-facing tool definition and derives any shorter AgentCore Gateway metadata automatically during assignment.

Development

# Install with dev dependencies
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e ".[dev]"

# Build the package
python -m build

# Upload to PyPI (requires twine and credentials)
twine upload dist/*

Features

  • Strict Schema Validation: Ensures tools meet all requirements before packaging
  • Deterministic Packaging: Creates consistent zip files with content-based hashing (SHA-256)
  • Secure Uploads: Uses pre-signed S3 URLs for artifacts
  • Credential Binding Aware: Carries credential_binding from tool.yaml through tool registration
  • Lambda-backed Custom Tools: Published custom tools are packaged for BrowsEZ-managed Lambda execution in the AgentCore flow
  • Configurable: Supports configuration via file, CLI arguments, and defaults
  • Resilient: Implements retry logic and exponential backoff for network operations

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

browsez_cli-0.1.3.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

browsez_cli-0.1.3-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file browsez_cli-0.1.3.tar.gz.

File metadata

  • Download URL: browsez_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for browsez_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 abf28a6b93515db8d62990ef64894d82f92ea1d4129bcaea82b5a29ac0c6484a
MD5 4a998bd6164668d69d8526c3d30d53a4
BLAKE2b-256 9d8ff3de8964c46e848f5ef154202d8e1373c4e214fa8613004b42a8a3f30e2c

See more details on using hashes here.

File details

Details for the file browsez_cli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: browsez_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for browsez_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1a32fa2ab033e6caa239c19c7f55425839b1fa9cd97345e09b4e13ac311e39e4
MD5 b3edf2220ad61926078982b45187b439
BLAKE2b-256 07726a394a43734a9b6dc95da11acc66b89fb6d37d2df4dee9a9fa6119f1986d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page