# Install cpi with Homebrew, MacPorts

Tiny c++ interpreter. Version 2.2.4 via Homebrew; verified 2026-06-21.

## Install

```sh
sudo av install brew:cpi
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cpi
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cpi
```

  Evidence: MacPorts ports tree: lang/cpi/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:cpi
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cpi>
- **Version:** 2.2.4
- **Source summary:** Tiny c++ interpreter
- **Homepage:** <https://treefrogframework.github.io/cpi/>
- **Repository:** <https://github.com/treefrogframework/cpi>
- **Upstream docs:** <https://github.com/treefrogframework/cpi#readme>
- **License:** MIT
- **Source archive:** <https://github.com/treefrogframework/cpi/archive/refs/tags/v2.2.4.tar.gz>
- **Last updated:** 2026-06-21T15:37:37Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cpi (cli)
- cpi (alias)

## Dependencies

- qtbase

## Uses from macOS

- llvm

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.2.4
- Package-manager updated: 2026-06-21
- Local data: ok
- Upstream repository: https://github.com/treefrogframework/cpi
- Upstream latest detected: v2.2.4 (current)
## Project history and usage

cpi is a small C++ interpreter-style command-line tool from the TreeFrog Framework organization. Its upstream description and README present it as a tiny interpreter for C++20 or C++23 rather than as a separate language implementation.

### Project history

The public GitHub repository was created in December 2012. The README documents a design that uses an installed C++ compiler internally, with Qt 6 and a C++ compiler as build/runtime requirements, so the package sits between a REPL, a script runner, and a thin compile-and-run wrapper.

### Adoption history

Package-manager adoption appears niche: the supplied package facts list Homebrew and MacPorts. That is consistent with cpi's role as a developer convenience tool rather than a core language runtime.

### How it is used

The README shows interactive mode, execution of saved C++ source files, per-file compile options, pkg-config integration, and Qt examples. For package users, the important behavior is that cpi depends on the host compiler toolchain rather than shipping an independent C++ execution engine.

### Why package nerds care

cpi is interesting to packagers because it exposes C++ as something close to a scripting workflow while still needing normal C++ and Qt build dependencies. Its documented per-user INI file also means an otherwise small CLI has a real configuration surface.

### Timeline

- 2012: Public GitHub repository created.
- 2025: README examples document cpi 2.2.0 and C++20/C++23 usage.
- 2026: Upstream tags include 2.2.x releases and test-release tags.

### Related projects

- TreeFrog Framework is the upstream GitHub organization for cpi.
- Qt and GCC, LLVM, or MSVC are documented build/runtime requirements.

### Sources

- <https://api.github.com/repos/treefrogframework/cpi>
- <https://github.com/treefrogframework/cpi#readme>
- <https://raw.githubusercontent.com/treefrogframework/cpi/master/README.md>


## Security Notes

generalized runtime or code generation signal.

- **Geiger risk:** yellow / medium
- generalized runtime or code generation signal

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cpi
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- MacPorts - cpi: normalized package name match | MacPorts ports tree: lang/cpi/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [qtbase](https://www.automicvault.com/pkg/brew/qtbase/) - Runtime dependency declared by Homebrew.
- [cling](https://www.automicvault.com/pkg/brew/cling/) - Shares av.db curated category or tags: cli, cpp, interpreter, language-runtime, repl.
- [regina-rexx](https://www.automicvault.com/pkg/brew/regina-rexx/) - Shares av.db curated category or tags: cli, interpreter, interpreters, language-runtime, scripting.
- [yaegi](https://www.automicvault.com/pkg/brew/yaegi/) - Shares av.db curated category or tags: cli, interpreter, language-runtime, repl, scripting.
- [ammonite-repl](https://www.automicvault.com/pkg/brew/ammonite-repl/) - Shares av.db curated category or tags: cli, language-runtime, repl, scripting.
- [gauche](https://www.automicvault.com/pkg/brew/gauche/) - Shares av.db curated category or tags: cli, interpreter, language-runtime, scripting.
- [gnu-apl](https://www.automicvault.com/pkg/brew/gnu-apl/) - Shares av.db curated category or tags: cli, interpreter, language-runtime, scripting.
- [gnu-smalltalk](https://www.automicvault.com/pkg/brew/gnu-smalltalk/) - Shares av.db curated category or tags: cli, interpreter, language-runtime, scripting.
- [lua](https://www.automicvault.com/pkg/brew/lua/) - Shares av.db curated category or tags: cli, interpreter, language-runtime, scripting.

## Combined YAML source

View the package source record on GitHub. [combined/cpi.yml](https://github.com/automic-vault/db/blob/main/combined/cpi.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
