# taviso/ctypes.sh

A foreign function interface for bash.

Repository: https://github.com/taviso/ctypes.sh
Canonical: https://ross.abutalabs.com/products/ctypessh
Language: C
License: MIT
License Family: permissive
Last push: 2026-07-21T02:57:44+00:00

## Health v2 (maintenance only)
Score: 84/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 93, release rhythm 62, longevity 100
- inputs: {"age_days": 4055, "days_push": 43, "days_rel": 43, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2177, forks 95 (observed 2026-08-28T04:06:22.892106+00:00)

## What it is
ctypes.sh is a bash plugin providing a foreign function interface that lets shell scripts call routines in shared C libraries directly. It uses libffi to expose functions like dlopen and dlcall from within bash.

## Use cases
- call C library functions from bash scripts
- use libm math functions in a shell script
- build GTK applications in bash
- write an http daemon in bash
- avoid writing external C helper programs for shell tasks

## When to avoid
- you need portable or maintainable production shell scripts
- performance and safety matter more than convenience
- you are not on Linux with bash and libffi available

## Facets
- artifact type: plugin
- maturity: maintenance
- function: developer-tools, cli
- domain: developer-tools
- platform: cli
- tags: bash-plugin, foreign-function-interface, libffi, shared-libraries, shell-scripting, ffi, command-line, automation, linux, bash

## Member repositories
- taviso/ctypes.sh (main) score 84

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:22.892106+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:48:51.134209+00:00, confidence not recorded.
  - readme: https://github.com/taviso/ctypes.sh (fetched 2026-08-28T04:06:22.892106+00:00, sha 0732f1358628)
- Data as of 2026-08-30T08:39:29.467469+00:00.
