First Run — ToolBoxV2 Onboarding¶
What happens when you run
tbfor the first time.
What Happens on First tb¶
- Profile Check:
_get_profile()readsapp.profilefromtb-manifest.yaml. - If profile is
Noneor manifest missing → triggers first-run. - Profile Selection:
run_first_run()displays the profile picker. - Profile Persisted: Choice written to manifest via
cmd_set(). - Config Wizard: Offered to configure database, workers, auth.
# __main__.py::main_helper()
from toolboxv2.__main__ import _get_profile
profile = _get_profile()
if profile is None:
from toolboxv2.utils.clis.first_run import run_first_run
profile = run_first_run()
Profile Selection¶
| # | Key | Label | Description |
|---|---|---|---|
| 1 | consumer |
👤 Consumer | App/Mod users — launches GUI |
| 2 | homelab |
🏠 Homelab | Local multi-mod setup — interactive dashboard |
| 3 | server |
🖥️ Server | Infrastructure — ASCII overview, exit |
| 4 | business |
💼 Business | Quick status — 3-line health summary, exit |
| 5 | developer |
🛠️ Developer | Core/Mod dev — dashboard + hints |
Default: homelab (index 2).
PROFILES = {
"consumer": ("👤 Consumer", "Ich nutze eine App / eine Mod. Einfach starten."),
"homelab": ("🏠 Homelab", "Ich betreibe mehrere Mods, Features, Flows lokal."),
"server": ("🖥️ Server", "Ich manage ein verteiltes System / IT-Infrastruktur."),
"business": ("💼 Business", "Ich brauche einen schnellen Gesundheitsstatus."),
"developer": ("🛠️ Developer", "Ich entwickle Mods, Features oder den Core."),
}
Change Profile Later¶
Via CLI¶
tb manifest set app.profile <profile_name>
Via Code¶
from toolboxv2.utils.manifest import ManifestLoader, ProfileType
from toolboxv2 import tb_root_dir
loader = ManifestLoader(tb_root_dir)
manifest = loader.load()
manifest.app.profile = ProfileType.DEVELOPER
loader.save(manifest)
Config Wizard¶
After profile selection you are asked:
Run config wizard now? [Y/n]:
The wizard (run_config_wizard()) configures:
- Database mode: LC (local JSON), LR (local Redis), RR (remote Redis), CB (MinIO)
- Workers: HTTP/WebSocket port configuration
- Auth provider: Custom, Local, or None
- Paths: data/, config/, logs/ directories
# Invoked from first_run.py
if run_wiz != "n":
from toolboxv2.utils.clis.config_wizard import run_config_wizard
run_config_wizard(tb_root_dir)
Profile → Runner Mapping¶
After first-run, main_helper() maps profile to runner:
| Profile | Runner Called |
|---|---|
consumer |
gui |
server |
_run_server_overview() → exit |
business |
_run_business_overview() → exit |
homelab, developer |
default (interactive dashboard) |
if profile == "consumer":
runner_name = "gui"
elif profile == "server":
_run_server_overview()
return
elif profile == "business":
_run_business_overview()
return
else:
runner_name = "default"