Skip to main content

Ocura OSS

Ocura OSS creates integrity-checked, branchable records of local command executions. Project-local state stores command arguments, outcomes, timing, output logs, declared parameters, and branch lineage.

Ocura OSS packages an adapted early Ocura research concept as a small local command-line tool. Current Ocura engine development is separate from this package.

Workflow

run -> evidence -> chokepoint -> branch -> rerun -> compare

While a command runs, its output streams to your terminal and is recorded under .ocura-oss/logs/. If you press Ctrl+C, the attempt is recorded with outcome interrupted; a second Ctrl+C exits immediately and may leave that attempt unrecorded.

Terms

  • Den: the local container for state.
  • Pathway: one lineage of declared work and evidence.
  • Atom: one recorded execution and its output logs.
  • Chokepoint: a terminal record that can start a metadata branch.

Requirements and install

Ocura OSS requires Python 3.11 or later and uses only the standard library at runtime. Install it from PyPI with python -m pip install ocura-oss.

Quick start

ocura-oss demo --root ./ocura-oss-demo

The demo creates a new directory, runs a baseline command, creates a chokepoint, branches with a reason and parameter override, reruns on the child pathway, verifies all records and referenced logs, and prints a comparison. It returns exit code 2 if the destination already exists; the directory is kept for inspection either way.

Python API

The provisional Python API supports the same workflow and provides typed access to records and verification reports.

import sys

from ocura_oss import initialize, run, verify

initial = initialize("experiment", name="example")
execution = run([sys.executable, "script.py"], root=initial.root)
assert verify(initial.root).ok

Reference documentation is published at ocuna-ai.com/docs. Use the CLI reference for commands and exit semantics and the Python API reference for functions, parameters, return types, records, and exceptions. Names listed in ocura_oss.__all__ form the documented surface during the 0.x series; other names are implementation details.

Direct use

ocura-oss init --name example
ocura-oss run -- python -c "print('baseline')"
ocura-oss verify
ocura-oss chokepoints
ocura-oss branch --from <chokepoint-id> --reason "batch 2" --param batch=2
ocura-oss run --pathway <child-pathway-id> -- python -c "print('batch 2')"
ocura-oss compare --from <chokepoint-id>

Everything after -- becomes the executed command; put run's own options before it. run --quiet -- COMMAND... retains command output in logs without streaming it to the terminal. branch accepts --root PATH; without it, branch uses the current directory. Add --json to pathways, chokepoints, branch, compare, verify, or demo for JSON output. Each subcommand's --help lists its flags and exit semantics. branch and compare return exit code 2 if required records or logs fail verification.

Example text comparison:

comparison: ready
source chokepoint: chokepoint-<id>
source pathway: pathway-<id>
source run: passed 0.031000s
child pathway: pathway-<id2>
  reason: batch 2
  parameters: added batch=2
  source run: passed 0.031000s
  child run: passed 0.047000s
  run parameters: changed batch (1 -> 4)

Local state

Records and logs live under .ocura-oss/: den.json, pathways/<pathway-id>.json, atoms/<atom-id>.json, chokepoints/<chokepoint-id>.json, and logs/<atom-id>.stdout.log / .stderr.log.

Each record is a JSON envelope with schema_version, kind, payload, and a SHA-256 checksum over the canonical payload. Atom payloads contain the outcome, timing, return code, declared parameters, command arguments, log paths, byte counts, and log checksums. Command arguments, declared parameters, branch reasons, and command output are stored locally. Keep secrets out of these fields. Checksums provide local change detection without authentication or authorship claims.

One mutating CLI process per state root is supported at a time. Delete .ocura-oss/ to discard all state.

Boundaries

Commands run directly on your machine with shell=False and inherit the invoking process's environment. Ocura OSS does not sandbox commands, restrict network access, or isolate child processes. Use it only for trusted, same-owner local workloads. Branches contain lineage metadata; they do not copy or rewind a process, workspace, memory image, checkpoint, artifact, or external system. Legacy .ocura/ records are unsupported.

Status

Ocura OSS is research software. The 0.x series does not include a production support commitment, and the interface and record format may change before 1.0. The source code and tests are licensed under the Mozilla Public License 2.0.

Contributing

Bug reports and focused pull requests are welcome. Read the contributor guide for setup, checks, and project scope. Please follow the security policy when reporting a security issue.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocura_oss-0.2.1.tar.gz (52.3 kB view details)

Uploaded Source

Built Distribution

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

ocura_oss-0.2.1-py3-none-any.whl (33.8 kB view details)

Uploaded Python 3

File details

Details for the file ocura_oss-0.2.1.tar.gz.

File metadata

  • Download URL: ocura_oss-0.2.1.tar.gz
  • Upload date:
  • Size: 52.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.6

File hashes

Hashes for ocura_oss-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7b0d2d863fe1fe6a3f1b562518c48ce6d02233398dd0d5c0d2c9fb18a4fb3612
MD5 43802771deec1d25d6d3bfd8272668b0
BLAKE2b-256 2c5fb20ca9913fbb7b16c6b7dc535964e5881b62e216dbadf2307a8349fd902d

See more details on using hashes here.

File details

Details for the file ocura_oss-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: ocura_oss-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 33.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.6

File hashes

Hashes for ocura_oss-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 364f322dc821a7eec734c75d6ffe8fbfae9deb2393f0ba456e5ba59e9d2f10c0
MD5 f0a6d405606db4c36ba9f48552eb44e8
BLAKE2b-256 5f67b49103651b2dc7152afa9e15bf5fe48881f057516d3eb817cc1c1995b2c6

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.2

2 files

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page