1
Configure Items
David Young edited this page 2026-10-26 16:01:09 -06:00

Configure Items

Each file in configure.d/ is one item in the configure menu. To add an item, add a file.

Naming

The file name sets both the order and the item's name. The number prefix is dropped: configure.d/30-claude.sh is shown third and can be run as configure claude.

Current items:

File Item
10-core.sh Federated Computer Core: Superpanel, Tailscale, Nextcloud, email, files, Element
30-claude.sh Claude Code
31-opencode.sh opencode
32-hermes.sh Hermes Agent

What a file defines

Name Required Purpose
TITLE yes Shown in the menu
DESCRIPTION yes One line, shown after the title
is_configured yes Returns 0 if the item is done. Its output is hidden.
run_configure yes Sets the item up. Return non-zero if it wasn't set up.
is_installed no If defined and it fails, the item is left out of the menu

The file is sourced in a subshell, so variables and cd don't leak out.

What's available

Name What it is
$COREDESKTOP ~/.local/share/coredesktop
confirm "Question?" Yes/no question, default no
confirm_yes "Question?" Yes/no question, default yes
unsandboxed <agent> ... Runs an AI agent's real command. Setting an agent up writes outside its sandbox, so use this rather than the sandboxed command.

~/.local/bin is on PATH.

Example

#!/bin/bash

TITLE="Claude Code"
DESCRIPTION="Sign in to Anthropic"

is_installed() {
  command -v claude
}

is_configured() {
  claude auth status
}

run_configure() {
  echo "  1) Claude subscription (Pro, Max, Team or Enterprise)"
  echo "  2) Anthropic Console (pay for API usage)"
  local choice
  read -rp "How do you pay for Claude? [1] " choice
  case "$choice" in
    ""|1) claude auth login ;;
    2) claude auth login --console ;;
    *) echo "Choose 1 or 2."; return 1 ;;
  esac
}

Items with several steps

10-core.sh shows the pattern for an item made of several parts. Each part has a <part>_done check and a setup_<part> function, and a step helper does the rest:

  • skips parts that are already done
  • asks before each of the others
  • carries on when one part fails, and reports the failure at the end

That way, running configure again only redoes what's missing.

Guidelines:

  • Remember answers. Save what the user typed, like ~/.config/coredesktop/core.conf, and offer it as the default next time.
  • Don't keep passwords in files or variables longer than needed. Pass them on stdin, not as arguments, so they don't show in the process list. Prefer revocable tokens, as 10-core.sh does with Nextcloud app passwords.
  • Check the real state in is_configured and the _done checks, not just a marker file, so the menu stays accurate if the user changes something by hand.