Skip to content

Latest commit

History

1,068 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

codefly.ai core

workflowGo Report CardGo ReferencecoverageLicense: MIT

Fundamentals for the codefly.ai ecosystem.

dragonfly

What this is

core is the shared library that every codefly agent, the CLI, and user services depend on. It defines:

  • Resource modelWorkspace, Module, Service, Endpoint, Agent, Environment (resources/)
  • Architecture — DAG-based dependency resolution (architecture/, graph/)
  • Network model — port allocation, DNS, native/container/public access modes (network/)
  • Configuration flow — typed configs passed between services as env vars (configurations/)
  • Agent system — gRPC-based agent lifecycle: Builder, Runtime, Code (agents/)
  • Runners — Native, Docker, and Nix execution environments with consistent process supervision (runners/)
  • Companions — sidecar containers for proto, Go, Python, Node tooling (companions/)
  • Telemetry — structured logging via wool (wool/)

Install

go get github.com/codefly-dev/core

core is self-contained — no replace directives, no internal codefly imports beyond its own module.

Quick example

import (
"context""github.com/codefly-dev/core/resources""github.com/codefly-dev/core/wool"
)
ctx:=context.Background()
w:=wool.Get(ctx).In("Example")
ws, err:=resources.LoadWorkspaceFromDir(ctx, "/path/to/workspace")
iferr!=nil {
returnw.Wrapf(err, "load workspace")
}
w.Info("loaded", wool.Field("modules", len(ws.Modules)))

Develop

# All tests
go test ./...
# Single package
go test ./resources/ -v
# With race detector
go test -race ./...

Tests gracefully skip when external prerequisites (Docker, Nix flakes ≥ 2.18) are unavailable.

License

MIT — see LICENSE.

About

Shared components library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages