Skip to content
@osapi-io

osapi

A CRUD API for managing Linux systems.

osapi-io

Typed, repeatable operations for Linux hosts.

documentation release ghcr.io go linux license

The controller puts each job on a queue. It does not call the host.

What this is

OSAPI makes a Linux host operate like an appliance. One binary and one configuration file give you a REST API, a CLI, a Go SDK and an embedded dashboard. They manage a fleet of hosts, not only one host. They control these parts of each host:

  • hostname, DNS, disk, memory and load
  • packages, services, users, sysctl and cron
  • certificates, containers, files and command execution
CLI / SDK / UI  ->  Controller (REST API)  ->  NATS JetStream  ->  Agents

The controller never changes the operating system. It writes a job and waits. An agent on the managed host receives the job. Then a provider on that host does the work. Delivery is at-least-once, so each provider must be safe to run two times. The remainder of the design follows from this constraint.

A job can go to:

  • one host, by its name
  • all hosts in the fleet, as a broadcast
  • any one free agent, for load balance
  • the hosts that have a given label

Repositories

Project Release Stars Description
osapi release stars The controller, the agent, the CLI, the SDK and the embedded dashboard
osapi-orchestrator release stars Runs multi-step operations across OSAPI-managed hosts
gohai release stars Collects system facts, like Chef Ohai
nats-client release stars Connects to NATS and JetStream
nats-server release stars Runs a NATS server inside a Go process
osapi-justfiles release stars The just recipes that every repository here imports
specs release stars The design docs, written before the code
osapi-lab release stars Tart VMs on a Mac that run an osapi branch across real distributions

Start with osapi. Each other repository is a library that osapi imports, or a tool that reads osapi.

How we do the work

Design comes first. A change starts as a page in specs. Then we build the change. Then we correct the page where the build showed that the design was wrong. It is one page in all three steps. We do not convert it from one form into another. Thus the design and the documentation always agree.

Try it

# run the controller, the agent and NATS together
osapi start

# ask one host its hostname
osapi client node hostname --target web-01

# ask every host for its users
osapi client node user list --target _all

# open the dashboard
open http://localhost:8080

Documentation | API reference | Contributing | Security | Code of conduct | AI policy

Popular repositories Loading

  1. osapi osapi Public

    Typed, repeatable operations for Linux hosts. Give your agent a fleet, not a shell.

    Go 3 1

  2. gohai gohai Public

    A Go-based system fact collector inspired by Chef Ohai.

    Go 1

  3. nats-server nats-server Public

    A Go package for running an embedded NATS server.

    Go

  4. nats-client nats-client Public

    A Go package for connecting to and interacting with a NATS server.

    Go

  5. osapi-justfiles osapi-justfiles Public

    Shared justfiles for osapi-io projects.

    Just

  6. osapi-orchestrator osapi-orchestrator Public

    A Go package for orchestrating operations across OSAPI-managed hosts.

    Go

Repositories

Showing 9 of 9 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…