djinn

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 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.

Wish for anything, except what no djinn can grant. Like the genie of the lamp, Djinn has its 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. Never more: one Djinn holds three active wishes at most, and as many set aside as you like.

Workers never commit. They edit their worktree; Djinn commits each one's work as it ends, tested, and pushes on a cadence: at an azima's end, or after three tasks and an hour, or on demand. One CI run per push instead of one per worker: the Git runners breathe.

ALPHA — NOT USABLE AS IS. Djinn is an experimental project under development. It is not ready to be used, neither for real work nor in production. The features described below show the project's goal and its state of development; they are no guarantee that it works.

Give an intent. Stay in control of your agents' work.

Djinn is a local desktop app to work with Codex and Claude Code: a readable timeline, agents followed live, explicit decisions, and results you can open, annotate and validate.

Install

Coming with the first release: no release exists yet, so these lines do not work today. One line, no sudo: the binary for your system, checked against its SHA-256 sum, in your own folders. On Linux without WebKitGTK, it takes the browser build (the same app, in your browser); with no binary that fits, go install.

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

Antigravity, optional. Workers run Claude Code or Codex. Google's Antigravity (agy) can run them too: install it, sign in with your Google Cloud project (gcloud auth application-default login --project <project>, then AGY_ADC_AUTH=true where djinn up runs) or with agy's own sign-in, then djinn task spawn --provider antigravity. Djinn runs the official agy as installed and never reads its credentials; the account you sign in with pays. Steps and rules: docs/providers.md.

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

From brief to result

  • One wish, one lead. Say what you wish. Its lead, Claude Code or Codex, splits it into tasks, each one a worker in its own worktree. One lead is principal across active wishes to field shared decisions. Tasks can wait as drafts and move between wishes as priorities shift. Three wishes are active at most; the flight plan shows them together.
  • A visible team. Two-line task rows show each worker's status first, prompt, live events, diffs, terminal logs and what it cost. An operating load cursor (from Minimal to Overclock, or Auto) meters concurrency to the machine, giving investigators top priority. Send instructions while workers run, or talk to the lead in its terminal.
  • You decide. A question comes with its options, keyboard shortcuts and the lead's recommendation: Rub the lamp takes it, and a small worker turns your decision into tasks; Enlighten me sends one to dig first with your note, then revise the question. Answers route directly to the principal lead's terminal.
  • Ship with confidence. A push strategy per wish integrates work into a single wish branch or dedicated azima branches with automated pull requests. Push on a standard cadence after tests pass or on demand with the Push button.
  • What needs you is a question; the rest stays in the wish. What the lead and the workers write down for one another, Markdown and Mermaid diagrams, waits in a tab of its own. One HTML page shares the wish; djinn wish export hands it over whole, in one file.
  • Nothing is lost. Stopping Djinn interrupts the workers, never loses them: the next start resumes each one in its own worktree and session. A worker stopped by its usage limit waits for the reset, then goes on.
  • Every request finds its wish. Something unrelated comes up: the lead offers to open a new wish, to file it in an existing one, or to keep it where it is. A skill's wish template makes a wish that already knows how to work, with a watcher that wakes its lead on each change.
  • Your language. The interface follows the system language (English or French); change it in Connections & preferences.

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

Local development

To build and test Djinn, see CONTRIBUTING.md: go tool task build, then bin/djinn up; go tool task test runs every test, with no paid model. The window reads its wishes, tasks and questions from the djinn it runs in: the store stays on your machine, in Djinn's data folder.

User guide · Agent protocol · Adaptable wishes

The concepts and every command of the command line, in one site: Documentation in the window's settings, or go tool task docs, then bin/docs/index.html (docs/site, its Command line tab filled in from djinn's own commands).

Credits

The engine and some adapters are studied from T3 Code. The avatars use Thinking Orbs. Djinn's diagrams and illustrations are original. See the notices and the license.

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 the projects Djinn stands on.

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.
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