A git repository using Ocuroot will contain a repository configuration file (repo.ocu.star), one or more package configuration files (package.ocu.star), and a local state directory (.ocuroot).

Basic Structure

my-repository/
├── .gitignore           # Should include .ocuroot/
├── .ocuroot/           # Local state (must not be committed)
├── repo.ocu.star       # Repository configuration
└── package.ocu.star    # Package configuration (single-package repos)

Single Package Repository

For repositories containing a single package, you can place the package.ocu.star file at the root:

my-service/
├── .ocuroot/
├── repo.ocu.star
├── package.ocu.star    # Defines a single package for the entire repository
├── src/
│   └── main.go
└── tests/
    └── main_test.go

Multi-Package Repository (Monorepo)

For monorepos, each package has its own package.ocu.star file in its directory:

monorepo/
├── .ocuroot/
├── repo.ocu.star
├── service-a/
│   ├── package.ocu.star
│   └── src/
│       └── main.go
├── service-b/
│   ├── package.ocu.star
│   └── src/
│       └── app.py

Configuration Files

repo.ocu.star

The repository configuration file defines repository-wide settings and is always located at the root of the repository.

See The Repo File for more information.

package.ocu.star

Package configuration files define individual packages and define the rules to build and deploy them.

See The Package File for more information.

.ocuroot Directory

The .ocuroot directory stores local state and should never be committed to version control. Add this to your .gitignore:

# .gitignore
.ocuroot/

This directory contains:

  • Authentication tokens (when using repository-specific auth)
  • Build cache
  • Local configuration