djinn

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Djinn

A wisp of smoke to work your will.

Alpha. Djinn is young and moves fast. It runs real work every day on its own repository, but expect rough edges, and read Status before you trust it with yours.

Djinn turns what you wish into work done by coding agents, on your own machine, with your own accounts. It is one command, djinn: a native window, a local server, and a command line the agents use. You make wishes; one Djinn, the lead, plans each of them into tasks; workers of several agents (Claude Code, Codex, Antigravity) carry them out, each in its own Git worktree; Djinn schedules, checks, merges and pushes their work. Everything that needs you comes as a question, with a recommendation and the exact command when a move is yours to make.

What no djinn can grant

Like the genie of the lamp, Djinn has limits, and they are the project's first rule:

  • It can't kill anybody. Nothing destructive or irreversible (a deletion, a force push, a deployment) happens without your explicit go.
  • It can't make anybody fall in love. It never bends anyone else's will: no message, approval or merge sent in your name that you have not seen.
  • It can't bring anyone back from the dead. What failed stays failed: no made-up result, every claim comes with its evidence.
  • No wishing for more wishes. It never grants itself more than it was given: no extra budget, no wider access, and no secret it stores or reads.
  • Three wishes at a time. One Djinn holds three active wishes at most, and as many set aside as you like.

Workers never commit, and never push. They edit their worktree; Djinn commits each one's work as it ends, checked, and pushes on a cadence: one CI run per push instead of one per worker.

Install

One line, no administrator rights. The script picks the build for your system, checks it against the release's SHA256SUMS, and puts djinn in your own folders (~/.local/bin on macOS and Linux). On Linux without WebKitGTK it installs a build that opens Djinn in your browser.

curl -fsSL https://github.com/Empowill/Djinn/releases/latest/download/install.sh | sh    # macOS, Linux
irm https://github.com/Empowill/Djinn/releases/latest/download/install.ps1 | iex         # Windows

Then run djinn up (djinn up --browser prints a URL instead of opening a window). The latest release is v0.1.1.

Agents. Djinn asks for no API key and stores none: it runs the agents you installed and signed in to, and your account pays for them. Connections & preferences shows which ones it finds and installs or signs them in from the window. By hand: npm install -g @anthropic-ai/claude-code, npm install -g @openai/codex, and for Antigravity see docs/providers.md.

macOS builds are not signed yet. The curl install is not affected; a Djinn.app downloaded with a browser must be allowed once in System Settings › Privacy & Security, or with xattr -dr com.apple.quarantine Djinn.app.

From source

With Go 1.25+ (and CGO for the window), Node.js 22, and on Linux the GTK and WebKitGTK headers (the full list is in CONTRIBUTING.md):

git clone https://github.com/Empowill/Djinn.git && cd Djinn
npm ci
go tool task install    # installs djinn in Go's bin folder, with its menu entry on Linux
djinn up

What works today

What is below is merged and covered by tests. Items marked (next) are on the development branch and come with the next release, v0.1.2; the rest ships in v0.1.1.

  • Wishes and azimas. A wish is what you ask for, across one or more projects. The Djinn splits it into azimas (parts of the plan, coded T01, T02…) and tasks in a conflict-free parallel graph; each task is one worker in its own worktree. Azimas can be renamed, wait as drafts, and move between wishes. Guide
  • One Djinn for every wish. A single agent session sees every active wish, so it spots duplicate or conflicting work. It starts from djinn brief, a summary Djinn writes without a model, with its safe read, Git and djinn commands pre-authorized and its notes built into the binary (djinn lead notes). Talk to the Djinn opens it in the window's terminal, and the pill Write to the Djinn (Cmd/Ctrl+I) sends it a word (next: v0.1.1 calls them Lead and Write to the lead). Guide
  • Questions with a clear call to action. The Djinn says nothing for you in its terminal: a report, a doubt, a "done" is a question in its wish, with options and a recommendation. Rub the lamp takes it in one click or one key; Enlighten me sends an investigator worker (with web search, expanded read access, and the project's model) to dig first and revise the question (--context-file), keeping the initial question and earlier revisions at the bottom. A move only you can make (push a tag, merge a pull request, check on a Mac) comes with its exact command in a code block at the top; a check or a CI result is never asked of you (next). Guide
  • The flying carpet (next; the overview in v0.1.1): every active wish at once, with what waits for you first (Ctrl+1 / Cmd+1). The Hourglass (next; Ctrl+2 / Cmd+2): the machine's CPU and memory over time, each running worker's own graphs, and where the time of the commands goes. Guide
  • Your work lands where you choose. Per wish, one integration branch; per azima, one branch cut from main with its own pull request (naming a branch after a remote one fetches it first, and answering yes to Djinn's pull request question opens it as a draft). Djinn merges each task's work, runs the project's checks, starts a correction worker when they fail, and pushes on a standard cadence or on demand. Guide
  • Pull requests babysat. When a task opens a pull or merge request (gh pr create, glab mr create) in a project that names a babysit skill, a watcher follows it in the same wish: each failed pipeline, comment or conflict wakes the Djinn, until it merges. Guide
  • Review. Each task shows its whole diff; a comment on a line reaches its worker or becomes a correction task. A Review tab lists the merged work to tick off. Guide
  • The Lamplighter. A watchdog wakes a worker gone silent and continues it on its own session; each task has a seal (2 hours of work, 500 turns per run shown beside its lifetime turns, a spending cap, what it may edit and run). Stopping Djinn never loses a worker: the next start resumes it. Guide
  • Your machine stays yours. An operating load slider, from Minimal to Overclock or Auto, sets how much of the machine the workers take and shows the exact worker count for each notch; heavy commands share it through gates.
  • Nothing outlives Djinn (next). Killing Djinn stops every worker, watcher and check it started; a survivor is stopped at the next start.
  • Logs and a debug dump. logs/djinn.log in the data folder records each call, command, error and panic (with its stack (next)), never a prompt or a secret. When Djinn freezes, djinn debug dump writes where each part of it waits, even when its server no longer answers. Guide
  • Updates on a click. A banner offers a newer Djinn with its release notes; nothing restarts without you.
Systems
System Builds What is verified
Linux amd64, arm64: GTK 3, GTK 4, browser Daily use, on amd64 with GTK 3. Every test runs in CI.
macOS one universal binary, and Djinn.app Used on a Mac during the port; the native end-to-end test passes there. Go tests run in CI. The release archives are not checked by hand yet.
Windows amd64, arm64 Go, interface and end-to-end tests run in CI, not yet as a required check. Not checked yet on a physical machine.

Status

Djinn is alpha. It builds itself every day, with a Claude Code lead on Linux; much else is covered by tests but not yet by use. Not verified yet:

  • Codex is tested against hand-written streams only: Djinn has not yet run a real Codex, as a lead or a worker. Antigravity has run real tasks; it reports no sign-in status.
  • macOS by hand from a release: Djinn.app opened from the Finder, its notifications, the title bar. The builds are not signed nor notarized.
  • Windows and arm64 Linux on real hardware, including the Windows window and SmartScreen. On Windows, workers cannot be paused and their CPU and memory are not measured yet.
  • GitLab: a merge request per azima, and one babysat until it merges, end to end.
  • An update from inside the app from one release to the next.

The data folder is kept across versions, but the command line and the API may still change.

Roadmap to v1

Djinn is tracked here, with no other tool: one box per task, one file per task in plan/, with what to do and the questions still open.

Phase 1 · Native app

Phase 2 · Orchestration and data, after which Djinn runs on itself

Phase 3 · Comfort

Screenshots of a demonstration wish, with fictional data. go tool task screenshots takes them again.

Documentation

User guide · Providers · Agent protocol · Team settings · Wish templates · Backups · Release notes

Every concept and command in one site: Documentation in the window's settings, served at /docs/ while djinn up runs, or go tool task docs, then bin/docs/index.html.

Contributing

Everything you need to work on Djinn, person or agent, is in CONTRIBUTING.md: the shape of the project (the lamp and the smoke), its technical directions, how to set up, and its license rules. Coding agents read AGENTS.md too. go tool task test runs every test, and no test calls a paid model.

License

Djinn is free and open-source software under the Apache License, Version 2.0. Third-party dependencies and their licenses are listed in docs/THIRD_PARTY_NOTICES.md, shipped with every release.

Credits

Thanks to Clément Fauvelle (@clemzer0o) for the macOS and Codex port and for the design of the window. The engine and some adapters are studied from T3 Code. The avatars use Thinking Orbs. Djinn's diagrams and illustrations are original.

Documentation

Overview

Package djinn holds what must sit at the root of the module: the built interface, embedded at compile time.

Index

Constants

This section is empty.

Variables

View Source
var Icon []byte

Icon is the icon of the application, for the window, the dock and the tray.

View Source
var Icon256 []byte

Icon256 is the icon at 256 px, for the window on Linux: GTK 3 silently drops a window icon that does not fit one X11 request, 512 px or more (gdk_x11_window_set_icon_list). Made by `go run ./tools/icons gen`.

Functions

func Docs

func Docs() fs.FS

Docs returns the documentation site, its Command line tab filled in from this djinn's commands: what djinn up serves at /docs/.

func UI

func UI() fs.FS

UI returns the built interface, rooted at the content of dist/.

Types

This section is empty.

Directories

Path Synopsis
cmd
djinn command
Command djinn is the single entry point of Djinn: the native window, the local server and the command line that agents use to drive a mission.
Command djinn is the single entry point of Djinn: the native window, the local server and the command line that agents use to drive a mission.
gen
Package gen holds what `go tool task gen` generates from the protos in api/.
Package gen holds what `go tool task gen` generates from the protos in api/.
go/backup/v1/backupv1connect
Package backup.v1 is the backup of Djinn's data folder: one archive, taken while Djinn runs.
Package backup.v1 is the backup of Djinn's data folder: one archive, taken while Djinn runs.
go/demo/v1/demov1connect
Package demo.v1 is a minimal service that proves a server stream reaches the interface, in the window and in the browser alike.
Package demo.v1 is a minimal service that proves a server stream reaches the interface, in the window and in the browser alike.
go/djinn/v1/djinnv1connect
The operating load slider that controls how much of the machine Djinn uses.
The operating load slider that controls how much of the machine Djinn uses.
go/machine/v1/machinev1connect
Package machine.v1 is what Djinn knows of the machine it runs on, and the gates: shared resources it grants one holder at a time.
Package machine.v1 is what Djinn knows of the machine it runs on, and the gates: shared resources it grants one holder at a time.
go/plan/v1/planv1connect
The plan of work: the projects Djinn knows, the wishes it works to grant across them, their tasks, and the questions agents ask along the way.
The plan of work: the projects Djinn knows, the wishes it works to grant across them, their tasks, and the questions agents ask along the way.
go/terminal/v1/terminalv1connect
Package terminal.v1 runs programs on pseudo-terminals for the window: a shell, or the lead agent, in a real terminal the user types into.
Package terminal.v1 runs programs on pseudo-terminals for the window: a shell, or the lead agent, in a real terminal the user types into.
go/ui/v1/uiv1connect
The interface reserved to the native window.
The interface reserved to the native window.
internal
backup
Package backup writes Djinn's data folder into one archive, and puts it back.
Package backup writes Djinn's data folder into one archive, and puts it back.
cli
Package cli turns the public methods of the protos into commands, by convention and at runtime: the command is the service then the method, the arguments are the fields of the request, and the help is the proto comments.
Package cli turns the public methods of the protos into commands, by convention and at runtime: the command is the service then the method, the arguments are the fields of the request, and the help is the proto comments.
demo
Package demo implements demo.v1.DemoService, which only proves that a server stream reaches the interface.
Package demo implements demo.v1.DemoService, which only proves that a server stream reaches the interface.
dispatch
Package dispatch decides which planned task starts now: the scheduler's rules, in plain Go, apart from the store and the workers.
Package dispatch decides which planned task starts now: the scheduler's rules, in plain Go, apart from the store and the workers.
dispatch/bench
Package bench is the dispatch bench (T07): dispatch situations written as data, each with the decision expected by hand, and what a contender decides for each.
Package bench is the dispatch bench (T07): dispatch situations written as data, each with the decision expected by hand, and what a contender decides for each.
docsite
Package docsite is Djinn's documentation site, docs/site, with its Command line tab filled in from the command tree of this very djinn (cli.Reference): what `go tool task docs` writes into bin/docs, and what djinn up serves at /docs/.
Package docsite is Djinn's documentation site, docs/site, with its Command line tab filled in from the command tree of this very djinn (cli.Reference): what `go tool task docs` writes into bin/docs, and what djinn up serves at /docs/.
fsx
Package fsx holds the file system helpers several packages share: a rename that Windows does not refuse for a moment, and a write that a reader never sees half done.
Package fsx holds the file system helpers several packages share: a rename that Windows does not refuse for a moment, and a write that a reader never sees half done.
gate
Package gate grants the gates: shared resources (code generation, the local stack, an end-to-end run, a paid model run) that one holder uses at a time, granted only while the machine is not under pressure and has the memory the command peaked at, the first wish of the rank first.
Package gate grants the gates: shared resources (code generation, the local stack, an end-to-end run, a paid model run) that one holder uses at a time, granted only while the machine is not under pressure and has the memory the command peaked at, the first wish of the rank first.
gitx
Package gitx starts the git commands Djinn runs, each with a deadline: a git that talks to a remote (over ssh, a stalled connection or a prompt nobody sees) or waits on a lock never holds Djinn for good (W504).
Package gitx starts the git commands Djinn runs, each with a deadline: a git that talks to a remote (over ssh, a stalled connection or a prompt nobody sees) or waits on a lock never holds Djinn for good (W504).
harness
Package harness runs workers: one agent process per task, in the task's own worktree, followed and recorded in the store as it goes.
Package harness runs workers: one agent process per task, in the task's own worktree, followed and recorded in the store as it goes.
link
Package link reads Djinn's links, djinn://tilasm/<id> and djinn://wish/<id>, which open the app on what they name from anywhere: a browser, a chat, a terminal, a Markdown file.
Package link reads Djinn's links, djinn://tilasm/<id> and djinn://wish/<id>, which open the app on what they name from anywhere: a browser, a chat, a terminal, a Markdown file.
logx
Package logx is the log of djinn up, to debug a freeze or a quit that hangs (W511): levelled lines (log/slog) in logs/djinn.log of the data folder, rolled over in the process on every system, and goroutine dumps beside them.
Package logx is the log of djinn up, to debug a freeze or a quit that hangs (W511): levelled lines (log/slog) in logs/djinn.log of the data folder, rolled over in the process on every system, and goroutine dumps beside them.
machine
Package machine discovers what the machine has (cores, memory, disk, GPUs) and how loaded it is (load, pressure), and turns it into the number of workers Djinn runs at once, whether a new worker or a gate may start now, and whether a local model can run.
Package machine discovers what the machine has (cores, memory, disk, GPUs) and how loaded it is (load, pressure), and turns it into the number of workers Djinn runs at once, whether a new worker or a gate may start now, and whether a local model can run.
plan
Package plan implements the services of plan.v1 on the store: projects, wishes and questions.
Package plan implements the services of plan.v1 on the store: projects, wishes and questions.
render
Package render writes the page of a wish: one HTML file standing alone, made by Djinn from its store, never by a model.
Package render writes the page of a wish: one HTML file standing alone, made by Djinn from its store, never by a model.
server
Package server builds the single HTTP handler that both the native window and the browser mode serve: the Connect services, and the interface for every other path.
Package server builds the single HTTP handler that both the native window and the browser mode serve: the Connect services, and the interface for every other path.
store
Package store keeps the entities of Djinn in one SQLite database, by protobuf reflection: one table per message, its id as primary key, the fields it is searched by as columns, and the whole message as a binary payload.
Package store keeps the entities of Djinn in one SQLite database, by protobuf reflection: one table per message, its id as primary key, the fields it is searched by as columns, and the whole message as a binary payload.
swapexe
Package swapexe puts a freshly built executable in place of an installed one, in one rename, without disturbing a copy that runs.
Package swapexe puts a freshly built executable in place of an installed one, in one rename, without disturbing a copy that runs.
terminal
Package terminal runs programs on pseudo-terminals for the window: a shell, or the lead agent, that the user types into as in any terminal.
Package terminal runs programs on pseudo-terminals for the window: a shell, or the lead agent, that the user types into as in any terminal.
testx
Package testx holds what the tests of several packages share: the mark of a test that checks portable logic, which the Windows job skips (CONTRIBUTING.md), and the environment every test process starts from (Guard).
Package testx holds what the tests of several packages share: the mark of a test that checks portable logic, which the Windows job skips (CONTRIBUTING.md), and the environment every test process starts from (Guard).
testx/bigwish
Package bigwish makes a wish of real size, to measure Djinn on: its azimas and tasks, the events of their workers, its questions and decisions, its blocks and its journal, as a wish export (WishService.Import reads it).
Package bigwish makes a wish of real size, to measure Djinn on: its azimas and tasks, the events of their workers, its questions and decisions, its blocks and its journal, as a wish export (WishService.Import reads it).
ui
Package ui implements UiService, the API the window calls.
Package ui implements UiService, the API the window calls.
usage
Package usage provides model price tables and cost estimation for worker token usage.
Package usage provides model price tables and cost estimation for worker token usage.
lead
notes
Package notes holds the lead's notes: how to lead wishes with Djinn, learnt from past wishes, whatever the agent that leads.
Package notes holds the lead's notes: how to lead wishes with Djinn, learnt from past wishes, whatever the agent that leads.
Package locales holds the texts Djinn shows to people, one JSON catalog per language, shared by the Go server and the interface (src/i18n.ts).
Package locales holds the texts Djinn shows to people, one JSON catalog per language, shared by the Go server and the interface (src/i18n.ts).
tools
benchdispatch command
Command benchdispatch is the dispatch bench (T07, plan/8e8d3d76-orchestrator.md): it runs the plain Go scheduler on every case of internal/dispatch/bench/cases.json and prints a Markdown table of its decisions, the expected ones, and the time per pass.
Command benchdispatch is the dispatch bench (T07, plan/8e8d3d76-orchestrator.md): it runs the plain Go scheduler on every case of internal/dispatch/bench/cases.json and prints a Markdown table of its decisions, the expected ones, and the time per pass.
benchworkers command
Command benchworkers compares four ways Djinn starts a worker on the same small task, with a real model: cold (claude -p as Djinn runs it), --bare, a fork of a session, and a cold worker behind a stable brief.
Command benchworkers compares four ways Djinn starts a worker on the same small task, with a real model: cold (claude -p as Djinn runs it), --bare, a fork of a session, and a cold worker behind a stable brief.
bigwish command
Command bigwish writes a wish of real size (internal/testx/bigwish) to a file, as djinn wish export writes one: djinn wish import reads it into any djinn, the e2e's first (e2e/bigwish.ts).
Command bigwish writes a wish of real size (internal/testx/bigwish) to a file, as djinn wish export writes one: djinn wish import reads it into any djinn, the e2e's first (e2e/bigwish.ts).
copydir command
Command copydir copies a directory tree.
Command copydir copies a directory tree.
devloop command
Command devloop is `go tool task dev`: Djinn while you edit it.
Command devloop is `go tool task dev`: Djinn while you edit it.
docsite command
Command docsite builds the documentation site into a folder that opens offline: docs/site, its Command line tab filled in from the command tree djinn is built from.
Command docsite builds the documentation site into a folder that opens offline: docs/site, its Command line tab filled in from the command tree djinn is built from.
icons command
Command icons makes Djinn's icon for each system from one drawing, build/icon.png: the logo of the window, which the window, the dock and the tray already show (assets.go).
Command icons makes Djinn's icon for each system from one drawing, build/icon.png: the logo of the window, which the window, the dock and the tray already show (assets.go).
macapp command
Command macapp lays out Djinn.app, the macOS application bundle, around a djinn binary built for macOS, and zips it.
Command macapp lays out Djinn.app, the macOS application bundle, around a djinn binary built for macOS, and zips it.
releasepack command
Command releasepack packs release archives and their checksums.
Command releasepack packs release archives and their checksums.
slowtests command
Command slowtests reads `go test -json` on its input, prints what go test prints without -json (the output of the tests that fail, the build errors, a line per package), and fails when a test fails or when a top-level test took longer than -max: tests stay fast, and a slow one is caught the day it slows down.
Command slowtests reads `go test -json` on its input, prints what go test prints without -json (the output of the tests that fail, the build errors, a line per package), and fails when a test fails or when a top-level test took longer than -max: tests stay fast, and a slow one is caught the day it slows down.
svgdiagrams command
swapexe command
Command swapexe puts a freshly built executable in place of an installed one, in one rename, without disturbing a copy that runs: it is how `task install` updates the Djinn in use.
Command swapexe puts a freshly built executable in place of an installed one, in one rename, without disturbing a copy that runs: it is how `task install` updates the Djinn in use.
windowcheck command
Command windowcheck tells whether a Connect server stream reaches the native window of Djinn message by message, on the path the window really uses on this system: the Wails internal asset server (wails://) on macOS and Linux, the loopback HTTP server with its token on Windows; and whether a unary call with an empty response still succeeds there.
Command windowcheck tells whether a Connect server stream reaches the native window of Djinn message by message, on the path the window really uses on this system: the Wails internal asset server (wails://) on macOS and Linux, the loopback HTTP server with its token on Windows; and whether a unary call with an empty response still succeeds there.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL