Skip to main content

Portable bin-directory anchor for shell scripts — use sibling tools from anywhere

Project description

binabra

Proprietary — Copyright © 2026 Everplay-Tech LLC. See LICENSE.

Portable bin directory anchor for shell scripts. Install once, reuse the same header anywhere.

  • PyPI: binabra
  • CLI: abra (short invocation)
  • Tier: Noldorian (pip operator tool — not an snx spell). See ~/spells/NOLDORIAN.md

Install

pip install binabra

Ensure pip's script dir is on PATH (macOS example):

export PATH="$HOME/Library/Python/3.9/bin:$PATH"

Use anywhere

At the top of any shell script:

source "$(abra sh)"
exec "$BIN/my-sibling-tool" "$@"

BIN becomes the directory containing your script.

Bootstrap a project

abra init          # creates ./bin/abra
abra colocate bin  # copy abra into existing bin/

Co-located scripts:

source "$(dirname "${BASH_SOURCE[0]}")/abra"
exec "$BIN/other-script" "$@"

CLI

Command Purpose
abra sh Path to anchor.sh for sourcing
abra embed Print source "$(abra sh)"
abra dir Discover bin (ABRA_BIN, project bin/, ~/.local/bin)
abra exec tool args Run sibling from discovered bin
abra init [dir] Create bin/abra in a project
abra colocate [dest] Copy abra into a bin folder

Publish to PyPI

1. Create an API token

https://pypi.org/manage/account/token/

  • Scope: Entire account (first time) or Project: binabra (after first upload)
  • Copy the token (pypi-...)

2. Build

cd ~/Projects/binabra
python3 -m pip install --user build twine
python3 -m build

3. Upload

export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-YOUR-TOKEN-HERE
twine upload dist/*

Or enter credentials when prompted:

twine upload dist/*
# username: __token__
# password: pypi-...

4. Verify

pip install binabra
abra --version
abra embed

PyPI project page: https://pypi.org/project/binabra/

Python API

from binabra import anchor_dir, sibling, discover_bin

anchor_dir(__file__)
sibling("run.sh", __file__)
discover_bin()

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

binabra-0.1.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

binabra-0.1.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file binabra-0.1.1.tar.gz.

File metadata

  • Download URL: binabra-0.1.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for binabra-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6f0e7ace0a971d4f4ae3875415f0a30ca2457380a3b513cbfb5140a5c9b5d860
MD5 aa0fc9e1ccb0724bc7c68f6a5545f34f
BLAKE2b-256 5fc09fb9c33603adf20dca47e2ed5230f448b89a7b4552eed55d838212f3d834

See more details on using hashes here.

File details

Details for the file binabra-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: binabra-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for binabra-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 822a27831dd322c16a1165e25ca7d38f6675bff747a23ade138d901267a5742a
MD5 7c5be61585a506ced69af4575e17253f
BLAKE2b-256 bb2c8af2de54042c18cbd8bb9dfdabfc83afb8499eee95dbe8f2f1a9d7388a39

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