Skip to content
LartweibPublic

About

Cross-harness configuration engine for AI coding agents

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

dotai

CI License: MIT Go Reference Go version Release

One pack of agent configuration, rendered into Claude Code, Antigravity CLI and OpenCode, with every write planned, backed up and reversible.

Each AI coding harness keeps its rules, agents, skills, hooks, MCP servers and settings in its own files and formats, so a setup you care about drifts apart across tools and machines, and trying a new one means hand-editing configuration you cannot easily undo. dotai keeps that setup in one place, a pack, and renders it into Claude Code, Google Antigravity CLI (agy) and OpenCode, with profiles per project type and variants per environment. Every write is planned first, shown before it happens, backed up, and undone with dotai restore: an install can run isolated from your own configuration, and a project's files stay out of git.

A pack is a dotai.yaml manifest and layers in the rulesync layout: a base, variants per environment and profiles per project type. Trimmed from examples/minimal-pack:

schema: dotai.pack/v1
name: minimal-pack
version: 0.1.0
rulesync: 43.12.0
harnesses: [claudecode, antigravity-cli, opencode]

profiles:
  web:
    path: profiles/web
    description: Web projects with a JavaScript toolchain.
    hints: [package.json]

variants:
  standalone:
    path: variants/standalone
    default: true

Every layer has the same shape. The base always applies, one variant is chosen per machine, and profiles are combined per project:

flowchart LR
  M(["<b>dotai.yaml</b><br/>name · version · rulesync<br/>harnesses · profiles · variants"])

  M --> B["<b>base/</b><br/><i>always applied</i>"]
  M --> V["<b>variants/&lt;name&gt;/</b><br/><i>one per machine, such as standalone</i>"]
  M --> P["<b>profiles/&lt;name&gt;/</b><br/><i>per project type, combinable</i>"]
  M -.-> MO["<b>mods/&lt;name&gt;/</b><br/><i>Claude Code plugins, named by profiles</i>"]

  B --> L
  V --> L
  P --> L

  L["<b>Every layer</b><br/><b>.rulesync/</b> rules · commands · subagents · skills<br/>MCP servers · hooks · permissions<br/><b>dotai/settings.yaml</b> statusLine · env · models<br/><b>dotai/tools/</b> scripts and binaries"]

  classDef manifest fill:#334155,stroke:#0f172a,color:#ffffff
  classDef base fill:#1d4ed8,stroke:#1e3a8a,color:#ffffff
  classDef variant fill:#b45309,stroke:#78350f,color:#ffffff
  classDef profile fill:#15803d,stroke:#14532d,color:#ffffff
  classDef mod fill:#f1f5f9,stroke:#475569,color:#0f172a
  classDef layer fill:#f8fafc,stroke:#334155,color:#0f172a
  class M manifest
  class B base
  class V variant
  class P profile
  class MO mod
  class L layer
Loading

dotai install puts the base and a variant into each harness's user configuration; dotai apply puts profiles into one project, in local files git does not track. Both go through the same steps:

flowchart LR
  subgraph PK["Pack"]
    direction TB
    U["<b>base + variant</b>"]
    PR["<b>profiles</b>"]
  end

  U -->|"dotai install"| R
  PR -->|"dotai apply"| R

  subgraph E["dotai"]
    direction TB
    R["<b>render</b><br/>pinned rulesync<br/>+ settings and tools"] --> PL["<b>plan</b><br/>every file and key<br/>--dry-run stops here"]
    PL --> BK["<b>backup and journal</b><br/>rollback on failure<br/>dotai restore to undo"]
  end

  BK --> US
  BK --> PJ

  subgraph US["User scope"]
    direction TB
    CC["Claude Code"]
    AG["Antigravity CLI"]
    OC["OpenCode"]
  end

  PJ["<b>Project scope</b><br/>.claude/ · .agents/ · .opencode/<br/>listed in .git/info/exclude"]

  classDef base fill:#1d4ed8,stroke:#1e3a8a,color:#ffffff
  classDef profile fill:#15803d,stroke:#14532d,color:#ffffff
  classDef engine fill:#475569,stroke:#1e293b,color:#ffffff
  classDef target fill:#f8fafc,stroke:#334155,color:#0f172a
  class U base
  class PR profile
  class R,PL,BK engine
  class CC,AG,OC,PJ target
Loading

A first install is isolated under ~/.dotai/isolated/ unless it is given --mode replace, which resets each harness and writes into its own configuration; later installs keep the recorded mode. A later replace install only updates the pack and wipes nothing, so what you added since stays; --reset, or your answer on a terminal, resets again.

The base layer holds the shared rules, skills and subagents, such as base/.rulesync/rules/overview.md and base/.rulesync/skills/commit-message/SKILL.md. A dry run shows every file and key an install would write, and writes nothing but the rulesync cache (trimmed):

$ dotai install examples/minimal-pack --mode isolated --dry-run
Install plan · minimal-pack 0.1.0 · variant standalone · mode isolated
root: ~/.dotai/isolated

claudecode · partial isolation · may need a new login
  CLAUDE_CONFIG_DIR=~/.dotai/isolated/claude

claudecode
  create     ~/.dotai/isolated/claude/CLAUDE.md
  create     ~/.dotai/isolated/claude/agents/reviewer.md
  create     ~/.dotai/isolated/claude/rules/standalone.md
  create     ~/.dotai/isolated/claude/settings.json
             keys: create $schema, create claudeMdExcludes, create hooks, create model, create permissions
  create     ~/.dotai/isolated/claude/skills/commit-message/SKILL.md
  ...

15 create, 0 replace, 0 remove, 0 unchanged · dry run, nothing was written

The dotai web UI, Home board

Features

  • One source, three harnesses. A pack in the rulesync layout, rendered by a pinned rulesync binary whose checksums are embedded in the engine.
  • Plan first. Every command that writes shows its exact file and key operations with --dry-run, and --json gives the same plan to scripts (CLI JSON output).
  • Safe by default. Isolated installs under ~/.dotai/isolated/, or a replace mode that resets a harness to a fresh install; a backup before every write, a journal and a rollback on failure, and dotai restore to undo.
  • Project profiles that stay local. dotai apply --profile <p> writes only to local, untracked files, lists them in .git/info/exclude, and dotai restore --project undoes it.
  • Packs from GitHub or a folder. dotai pack add, update (which shows what changed in hooks, MCP servers, settings, tools and mods first), remove, list, and dotai pack new from an embedded template.
  • A local web UI. dotai ui serves the same use cases on 127.0.0.1, each action shown as its plan first.
  • dotai doctor reports what changed outside dotai since it wrote it.

Supported harnesses and platforms

Harness Pack id Command Isolated launch Status
Claude Code claudecode claude CLAUDE_CONFIG_DIR Supported
Google Antigravity CLI (agy) antigravity-cli agy --gemini_dir Supported
OpenCode opencode opencode XDG_* directories Supported

OpenCode is supported since rulesync 43.12.0, whose generated OpenCode hooks plugin passes a sessionStart hook's output to the model (dyoshikawa/rulesync#3926, #3932); a real opencode run on OpenCode 2.3.2 answered with the marker a sessionStart hook printed (HARNESS-NOTES). A harness that is only a preview is never selected by default: name it with --harness, or tick it in the web UI's harness step, and the plan warns harness-preview; no harness is a preview now.

Isolation is partial for every harness: each install plan names what of your own setup still loads, such as a shared login. The verified behavior of each harness, with the version and OS it was checked on, is in Harness notes.

OS Architectures
Windows x64 (amd64)
Linux x64 (amd64), arm64
macOS x64 (amd64), arm64

These are the platforms of the release archives and of the rulesync checksums the engine embeds (0042). CI runs on Windows, Linux and macOS. Adding or updating a pack from GitHub needs git 2.41 or later on PATH, and a project apply uses git to find the files a repository tracks.

Install

# Linux and macOS
curl -fsSL https://raw.githubusercontent.com/Lartweib/dotai/main/install.sh | sh
# Windows, in PowerShell
irm https://raw.githubusercontent.com/Lartweib/dotai/main/install.ps1 | iex
# From source, with Go 1.26 or later
go install github.com/lartweib/dotai/cmd/dotai@latest

Installing dotai covers what the scripts change on PATH, their options, reading a script before running it, and installing a release archive by hand with its checksum and attestation.

Quickstart

Create a pack, check it, see what an install would do, install it isolated, launch a harness against it, and open the UI. The example uses Claude Code; use the harness you have instead (claudecode, antigravity-cli or opencode), which must already be installed. The first install downloads the pinned rulesync once and verifies its checksum.

dotai pack new my-pack --name my-pack --harness claudecode --profile web:"Web projects"
dotai validate my-pack
dotai install my-pack --mode isolated --dry-run   # then again without --dry-run
dotai run claudecode
dotai ui
  • dotai pack new writes dotai's template, one commented example of each file a pack holds, and adds the pack to the registry. Edit the examples: a file left as the template wrote it is flagged template-unchanged, and install asks before installing it.
  • dotai install --mode isolated installs under ~/.dotai/isolated/, never into your own harness configuration; dotai restore undoes it.
  • dotai run claudecode launches Claude Code against the isolated install; pass the harness's own arguments after --.
  • dotai install manages the pack's harnesses that are installed on your machine, or those --harness names. A harness listed in requires that is missing stops the install. A preview harness, if dotai has one, is managed only when you choose it, as Supported harnesses describes (Pack format).

For a complete, small pack to read, see examples/minimal-pack. Creating a pack covers dotai pack new in full, and Applying a pack the project profiles.

Everyday commands

Command What it does
dotai install [path] --mode isolated Install a pack's user scope under ~/.dotai/isolated/; --mode replace resets each harness and installs into its own configuration instead; a later replace install only updates the pack unless --reset.
dotai apply --profile <p> Apply profiles to the project in the current directory, in local, untracked files only.
dotai run <harness> [-- args] Launch a harness against its isolated install.
dotai restore [backup-id] Undo the last install, or every install down to the one that took backup-id.
dotai restore --project Undo the profiles applied to the project in the current directory.
dotai doctor [--fix] Report what changed outside dotai since it wrote it; --fix writes missing .git/info/exclude entries.
dotai pack add <github-url> Add a pack from GitHub at --ref (a tag, a branch, a commit, or latest for its highest vX.Y.Z release), or a local one with --dir <path>.
dotai pack update <identity> Fetch a GitHub pack again and show what changed in its executable content before replacing it; a pack added with --ref latest moves to a newer release.
dotai pack new <dir> --name <n> Create a pack from the template embedded in the engine and add it to the registry.
dotai ui Serve the local web UI on 127.0.0.1.
dotai validate [path] Check a pack's structure and merge rules.

install, apply and pack new take --dry-run. dotai <command> --help describes each command in full.

dotai and rulesync

dotai renders packs with rulesync, and a pack's layers use the rulesync layout. rulesync on its own generates each harness's files from one source. dotai adds:

  • Pinned rendering. Each pack names its rulesync version; dotai downloads it once and checks it against checksums embedded in the engine. dotai also renders per-harness settings, tools and their path variables.
  • Plans. Every file and settings key is shown before it is written, with --dry-run and --json.
  • Backups, a journal and restore. A backup before every write, a journal and a rollback on failure, and dotai restore to undo an install.
  • Isolated installs. An install under ~/.dotai/isolated/ that leaves your own harness configuration as it is, launched with dotai run.
  • Project profiles kept out of git. Local, untracked files listed in .git/info/exclude, undone with dotai restore --project.
  • dotai doctor. A report of what changed outside dotai since it wrote it.
  • A web UI. The same use cases on 127.0.0.1, each action shown as its plan first.

Docs

Contributing

Contributions are welcome. Read CONTRIBUTING.md first, and follow the Code of Conduct. Report security issues privately, as SECURITY.md describes.

License

MIT

About

Cross-harness configuration engine for AI coding agents

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages