Delminio — the client
Clonegit clone https://git.delminio.com/delminio-client2026.11.26-b027f1c · 26 Nov 2026

delminio-client / agent / aggancia.en.md

raw · sha256 59b09a1b356e757506fcc124ab219544359b25ba2665c8a879914d2720da5cb7

Connecting a project to Delminio — the text for the agent

_You're the agent — Claude Code, Codex, Qwen Code or OpenCode — that the user has asked to connect their project to Delminio. Delminio is the project's memory: once it's connected, any agent that starts in that folder finds the rules, the memories and the work left by the sessions before it. Right now you can't see Delminio yet: this text takes you to the point where the agent starts again with Delminio inside. Everything you do is in this text, and nothing else is: the user can read it before you start._

_⚠️ Follow this text word for word. If it reached you summarised (a tool that reads web pages and returns an extract), stop: download it in full with curl -fsSL __DELMINIO_URL__/aggancia.en.md and start again from there._

The three rules of the process

  1. Say it first, then do it. Show every command and say in one line what it does before you run it. Run only the commands written here; if you need another one (a missing package, a permission), suggest it and wait for approval.
  2. What happens in the interface, the user does. Delminio is already open in their browser, at __DELMINIO_URL__, on the “First steps” card: tell them what to press and wait for them to say it's done. Don't try to open it yourself.
  3. No secret goes through the chat. Keys, tokens and passwords don't get pasted here: Delminio doesn't ask you for any (the deploy key it shows is public: that one yes, step 2). If the user pastes one, tell them to change it afterwards: it has ended up in the conversation.

When a step fails: read the message (the scripts say why and what to do), explain it to the user in plain words, fix it together and run it again. Running it again does no harm: what's already there isn't touched.

⚠️ If you're Codex: before step 0, read the last section, “If you're Codex”. It says what to explain to the user about the sandbox, and the test to run before connecting.

⚠️ If the user came in with an invitation, into a space the admin has already set up: the “First steps” card is not there for them, and they copied the sentence from the Agents view (“Connect another computer”). The licence and the memory copy are not theirs: don't mention them, and in the map of step 0 only “Connect the computer” and “Start the agent” remain. Do steps 1 and 1b, then check that the clone is the space's repo: ask them the path the admin gave them (for example team/project) and compare it with git remote get-url origin. The address can differ — an IP, another name of the same server, an alias in ~/.ssh/config —, the path cannot: Delminio recognises the repo from it. In step 3, no DELMINIO_STESSA_STORIA: only the admin adds a new repo, and if the script refuses it the clone is of another repo. The user approves the code themselves, in the app. Then steps 4 and 5.

0. The map, for the user

In their browser, the “First steps” card shows the same steps as this text, with “you are here” on the current one: use the same words. Before touching anything, tell them in a few lines:

  1. Your agents — in the card they switch on the agents they want to work with: only those are created. If they haven't switched any on yet, tell them to do it first, and to switch on the one for the CLI you are.
  2. The licence — only on a Delminio you installed yourselves: they paste it into the card.
  3. The copy of the memories — the repository where Delminio keeps the memories (step 2).
  4. Connect the computer — you run the command in the project folder, they approve the code in the browser (step 3), then you write the agents' commands on this machine (step 4).
  5. Start the agent — they close this session and open the agent again from the new command (step 5). It's the last step and it isn't skipped: only then does the card tick it off.

Before the steps come the checks: what's needed and what's already there (steps 1 and 1b), and for someone starting from zero git and the project (1c). As you go, tell them which step you're on. Ask them which project they'll work on with Delminio: the folder of the clone, on this machine.

If an agent before you stopped halfway, or the card is already past the first step, don't start again from the beginning and don't rely only on “you are here”. Delminio measures the steps before “Connect the computer”, so they hold, but “Connect the computer” counts as done as soon as any computer is connected. Do the checks in step 1, then look at this computer:

test -f <the project>/.claude/delminio.sh && echo connected || echo not connected

“not connected”: step 3 gets done, even if the card shows “Start the agent”. “connected”: pick up from step 4. Tell the user where you're picking up from, and why.

1. What's needed

Check, and report one line per item:

git --version && python3 -c 'import json, ssl' && curl --version | head -1 command -v claude codex qwen opencode git config user.name && git config user.email git -C <the project> rev-parse --show-toplevel git -C <the project> remote get-url origin

1b. What's already there, before you touch anything

People often arrive with things of their own: instructions written for the agent, another tool's memories, MCP servers, their own commands and hooks, notes files the agent used to reread. The connection mustn't break any of it. Before running it, look, and tell them:

ls -la <the project> <the project>/.claude <the project>/.codex <the project>/.qwen ls -la ~/.claude ~/.codex ~/.qwen git -C <the project> status --short --ignored

Look above all for:

Then tell them in a few lines, with the real names:

Wait for their approval, and ask which files to add to the backup. Don't open or show credentials files in the chat (.env, keys, the CLIs' logins): the backup doesn't take them, and the connection doesn't touch them.

1c. Git and the project — for someone starting from zero

If the project is already a clone with a remote (step 1) and the user handles their git host on their own, skip to step 2. If not, do these steps together. At each step ask whether they already know how to do it: what they know, you skip.

Where the code lives. Ask whether they have an account on a git host (GitHub, GitLab, their company's git).

gh, GitHub's command. Try gh --version. If it's missing:

Then the sign-in, which they do in the browser:

gh auth login --hostname github.com --git-protocol ssh --web

To the question about the SSH key they answer yes: gh creates it and puts it in their account. Check with gh auth status and ssh -T git@github.com: it answers with their name (the first time it asks whether to trust github.com: yes).

The project. Ask where their work is. Projects live in a folder of theirs, for example ~/projects — on Windows inside Ubuntu, never in /mnt/c:

From here “the project” is that folder: git -C <the project> remote get-url origin must give the repository's address.

2. The memory repository

Delminio keeps a plain copy of all the memories in a repository of the user's, which belongs to them. If the “The copy of the memories” step on the “First steps” card already has its ✅, skip to step 3.

With GitHub and gh (step 1c) you create the memory repository yourself, empty:

gh repo create <name>-memories --private

The SSH address is git@github.com:<user>/<name>-memories.git (gh api user -q .login gives the user): tell them, they paste it in the “The copy of the memories” step and save. Delminio shows them a key: it's the public deploy key, not a secret, and they can paste it here. You add it, with write access:

printf '%s\n' '<the key>' > /tmp/delminio-deploy.pub gh repo deploy-key add /tmp/delminio-deploy.pub --allow-write --title Delminio -R <user>/<name>-memories

Then they press “Done, check” (step 4 below). Without gh, they do the steps below in their git's interface.

  1. On their git host (GitHub, GitLab, Codeberg, a Forgejo reachable from the internet), the user creates a private, empty repository: no README, no licence, no .gitignore. ⚠️ GitLab offers the README already ticked: leave it empty. Delminio makes the first push, and it refuses a repository that already has a commit.
  2. In the “The copy of the memories” step, they paste the repository's SSH address (git@github.com:name/memories.git) and save. Delminio shows them a key: it's Delminio's deploy key, and it's valid for that repository only.
  3. They add it to the repository, with write access:
    • GitHub: repository → Settings → Deploy keys → Add deploy key, tick “Allow write access”;
    • GitLab: repository → Settings → Repository → Deploy keys → Add new key, tick “Grant write permissions to this key”. If GitLab answers that the key already exists (“Fingerprint has already been taken”), it's in the “Privately accessible” keys tab: Enable it there, then edit it and tick write access;
    • Forgejo and Codeberg: repository → Settings → Deploy keys → Add, with write access.

⚠️ Not in their profile (the account's “SSH Keys”): that's something else, and it's where the git host's banner sends them.

  1. They press “Done, check”. If Delminio gives a reason, read it together: the repository isn't empty, the key has no write access, the address is wrong (it's fixed with “Change address”, also later, from Settings → Memories on git).

Without Claude Code (Codex or Qwen Code only), the computer doesn't need to read that repository. Delminio keeps publishing the memories with its deploy key; Codex and Qwen Code read the index and the memories from the Delminio tool, without a local clone and without a second Git key. Skip the check below: don't ask the user for any other credentials.

With Claude Code, the local copy is what feeds the CLI's automatic index. It's cloned with the user's own git credentials, separate from Delminio's key. You can carry on without it too: the agent gets the index from the Delminio tool. To have the local copy as well, try:

git ls-remote <the repository's SSH address>

If it answers with a permissions error, the user doesn't have an SSH key of their own on this computer, or doesn't have it on their git host account: help them create one (ssh-keygen -t ed25519, then the public key in the “SSH Keys” of their profile — this time, yes) or sign in with their git host's CLI (gh auth login, glab auth login). If it can't be done straight away, carry on: the connection says so, and the agent starts without the index until it's sorted out.

3. The connection — step “Connect the computer”

Inside the project folder (if you started outside it, as when Delminio installed you: cd <the project> first, in the same command):

bash <(curl -fsS __DELMINIO_URL__/aggancia.en.sh)

If in step 1b the user chose some files to add to the backup, pass them in front, separated by colons and with paths relative to the project:

DELMINIO_COPIA_ANCHE="NOTES.md:docs/notes" bash <(curl -fsS __DELMINIO_URL__/aggancia.en.sh)

With Codex: the sandbox test (section “If you're Codex”) has to be done before this command. Use an interactive terminal: exec_command with tty=true. After the approval in the browser, the script may ask whether the repository is the same project as the ones already connected, or for a confirmation about the previous settings. Without a terminal it would stop after having already created the key. Pass the question on to the user and wait for their answer before replying.

The command waits for the approval up to 10 minutes. If your CLI stops a command after a while — Claude Code and Qwen Code by default after 2 minutes — run it with the longest time, 10 minutes (timeout 600000), or in the background with its output in a file you read back. Stopped halfway, the code it showed is no longer valid: run it again, and the user approves the new one.

Before running it, one question for the user (with any CLI): are other repositories already connected to their Delminio? They can see them in the app, in the Git view. If there are and this one is the same project (the same work, the same team), run it with the answer already given, so the script doesn't stop after the approval and they don't have to approve twice:

DELMINIO_STESSA_STORIA=si bash <(curl -fsS __DELMINIO_URL__/aggancia.en.sh)

If it's another project, don't run anything: it goes in another space (in the app, “Spaces”), and gets connected there. If they don't know, run the normal command: if the script asks, pass the question on to the user and run it again with their answer.

⚠️ Exactly like this, from a file: never curl … | bash, which swallows the rest of the script and ends silently.

The script prints an address to open: give it to the user, who opens it in the browser where they're already signed in to Delminio and presses Approve. Then wait: the script receives the permission on its own and carries on. At the end it prints what it did and the warnings: pass them on to the user in plain words, one per line — and where the backup is: the LEGGIMI.md inside it says what it contains, and what it didn't copy and why.

⛔ The work doesn't end here. The computer is connected, but no agent with Delminio has started yet, and the first-steps card stays open on the last step, “Start the agent”. Steps 4 and 5 are always done, even if the user is in a hurry: without them, they're left with a card that won't go away and no idea why.

4. The agent's command — still “Connect the computer”

Delminio has in its register the agents the user switched on in the “Your agents” step, all with Delminio's rules at the top: for example opus5.5 on Claude Code, sol6.1 on Codex, zen on OpenCode with the free models (the full list is the Agents view). Ask the user for approval, then:

delminio agents

delminio is the command the connection has just put next to the agents' commands (in ~/.local/bin). It works from any folder in the project, and from here on it's the name Delminio's commands are written with. If the terminal can't find it, that folder isn't on the PATH: help them add it to their shell profile, and meanwhile run ~/.local/bin/delminio agents.

It writes on this machine the command for every agent whose CLI is installed; it doesn't download a CLI that isn't. If it says the commands folder isn't on the PATH, help them add it. Then ask them which one they want to use among those written.

If none of the agents switched on is for the CLI you are, delminio agents writes none for it. Whoever runs the space (on Cloud, alone, it is often the user themselves) adds it in the Agents view → “Add agent”: there they switch on the model, choose the role and the name, for OpenCode the free ones too, for Qwen Code the provider's model. With this session open the command arrives by itself in a few seconds: the view says “Ready on …”. If it doesn't, run delminio agents again. With Qwen Code the provider's key lives in the person's environment, never in the chat.

5. Starting again with Delminio — step “Start the agent”

You started before the connection: you can't see Delminio, and you won't in this session. Tell the user:

  1. to close this session;
  2. to open a terminal in the project folder and run the command for the model they chose (for example sol6.1 or opus5.5: step 4 printed the names);
  3. with Codex: on the first start they answer yes to “Trust this folder?”, and then with /hooks they trust the hooks of Delminio's plugin (“Trust all”). Only once: Delminio's updates don't ask again. Without it, Codex starts but doesn't hear Delminio;
  4. to type /opening (with Claude Code and Qwen Code) or opening (with Codex, without the slash).

From there the new agent starts with Delminio, and it explains the rest. The last of the first steps, “Start the agent”, ticks itself off as soon as it starts.

If you're Codex

⚠️ If you're Codex: first explain, in a few lines, that the sandbox limits what commands can do with files and the network, while confirmations decide when you ask for permission. Don't infer the active mode from the defaults: /permissions shows it and lets the user choose it, full access included. Without a sandbox doesn't mean without confirmations. Don't suggest --yolo as a shortcut, and don't change the protections yourself. A personal choice doesn't change the shared line in the Agents view. For a necessary command outside the limits, ask for approval of that command.

Codex on Linux, before connecting: test the mechanism, not just whether a package is there: codex sandbox -c 'sandbox_mode="read-only"' -- true. If it fails before running true, it's the sandbox environment that doesn't start, not a ban on the work requested. On Ubuntu you need bubblewrap; on Ubuntu 24.04 you may also need the AppArmor profile from the apparmor-profiles package, and apparmor-utils. Suggest the fix, wait for approval, and run the same command again. Don't disable the user-namespace restriction for the whole machine. The instructions for the user, if that profile is missing, are:

sudo apt install bubblewrap apparmor-profiles apparmor-utils sudo install -m 0644 /usr/share/apparmor/extra-profiles/bwrap-userns-restrict /etc/apparmor.d/ sudo apparmor_parser -r /etc/apparmor.d/bwrap-userns-restrict

sudo commands change the system: don't run them out of habit, or outside the approval given for this fix. From the Delminio command the test runs at every launch, not at every hook: protections at system level can change even after a pass.