boci is a drop-in replacement for Oracle's oci CLI, built
on Bun. Same commands, same flags, same output, with a start-up
measured 10× faster. Swap oci for
boci and your scripts keep working.
$ alias oci=boci # that's the whole migration $ oci os ns get
$ mise use -g github:neves/boci # binary release $ mise use -g npm:boci-cli # or via npm
$ brew install neves/tap/boci
$ scoop bucket add neves https://github.com/neves/scoop-bucket $ scoop install boci
$ curl -fsSL https://raw.githubusercontent.com/neves/boci/main/site/install.sh | sh
$ git clone https://github.com/neves/boci && cd boci $ bun install && bun run build # → dist/boci
Benchmarks
Before oci sends a single request, Python has to start
and import the whole CLI package. That costs over 400 ms on every
call, and it adds up in scripts. Watch the same start-up step, at real
speed:
--version, from launch to output| Command | oci | of which start-up | boci |
|---|
Measured on an Intel Core i3-7100 (4 threads), Linux, oci-cli 3.96.3
on Python 3.12, Bun 1.4.5. Peak memory is taken through a tiny C
launcher so the parent process doesn't inflate it. Reproduce with
bun run bench (add bench:live for real API
calls).
Drop-in
boci aims for 1:1 parity with the oci CLI: every
service, command and flag, the same JSON on stdout, the same error
shape on stderr, the same exit codes, and the same
~/.oci/config, oci_cli_rc and
OCI_CLI_* behaviour. Anything that can't match yet is
listed as a known divergence instead of failing silently.
$ time oci os ns get { "data": "axaxnpcrorw5" } oci 0.49s $ time boci os ns get { "data": "axaxnpcrorw5" } boci 0.05s
How it works
Most of the oci CLI is generated from the OCI SDK. boci doesn't rewrite 9,000 commands by hand. It reads them out of the real CLI and runs them all with one small engine.
An extractor loads the pinned oci CLI and records every service, command, flag, default and HTTP operation as data.
One generic engine handles config, request signing, pagination,
--query and output for every generated command.
Hand-written code covers the rest, like multipart uploads.
Parity tests compare boci with the real oci: the request it sends, stdout, stderr and exit code. Responses are recorded once, so the suite runs offline in seconds.
Progress
The work follows a ladder: tooling first, then offline behaviour, the
first signed request, reads, lists, writes, waiters, other auth
methods, and finally the hand-written commands.
bun run status prints the live numbers.
bun run status for live numbers
--query, tables
--wait-for-state)
Install
boci ships as a single static binary for Linux, macOS, and Windows (x64 and arm64) via mise, Homebrew, Scoop, Nix, or install scripts — or build from source with Bun 1.4.5 or newer.
$ git clone https://github.com/neves/boci $ cd boci && bun install $ bun run build # → dist/boci $ bun run status # parity progress $ bun test # offline parity suite
# boci reads your existing ~/.oci/config $ boci os ns get --profile my-profile # or make it the default, scripts unchanged $ alias oci=boci # optional: fall back to the real oci $ export BOCI_FALLBACK=oci
FAQ
No. boci is an independent open-source project and isn't affiliated with or endorsed by Oracle. It talks to the same public OCI APIs the official CLI uses.
That's the point of the parity tests: all 9,372 commands are
verified against the reference CLI for stdout, stderr error shape,
requests, and exit codes. The 17 known accepted divergences are
documented in DIVERGENCES.md. With
BOCI_FALLBACK=oci, any unsupported edge case is handed
to the real oci.
Bun compiles TypeScript into one self-contained executable that starts in milliseconds, with fast built-in crypto, HTTP and JSON. boci also skips the OCI SDK and signs requests itself, so there's very little to load.
Most of it is the Bun runtime embedded in every compiled Bun app. The command data for all 9,372 commands adds only 2.3 MB compressed. It's still one file, under a fifth of the size of the Python install, with nothing else to set up.
oci-cli 3.96.3. Moving to a newer oci release regenerates the command data and shows exactly what changed.
Drop it into your shell and leave the 400 ms Python start-up behind.