bex-cli

bex-cli is a skill for Claude Code, Codex from bex-co/bex. It costs 118 tokens per session (1,360 once invoked), scanned B, original, Apache-2.0.

A command-line tool for managing applications, databases, deployments, logs, and remote shells on the bex cloud platform. It also supports PostgreSQL queries, Blueprint checks, and scripted use in CI/CD, which means automated build and release pipelines.

In plain words
What is it for?
Deploy services, wait for releases, inspect logs, connect to services over SSH, query a bex PostgreSQL database, validate a render.yaml file, and automate these steps in CI/CD.
Why use it?
It puts common deployment and service operations in the terminal instead of requiring dashboard work. Non-interactive commands and API-key authentication also let automated jobs run these tasks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is sudo BEX_INSTALL_DIR=/usr/local/bin sh /tmp/install-bex-cli.sh.

Good fit Deploy services, wait for releases, inspect logs, connect to services over SSH, query a bex PostgreSQL database, validate a render.yaml file, and automate these steps in CI/CD.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/bex-co/bex
agentmods
npx agentmods add skills/bex-co/bex/bex-cli

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bex-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/bex-co/bex/bex-cli/github.svg)](https://agentmods.dev/skills/bex-co/bex/bex-cli)
Your own site
<a href="https://agentmods.dev/skills/bex-co/bex/bex-cli"><img src="https://agentmods.dev/badge/skills/bex-co/bex/bex-cli/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bex-cli

Your own site · 80×15
<a href="https://agentmods.dev/skills/bex-co/bex/bex-cli"><img src="https://agentmods.dev/badge/skills/bex-co/bex/bex-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,360 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00118 $0.01360
Opus 5.5 $0.00047 $0.00544
Sonnet 5.5 $0.00024 $0.00272
Haiku 4.5 $0.00012 $0.00136

Measured yesterday against content hash 19d727d68be6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

bex-cli scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo BEX_INSTALL_DIR=/usr/local/bin sh /tmp/install-bex-cli.sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl --fail-with-body --silent --show-error --location \
lego/cli/internal/skills/pack/skills/bex-cli/SKILL.md · 132 lines

How it starts

The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.

bex CLI

The bex CLI manages services, databases, and deployments from the terminal. Supports interactive use, non-interactive scripting, and CI/CD automation.

Before installing, authenticating, selecting a workspace, or running commands, read references/bex-access.md for the current access and command-discovery workflow.

When to Use

  • Deploying a service from the terminal or CI/CD
  • Tailing logs in real time
  • Opening psql to a bex Postgres database
  • SSHing into a running service or launching an ephemeral shell
  • Validating a render.yaml Blueprint
  • Scripting bex operations in CI/CD pipelines
  • Installing agent skills for AI coding tools

Command Reference

Use the installed CLI help or generated command reference as directed by references/bex-access.md for the exact command surface and flags. The patterns below cover common operational workflows.

Deploy patterns

# Deploy and wait for completion (exits non-zero on failure)
bex deploys create srv-xxx --wait --confirm -o json

# Deploy a specific commit
bex deploys create srv-xxx --commit abc123 --wait --confirm

# Deploy a specific Docker image
bex deploys create srv-xxx --image ghcr.io/org/app:v1.2.3 --wait --confirm

Database queries

# Single query, JSON output
bex psql db-xxx -c "SELECT NOW();" -o json

# CSV output via psql passthrough
bex psql db-xxx -c "SELECT id, email FROM users;" -o text -- --csv

CI/CD Example (GitHub Actions)

name: Deploy to bex
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Install bex CLI
        run: |
          curl --fail-with-body --silent --show-error --location \
            https://raw.githubusercontent.com/bex-co/bex/main/scripts/install-bex.sh \
            --output /tmp/install-bex-cli.sh
          sudo BEX_INSTALL_DIR=/usr/local/bin sh /tmp/install-bex-cli.sh
          bex --version
      - name: Deploy
        env:
          BEX_KEY_ID: ${{ secrets.BEX_KEY_ID }}
          BEX_KEY_SECRET: ${{ secrets.BEX_KEY_SECRET }}
        run: |
          export BEX_ACCESS_TOKEN="$(curl -fsS -X POST https://oauth.bex.co/oauth2/token \
            -d "grant_type=client_credentials&client_id=$BEX_KEY_ID&client_secret=$BEX_KEY_SECRET" | jq -r .access_token)"
          bex deploys create ${{ secrets.BEX_SERVICE_ID }} --wait --confirm -o json

Read the full file on GitHub · 132 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 132 lines · 118 tokens per session scan B 19d727d68be6

Subscribe to this mod's changes

bex-cli is a skill published in the GitHub repository bex-co/bex (577 stars, last pushed today), licensed Apache-2.0. It adds 118 tokens to every session and 1,360 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-29.

Related

Other skills, from other repositories