holohq 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.fr.md +137 -0
- package/README.md +136 -2
- package/bin/holohq.js +12 -0
- package/dist/server/server/actions/clone.js +36 -0
- package/dist/server/server/actions/newProject.js +40 -0
- package/dist/server/server/actions/publish.js +22 -0
- package/dist/server/server/app.js +42 -0
- package/dist/server/server/autostart.js +127 -0
- package/dist/server/server/autostartRun.js +96 -0
- package/dist/server/server/browser.js +24 -0
- package/dist/server/server/cache.js +24 -0
- package/dist/server/server/cli/autostart.js +21 -0
- package/dist/server/server/cli/config.js +45 -0
- package/dist/server/server/cli/convention.js +51 -0
- package/dist/server/server/cli/io.js +1 -0
- package/dist/server/server/cli/main.js +129 -0
- package/dist/server/server/config.js +305 -0
- package/dist/server/server/demo/config.js +19 -0
- package/dist/server/server/demo/data.js +306 -0
- package/dist/server/server/demo/deps.js +22 -0
- package/dist/server/server/demo/run.js +278 -0
- package/dist/server/server/demo/scan.js +21 -0
- package/dist/server/server/domain/home.js +85 -0
- package/dist/server/server/domain/journal.js +33 -0
- package/dist/server/server/domain/sprint.js +9 -0
- package/dist/server/server/exec.js +12 -0
- package/dist/server/server/git/status.js +45 -0
- package/dist/server/server/github/gh.js +27 -0
- package/dist/server/server/github/labels.js +65 -0
- package/dist/server/server/github/project.js +56 -0
- package/dist/server/server/github/repos.js +17 -0
- package/dist/server/server/github/write.js +91 -0
- package/dist/server/server/guard.js +18 -0
- package/dist/server/server/index.js +9 -0
- package/dist/server/server/launch.js +146 -0
- package/dist/server/server/paths.js +26 -0
- package/dist/server/server/preload.js +30 -0
- package/dist/server/server/projects/remote.js +13 -0
- package/dist/server/server/projects/scan.js +79 -0
- package/dist/server/server/routes/actions.js +89 -0
- package/dist/server/server/routes/autostart.js +21 -0
- package/dist/server/server/routes/detail.js +24 -0
- package/dist/server/server/routes/home.js +64 -0
- package/dist/server/server/routes/launch.js +44 -0
- package/dist/server/server/routes/projects.js +63 -0
- package/dist/server/server/routes/remotes.js +30 -0
- package/dist/server/server/routes/setup.js +114 -0
- package/dist/server/server/routes/write.js +129 -0
- package/dist/server/server/setup/tools.js +37 -0
- package/dist/server/server/skills.js +69 -0
- package/dist/server/server/start.js +160 -0
- package/dist/server/server/static.js +49 -0
- package/dist/server/shared/color.js +59 -0
- package/dist/server/shared/errors.js +84 -0
- package/dist/server/shared/ideas.js +36 -0
- package/dist/server/shared/labels.js +36 -0
- package/dist/server/shared/repoName.js +13 -0
- package/dist/server/shared/themes.js +118 -0
- package/dist/server/shared/tiers.js +15 -0
- package/dist/server/shared/types.js +1 -0
- package/dist/web/assets/Globe-BQOGOJCc.js +4273 -0
- package/dist/web/assets/index-BBiWQTd5.js +11 -0
- package/dist/web/assets/index-CoHzgpbC.css +1 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-600-normal-8K4wrrwR.woff +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-600-normal-EVf6-Yzo.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/dist/web/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-600-normal-H7WoG9Et.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-600-normal-mc2nkWzM.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-600-normal-BfsvjouI.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-600-normal-DObL3zCW.woff +0 -0
- package/dist/web/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/dist/web/assets/jetbrains-mono-vietnamese-600-normal-OWROknRo.woff +0 -0
- package/dist/web/assets/rajdhani-devanagari-500-normal-BPH8g_s8.woff +0 -0
- package/dist/web/assets/rajdhani-devanagari-500-normal-B_DH_jja.woff2 +0 -0
- package/dist/web/assets/rajdhani-devanagari-600-normal-BtY48IV_.woff +0 -0
- package/dist/web/assets/rajdhani-devanagari-600-normal-DhS7ScYx.woff2 +0 -0
- package/dist/web/assets/rajdhani-devanagari-700-normal-BQQOj9BB.woff2 +0 -0
- package/dist/web/assets/rajdhani-devanagari-700-normal-DBRwWuxA.woff +0 -0
- package/dist/web/assets/rajdhani-latin-500-normal-ByNUCHrt.woff2 +0 -0
- package/dist/web/assets/rajdhani-latin-500-normal-DfvNI-Td.woff +0 -0
- package/dist/web/assets/rajdhani-latin-600-normal-CXCVEoA9.woff2 +0 -0
- package/dist/web/assets/rajdhani-latin-600-normal-Dx02qI2_.woff +0 -0
- package/dist/web/assets/rajdhani-latin-700-normal-BPDUZo87.woff2 +0 -0
- package/dist/web/assets/rajdhani-latin-700-normal-e0Uj8ZlN.woff +0 -0
- package/dist/web/assets/rajdhani-latin-ext-500-normal-CyRWJZ5B.woff +0 -0
- package/dist/web/assets/rajdhani-latin-ext-500-normal-DiyUS11w.woff2 +0 -0
- package/dist/web/assets/rajdhani-latin-ext-600-normal-BleIgkPp.woff +0 -0
- package/dist/web/assets/rajdhani-latin-ext-600-normal-C9ZjJQAt.woff2 +0 -0
- package/dist/web/assets/rajdhani-latin-ext-700-normal-BPaQ7tlD.woff +0 -0
- package/dist/web/assets/rajdhani-latin-ext-700-normal-S6aYESQK.woff2 +0 -0
- package/dist/web/index.html +13 -0
- package/package.json +74 -4
- package/scripts/autostart.ps1 +28 -0
- package/scripts/start-hidden.vbs +12 -0
- package/templates/en/CLAUDE.md +18 -0
- package/templates/en/README.md +3 -0
- package/templates/fr/CLAUDE.md +18 -0
- package/templates/fr/README.md +3 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 GNoChance
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.fr.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# HoloHQ
|
|
2
|
+
|
|
3
|
+
**Un cockpit holographique pour tous vos projets GitHub : voyez où en est chacun d'un coup d'œil, reprenez en un clic.**
|
|
4
|
+
|
|
5
|
+
[English](README.md) · [Français](README.fr.md)
|
|
6
|
+
|
|
7
|
+
[](https://github.com/GNoChance/HoloHQ/actions/workflows/ci.yml)
|
|
8
|
+
[](https://www.npmjs.com/package/holohq)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
## Pourquoi
|
|
14
|
+
|
|
15
|
+
Vous travaillez sur beaucoup de dépôts avec Claude Code. Certains sont actifs, d'autres dorment, et vous oubliez où chacun s'est arrêté.
|
|
16
|
+
|
|
17
|
+
HoloHQ affiche tous vos projets sur un seul écran, classés par date de dernière activité. Chacun montre sa prochaine échéance, ce qui demande votre attention et où s'est arrêtée la dernière session. Un clic le rouvre.
|
|
18
|
+
|
|
19
|
+
Tout tourne sur votre machine et lit via `git` et `gh`. Il ne parle qu'à GitHub, avec votre propre connexion `gh`, et n'a aucune télémétrie.
|
|
20
|
+
|
|
21
|
+
## Fonctionnalités
|
|
22
|
+
|
|
23
|
+
- **Globe des projets.** Vos projets tournent sur des orbites selon l'activité : actif (7 jours au plus), récent (7 à 30 jours), en veille (plus de 30 jours). Les plus récents pulsent. Repli sur des orbites SVG sans WebGL.
|
|
24
|
+
- **Reprendre, Échéances, À traiter.** Le dernier projet travaillé, les jalons ouverts, et ce qui vous attend : PR à relire, fichiers non commités, journal manquant.
|
|
25
|
+
- **Page projet.** La dernière session du journal et un anneau de progression du sprint.
|
|
26
|
+
- **Carte des idées.** Une matrice impact/effort de vos idées.
|
|
27
|
+
- **Un clic pour reprendre.** Les boutons « Ouvrir dans Claude » lancent Claude Code sur le projet.
|
|
28
|
+
- **Skills du plugin.** `/holohq:catch-up`, `/holohq:wrap-up` et `/holohq:kickoff` gardent le journal et le plan dans GitHub.
|
|
29
|
+
- **Thèmes.** Holo, Mars, Terminal, Nebula, Day, ou le vôtre, avec un réglage d'effets complets ou discrets.
|
|
30
|
+
- **Anglais et français.**
|
|
31
|
+
|
|
32
|
+

|
|
33
|
+

|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
Prérequis : Node 22 ou plus, `git`, et le [GitHub CLI](https://cli.github.com) connecté. [Claude Code](https://claude.com/claude-code) (`claude`) est facultatif : seuls les boutons « Ouvrir dans Claude » en ont besoin.
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
gh auth login
|
|
42
|
+
npx holohq
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Pour un usage quotidien et le démarrage automatique : `npm i -g holohq`, puis `holohq autostart on`.
|
|
46
|
+
|
|
47
|
+
HoloHQ s'ouvre dans votre navigateur sur `http://localhost:4242` (`127.0.0.1` fonctionne aussi). Un écran Bienvenue vérifie `git`, `gh` et `claude`, détecte votre compte GitHub, et propose vos dossiers de projets et la langue. Il est en lecture seule sur GitHub : labels, journal et jalons ne sont créés que sur votre demande.
|
|
48
|
+
|
|
49
|
+
Pour ajouter les skills de session, dans Claude Code :
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
/plugin marketplace add GNoChance/HoloHQ
|
|
53
|
+
/plugin install holohq@holohq
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Voir [plugin/README.md](plugin/README.md) (en anglais) pour le détail de chaque skill.
|
|
57
|
+
|
|
58
|
+
## Démo
|
|
59
|
+
|
|
60
|
+
Pas encore de projets, ou simple curiosité ?
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
npx holohq --demo
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Le mode démo tourne sur le port 4243 avec des projets fictifs. Il n'appelle jamais `git` ni `gh`, et n'écrit rien. Les données de démo suivent la langue du système ; `--lang en|fr` en impose une.
|
|
67
|
+
|
|
68
|
+
## Configuration
|
|
69
|
+
|
|
70
|
+
Ligne de commande :
|
|
71
|
+
|
|
72
|
+
| Commande | Effet |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `holohq` ou `holohq start` | démarre le serveur et ouvre le navigateur |
|
|
75
|
+
| `--no-open` | n'ouvre pas le navigateur |
|
|
76
|
+
| `--port <n>` | utilise un autre port (4242 par défaut) |
|
|
77
|
+
| `holohq autostart on\|off` | lance HoloHQ tout de suite et à chaque ouverture de session (ou l'arrête) |
|
|
78
|
+
| `holohq convention <owner/repo> [--lang en\|fr]` | met en place la convention de journal sur un dépôt |
|
|
79
|
+
| `holohq config path` | affiche le chemin du fichier de config |
|
|
80
|
+
| `holohq config import <fichier>` | importe une config (validée, fusionnée avec les valeurs par défaut, ancien fichier gardé en `.bak`) |
|
|
81
|
+
| `--version`, `--help` | les classiques |
|
|
82
|
+
|
|
83
|
+
Le fichier de config est créé à l'enregistrement de l'écran Bienvenue :
|
|
84
|
+
|
|
85
|
+
- Windows : `%APPDATA%\holohq\config.json`
|
|
86
|
+
- macOS : `~/Library/Application Support/holohq/config.json`
|
|
87
|
+
- Linux : `$XDG_CONFIG_HOME/holohq/config.json` (sinon `~/.config/holohq/config.json`)
|
|
88
|
+
|
|
89
|
+
Champs principaux :
|
|
90
|
+
|
|
91
|
+
| Champ | Rôle |
|
|
92
|
+
| --- | --- |
|
|
93
|
+
| `owner` | identifiant GitHub (détecté avec `gh api user`) |
|
|
94
|
+
| `projectsRoot` | dossier des nouveaux projets (chemin absolu, l'un des `roots`) |
|
|
95
|
+
| `roots` | dossiers scannés (chemins absolus) |
|
|
96
|
+
| `exclude` | noms de dossier ou chemins absolus ignorés |
|
|
97
|
+
| `language` | `en` ou `fr` |
|
|
98
|
+
| `labelSet` | jeu de labels GitHub créés : `en` ou `fr` |
|
|
99
|
+
| `editorCommand` | exécutable de l'éditeur (`code` par défaut) |
|
|
100
|
+
| `terminal` | exécutable du terminal, ou `null` pour le choix automatique |
|
|
101
|
+
| `skills` | `resume`, `wrapUp`, `kickoff` : noms des skills lancés |
|
|
102
|
+
| `globalSkillsDir` | dossier de vos skills Claude Code globaux (`~/.claude/skills` par défaut) |
|
|
103
|
+
| `port` | port local (4242 par défaut) |
|
|
104
|
+
| `appearance` | thème et niveau d'effets ; un thème personnalisé y est enregistré |
|
|
105
|
+
|
|
106
|
+
Variables d'environnement :
|
|
107
|
+
|
|
108
|
+
- `HOLOHQ_CONFIG` : chemin d'un autre fichier de config.
|
|
109
|
+
- `HOLOHQ_PORT` : force le port pour un lancement (dev, tests, second exemplaire). Jamais enregistré dans le fichier.
|
|
110
|
+
|
|
111
|
+
Le démarrage automatique (`holohq autostart on`) utilise une tâche planifiée sous Windows, un LaunchAgent sous macOS, et un service systemd utilisateur sous Linux (autostart XDG sans `systemctl`, qui ne lance HoloHQ qu'à la prochaine ouverture de session). Relancez `on` si Node ou votre `PATH` change.
|
|
112
|
+
|
|
113
|
+
## Comment ça marche
|
|
114
|
+
|
|
115
|
+
- Un serveur local lié à `127.0.0.1` uniquement, avec contrôle des en-têtes Host et Origin.
|
|
116
|
+
- Il lit via `git` et `gh`. Il ne parle qu'à GitHub, avec votre propre connexion `gh`, et n'a aucune télémétrie.
|
|
117
|
+
- Il n'écrit sur GitHub que sur action explicite.
|
|
118
|
+
- Les skills du plugin n'ont besoin que de `git` et `gh` ; ils demandent avant de créer quoi que ce soit.
|
|
119
|
+
|
|
120
|
+
## Développement
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
npm install
|
|
124
|
+
npm run dev
|
|
125
|
+
npm test
|
|
126
|
+
npm run typecheck
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Lancez l'instance de dev avec ses propres `HOLOHQ_PORT` et `HOLOHQ_CONFIG` pour ne pas entrer en conflit avec celle du quotidien. Voir [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
Non affilié à Anthropic. Claude Code est un produit d'Anthropic.
|
|
134
|
+
|
|
135
|
+
## Licence
|
|
136
|
+
|
|
137
|
+
[MIT](LICENSE)
|
package/README.md
CHANGED
|
@@ -1,3 +1,137 @@
|
|
|
1
|
-
#
|
|
1
|
+
# HoloHQ
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**A holographic cockpit for all your GitHub projects: see where each one stands at a glance, resume in one click.**
|
|
4
|
+
|
|
5
|
+
[English](README.md) · [Français](README.fr.md)
|
|
6
|
+
|
|
7
|
+
[](https://github.com/GNoChance/HoloHQ/actions/workflows/ci.yml)
|
|
8
|
+
[](https://www.npmjs.com/package/holohq)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
## Why
|
|
14
|
+
|
|
15
|
+
You work on many repos with Claude Code. Some are active, some went quiet, and you forget where each one stopped.
|
|
16
|
+
|
|
17
|
+
HoloHQ shows every project on one screen, ordered by how recently you touched it. Each one shows its next deadline, what needs attention and where the last session ended. One click reopens it.
|
|
18
|
+
|
|
19
|
+
It runs on your machine and reads through `git` and `gh`. It talks only to GitHub, through your own `gh` login, and has no telemetry.
|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
- **Project globe.** Your projects orbit by activity: active (7 days or less), recent (7 to 30 days), dormant (over 30 days). The most recent ones pulse. Falls back to SVG orbits without WebGL.
|
|
24
|
+
- **Resume, Deadlines, To do.** The last project you worked on, open milestones, and what needs you: PRs to review, uncommitted files, missing journal.
|
|
25
|
+
- **Project page.** The last session from the journal and a sprint progress ring.
|
|
26
|
+
- **Ideas map.** An impact/effort matrix of your ideas.
|
|
27
|
+
- **One click to resume.** "Open in Claude" buttons launch Claude Code on the project.
|
|
28
|
+
- **Plugin skills.** `/holohq:catch-up`, `/holohq:wrap-up` and `/holohq:kickoff` keep the journal and plan in GitHub.
|
|
29
|
+
- **Themes.** Holo, Mars, Terminal, Nebula, Day, or your own, with a full/subtle effects switch.
|
|
30
|
+
- **English and French.**
|
|
31
|
+
|
|
32
|
+

|
|
33
|
+

|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
Requirements: Node 22 or later, `git`, and the [GitHub CLI](https://cli.github.com) logged in. [Claude Code](https://claude.com/claude-code) (`claude`) is optional: only the "Open in Claude" buttons need it.
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
gh auth login
|
|
42
|
+
npx holohq
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
For daily use and autostart: `npm i -g holohq`, then `holohq autostart on`.
|
|
46
|
+
|
|
47
|
+
HoloHQ opens in your browser at `http://localhost:4242` (`127.0.0.1` works too). A Welcome screen checks `git`, `gh` and `claude`, detects your GitHub account, and proposes your project folders and language. It is read-only on GitHub: labels, journal and milestones are only created when you ask.
|
|
48
|
+
|
|
49
|
+
To add the session skills, in Claude Code:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
/plugin marketplace add GNoChance/HoloHQ
|
|
53
|
+
/plugin install holohq@holohq
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
See [plugin/README.md](plugin/README.md) for what each skill does.
|
|
57
|
+
|
|
58
|
+
## Demo
|
|
59
|
+
|
|
60
|
+
No projects yet, or just curious?
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
npx holohq --demo
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Demo mode runs on port 4243 with fictional projects. It never calls `git` or `gh`, and writes nothing. The demo data follows your system language; `--lang en|fr` forces one.
|
|
67
|
+
|
|
68
|
+
## Configuration
|
|
69
|
+
|
|
70
|
+
CLI:
|
|
71
|
+
|
|
72
|
+
| Command | What it does |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `holohq` or `holohq start` | start the server and open the browser |
|
|
75
|
+
| `--no-open` | do not open the browser |
|
|
76
|
+
| `--port <n>` | use another port (default 4242) |
|
|
77
|
+
| `holohq autostart on\|off` | start HoloHQ now and at every login (or stop doing so) |
|
|
78
|
+
| `holohq convention <owner/repo> [--lang en\|fr]` | set up the journal convention on a repo |
|
|
79
|
+
| `holohq config path` | print the config file path |
|
|
80
|
+
| `holohq config import <file>` | import a config (validated, merged with defaults, old file kept as `.bak`) |
|
|
81
|
+
| `--version`, `--help` | the usual |
|
|
82
|
+
|
|
83
|
+
The config file is created when you save the Welcome screen:
|
|
84
|
+
|
|
85
|
+
- Windows: `%APPDATA%\holohq\config.json`
|
|
86
|
+
- macOS: `~/Library/Application Support/holohq/config.json`
|
|
87
|
+
- Linux: `$XDG_CONFIG_HOME/holohq/config.json` (else `~/.config/holohq/config.json`)
|
|
88
|
+
|
|
89
|
+
Main fields:
|
|
90
|
+
|
|
91
|
+
| Field | Purpose |
|
|
92
|
+
| --- | --- |
|
|
93
|
+
| `owner` | GitHub login (detected with `gh api user`) |
|
|
94
|
+
| `projectsRoot` | folder for new projects (absolute path, one of `roots`) |
|
|
95
|
+
| `roots` | scanned folders (absolute paths) |
|
|
96
|
+
| `exclude` | folder names or absolute paths to ignore |
|
|
97
|
+
| `language` | `en` or `fr` |
|
|
98
|
+
| `labelSet` | GitHub label set to create: `en` or `fr` |
|
|
99
|
+
| `editorCommand` | editor executable (`code` by default) |
|
|
100
|
+
| `terminal` | terminal executable, or `null` for automatic |
|
|
101
|
+
| `skills` | `resume`, `wrapUp`, `kickoff`: names of the skills launched |
|
|
102
|
+
| `globalSkillsDir` | folder of your global Claude Code skills (`~/.claude/skills` by default) |
|
|
103
|
+
| `port` | local port (4242 by default) |
|
|
104
|
+
| `appearance` | theme and effects level; a custom theme is stored here |
|
|
105
|
+
|
|
106
|
+
Environment variables:
|
|
107
|
+
|
|
108
|
+
- `HOLOHQ_CONFIG`: path to another config file.
|
|
109
|
+
- `HOLOHQ_PORT`: force the port for one run (dev, tests, a second instance). Never saved to the file.
|
|
110
|
+
|
|
111
|
+
Autostart (`holohq autostart on`) uses a scheduled task on Windows, a LaunchAgent on macOS, and a systemd user service on Linux (XDG autostart without `systemctl`, which only starts HoloHQ at your next login). Run `on` again if Node or your `PATH` changes.
|
|
112
|
+
|
|
113
|
+
## How it works
|
|
114
|
+
|
|
115
|
+
- A local server bound to `127.0.0.1` only, with Host and Origin checks.
|
|
116
|
+
- It reads through `git` and `gh`. It talks only to GitHub, through your own `gh` login, and has no telemetry.
|
|
117
|
+
- It writes to GitHub only on an explicit action.
|
|
118
|
+
- The plugin skills need only `git` and `gh`; they ask before creating anything.
|
|
119
|
+
|
|
120
|
+
## Development
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
npm install
|
|
124
|
+
npm run dev
|
|
125
|
+
npm test
|
|
126
|
+
npm run typecheck
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Run the dev instance with its own `HOLOHQ_PORT` and `HOLOHQ_CONFIG` so it does not clash with your daily one. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
Not affiliated with Anthropic. Claude Code is a product of Anthropic.
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
[MIT](LICENSE)
|
package/bin/holohq.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync } from 'node:fs'
|
|
3
|
+
import { dirname, join } from 'node:path'
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
5
|
+
|
|
6
|
+
const entry = join(dirname(fileURLToPath(import.meta.url)), '..', 'dist', 'server', 'server', 'cli', 'main.js')
|
|
7
|
+
if (!existsSync(entry)) {
|
|
8
|
+
console.error('HoloHQ is not built: run npm run build')
|
|
9
|
+
process.exit(1)
|
|
10
|
+
}
|
|
11
|
+
const { main, realIo } = await import(pathToFileURL(entry).href)
|
|
12
|
+
process.exit(await main(process.argv.slice(2), realIo()))
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { stat } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { GhError } from '../github/gh.js';
|
|
4
|
+
import { REPO_NAME } from '../../shared/repoName.js';
|
|
5
|
+
export { REPO_NAME };
|
|
6
|
+
export async function exists(p) {
|
|
7
|
+
try {
|
|
8
|
+
await stat(p);
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/** Conflit (409) : le code précise lequel (dossier, dépôt, remote déjà présents). */
|
|
16
|
+
export class Conflict extends Error {
|
|
17
|
+
code;
|
|
18
|
+
vars;
|
|
19
|
+
constructor(message, code = 'conflict', vars) {
|
|
20
|
+
super(message);
|
|
21
|
+
this.code = code;
|
|
22
|
+
this.vars = vars;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** Clone owner/name dans root/name ; Conflict si le dossier existe. */
|
|
26
|
+
export async function cloneRepo(run, owner, name, root) {
|
|
27
|
+
if (!REPO_NAME.test(name))
|
|
28
|
+
throw new RangeError('Invalid repository name');
|
|
29
|
+
const target = join(root, name);
|
|
30
|
+
if (await exists(target))
|
|
31
|
+
throw new Conflict(`Folder ${target} already exists`, 'folderExists', { path: target });
|
|
32
|
+
const r = await run('gh', ['repo', 'clone', `${owner}/${name}`, target]);
|
|
33
|
+
if (r.code !== 0)
|
|
34
|
+
throw new GhError(r.stderr.trim() || 'gh repo clone failed', r.code);
|
|
35
|
+
return target;
|
|
36
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { pkgPath } from '../paths.js';
|
|
4
|
+
import { GhError } from '../github/gh.js';
|
|
5
|
+
import { Conflict, exists } from './clone.js';
|
|
6
|
+
import { createRemote } from './publish.js';
|
|
7
|
+
export { suggestRepoName } from './publish.js';
|
|
8
|
+
const NAME = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
9
|
+
export function isValidNewProjectName(n) {
|
|
10
|
+
return typeof n === 'string' && NAME.test(n);
|
|
11
|
+
}
|
|
12
|
+
async function git(run, cwd, args) {
|
|
13
|
+
const r = await run('git', args, { cwd });
|
|
14
|
+
if (r.code !== 0)
|
|
15
|
+
throw new GhError(r.stderr.trim() || `git ${args[0]} failed`, r.code);
|
|
16
|
+
}
|
|
17
|
+
async function render(lang, file, vars) {
|
|
18
|
+
let t = await readFile(pkgPath('templates', lang, file), 'utf8');
|
|
19
|
+
for (const [k, v] of Object.entries(vars))
|
|
20
|
+
t = t.split(`{{${k}}}`).join(v);
|
|
21
|
+
return t;
|
|
22
|
+
}
|
|
23
|
+
/** Crée dossier + git + dépôt GitHub + convention. Retourne le chemin et le dépôt. */
|
|
24
|
+
export async function createNewProject(run, owner, root, name, isPublic, labelSet, now, opts) {
|
|
25
|
+
const path = join(root, name);
|
|
26
|
+
if (await exists(path))
|
|
27
|
+
throw new Conflict(`Folder ${path} already exists`, 'folderExists', { path });
|
|
28
|
+
const view = await run('gh', ['repo', 'view', `${owner}/${name}`, '--json', 'name']);
|
|
29
|
+
if (view.code === 0)
|
|
30
|
+
throw new Conflict(`Repository ${owner}/${name} already exists`, 'repoExists', { repo: `${owner}/${name}` });
|
|
31
|
+
const vars = { name, date: now.toISOString().slice(0, 10), kickoff: opts.kickoff };
|
|
32
|
+
await mkdir(path, { recursive: true });
|
|
33
|
+
await writeFile(join(path, 'CLAUDE.md'), await render(opts.lang, 'CLAUDE.md', vars), 'utf8');
|
|
34
|
+
await writeFile(join(path, 'README.md'), await render(opts.lang, 'README.md', vars), 'utf8');
|
|
35
|
+
await git(run, path, ['init', '-b', 'main']);
|
|
36
|
+
await git(run, path, ['add', '.']);
|
|
37
|
+
await git(run, path, ['commit', '-m', opts.lang === 'fr' ? 'chore: démarrage du projet' : 'chore: initial commit']);
|
|
38
|
+
const repo = await createRemote(run, owner, name, path, isPublic, labelSet);
|
|
39
|
+
return { path, repo };
|
|
40
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LABEL_SETS } from '../../shared/labels.js';
|
|
2
|
+
import { GhError } from '../github/gh.js';
|
|
3
|
+
import { ensureConvention } from '../github/write.js';
|
|
4
|
+
import { Conflict, REPO_NAME } from './clone.js';
|
|
5
|
+
export { suggestRepoName } from '../../shared/repoName.js';
|
|
6
|
+
/** gh repo create ... --push puis convention (dépôt neuf : jeu de labels de la config). Conflict si un origin existe. */
|
|
7
|
+
export async function createRemote(run, owner, repoName, path, isPublic, labelSet) {
|
|
8
|
+
if (!REPO_NAME.test(repoName))
|
|
9
|
+
throw new RangeError('Invalid repository name');
|
|
10
|
+
const repo = { owner, name: repoName };
|
|
11
|
+
const r = await run('gh', ['repo', 'create', `${owner}/${repoName}`, isPublic ? '--public' : '--private', '--source', path, '--remote', 'origin', '--push']);
|
|
12
|
+
if (r.code !== 0)
|
|
13
|
+
throw new GhError(r.stderr.trim() || 'gh repo create failed', r.code);
|
|
14
|
+
await ensureConvention(run, repo, LABEL_SETS[labelSet]);
|
|
15
|
+
return repo;
|
|
16
|
+
}
|
|
17
|
+
export async function publishProject(run, owner, path, repoName, isPublic, labelSet) {
|
|
18
|
+
const o = await run('git', ['-C', path, 'remote', 'get-url', 'origin']);
|
|
19
|
+
if (o.code === 0)
|
|
20
|
+
throw new Conflict('This project already has an origin remote', 'originExists');
|
|
21
|
+
return createRemote(run, owner, repoName, path, isPublic, labelSet);
|
|
22
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import { errorBody } from '../shared/errors.js';
|
|
3
|
+
import { clearCaches } from './cache.js';
|
|
4
|
+
import { guard } from './guard.js';
|
|
5
|
+
import { register as registerActions } from './routes/actions.js';
|
|
6
|
+
import { register as registerAutostart } from './routes/autostart.js';
|
|
7
|
+
import { register as registerDetail } from './routes/detail.js';
|
|
8
|
+
import { register as registerLaunch } from './routes/launch.js';
|
|
9
|
+
import { register as registerHome } from './routes/home.js';
|
|
10
|
+
import { register as registerProjects } from './routes/projects.js';
|
|
11
|
+
import { register as registerRemotes } from './routes/remotes.js';
|
|
12
|
+
import { register as registerSetup } from './routes/setup.js';
|
|
13
|
+
import { register as registerWrite } from './routes/write.js';
|
|
14
|
+
/** Démo : seules les lectures (GET, HEAD) et /api/refresh (vidage du cache) passent. */
|
|
15
|
+
const blockWrites = async (c, next) => {
|
|
16
|
+
const read = c.req.method === 'GET' || c.req.method === 'HEAD';
|
|
17
|
+
if (!read && c.req.path !== '/api/refresh')
|
|
18
|
+
return c.json(errorBody('demoMode'), 403);
|
|
19
|
+
await next();
|
|
20
|
+
};
|
|
21
|
+
export function createApp(deps) {
|
|
22
|
+
const app = new Hono();
|
|
23
|
+
app.use('*', guard(deps.config));
|
|
24
|
+
if (deps.demo)
|
|
25
|
+
app.use('*', blockWrites);
|
|
26
|
+
// `app` et `demo` : la sonde du démarrage reconnaît une instance HoloHQ et son mode.
|
|
27
|
+
app.get('/api/health', (c) => c.json({ ok: true, app: 'holohq', demo: deps.demo === true }));
|
|
28
|
+
app.post('/api/refresh', (c) => {
|
|
29
|
+
clearCaches();
|
|
30
|
+
return c.json({ ok: true });
|
|
31
|
+
});
|
|
32
|
+
registerSetup(app, deps);
|
|
33
|
+
registerAutostart(app, deps);
|
|
34
|
+
registerProjects(app, deps);
|
|
35
|
+
registerDetail(app, deps);
|
|
36
|
+
registerRemotes(app, deps);
|
|
37
|
+
registerHome(app, deps);
|
|
38
|
+
registerLaunch(app, deps);
|
|
39
|
+
registerWrite(app, deps);
|
|
40
|
+
registerActions(app, deps);
|
|
41
|
+
return app;
|
|
42
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { posix, win32 } from 'node:path';
|
|
2
|
+
export const WINDOWS_TASK = 'HoloHQ';
|
|
3
|
+
const LABEL = 'dev.holohq';
|
|
4
|
+
const SAFE = /^[A-Za-z0-9_\-./:@+=,]+$/;
|
|
5
|
+
function xml(s) {
|
|
6
|
+
return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
|
|
7
|
+
}
|
|
8
|
+
function noControl(s) {
|
|
9
|
+
if (/[\x00-\x1f]/.test(s))
|
|
10
|
+
throw new Error(`Path refused (control character): ${JSON.stringify(s)}`);
|
|
11
|
+
return s;
|
|
12
|
+
}
|
|
13
|
+
/** Argument d'une ligne ExecStart= de systemd : % et $ doublés, guillemets si nécessaire. */
|
|
14
|
+
function systemdArg(s) {
|
|
15
|
+
const v = noControl(s).replace(/%/g, '%%').replace(/\$/g, '$$$$');
|
|
16
|
+
return SAFE.test(s) ? v : `"${v.replace(/[\\"]/g, m => '\\' + m)}"`;
|
|
17
|
+
}
|
|
18
|
+
/** Valeur d'une ligne Environment="…" de systemd : % doublé (spécificateurs), \ et " échappés ; $ n'y est pas développé. */
|
|
19
|
+
function systemdEnvValue(s) {
|
|
20
|
+
return noControl(s).replace(/%/g, '%%').replace(/[\\"]/g, m => '\\' + m);
|
|
21
|
+
}
|
|
22
|
+
/** Argument d'une ligne Exec= d'un .desktop (spec Desktop Entry). */
|
|
23
|
+
function desktopArg(s) {
|
|
24
|
+
noControl(s);
|
|
25
|
+
if (SAFE.test(s))
|
|
26
|
+
return s;
|
|
27
|
+
const quoted = s.replace(/[\\"`$]/g, m => '\\' + m).replace(/%/g, '%%');
|
|
28
|
+
return `"${quoted}"`.replace(/\\/g, m => m + m);
|
|
29
|
+
}
|
|
30
|
+
export function autostartPlan(platform, ctx) {
|
|
31
|
+
const { node, entry, home, env } = ctx;
|
|
32
|
+
if (platform === 'win32') {
|
|
33
|
+
const script = win32.join(ctx.pkg ?? '', 'scripts', 'autostart.ps1');
|
|
34
|
+
const base = ['-ExecutionPolicy', 'Bypass', '-File', script];
|
|
35
|
+
return {
|
|
36
|
+
files: [],
|
|
37
|
+
commands: [{ cmd: 'powershell', args: [...base, '-Install', '-TaskName', WINDOWS_TASK, '-Node', node, '-Entry', entry] }],
|
|
38
|
+
start: [{ cmd: 'schtasks', args: ['/Run', '/TN', WINDOWS_TASK] }],
|
|
39
|
+
remove: { files: [], commands: [{ cmd: 'powershell', args: [...base, '-Remove', '-TaskName', WINDOWS_TASK] }] },
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
// launchd et systemd démarrent le serveur avec un PATH minimal (gh, code, claude introuvables) :
|
|
43
|
+
// on fige celui du shell qui lance `autostart on`.
|
|
44
|
+
const shellPath = env.PATH ? noControl(env.PATH) : null;
|
|
45
|
+
if (platform === 'darwin') {
|
|
46
|
+
const path = posix.join(home, 'Library', 'LaunchAgents', `${LABEL}.plist`);
|
|
47
|
+
const envVars = shellPath === null
|
|
48
|
+
? ''
|
|
49
|
+
: ` <key>EnvironmentVariables</key>
|
|
50
|
+
<dict>
|
|
51
|
+
<key>PATH</key>
|
|
52
|
+
<string>${xml(shellPath)}</string>
|
|
53
|
+
</dict>
|
|
54
|
+
`;
|
|
55
|
+
const content = `<?xml version="1.0" encoding="UTF-8"?>
|
|
56
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
57
|
+
<plist version="1.0">
|
|
58
|
+
<dict>
|
|
59
|
+
<key>Label</key>
|
|
60
|
+
<string>${LABEL}</string>
|
|
61
|
+
<key>ProgramArguments</key>
|
|
62
|
+
<array>
|
|
63
|
+
<string>${xml(node)}</string>
|
|
64
|
+
<string>${xml(entry)}</string>
|
|
65
|
+
</array>
|
|
66
|
+
<key>RunAtLoad</key>
|
|
67
|
+
<true/>
|
|
68
|
+
${envVars}</dict>
|
|
69
|
+
</plist>
|
|
70
|
+
`;
|
|
71
|
+
return {
|
|
72
|
+
files: [{ path, content }],
|
|
73
|
+
commands: [{ cmd: 'launchctl', args: ['load', '-w', path] }],
|
|
74
|
+
start: [],
|
|
75
|
+
remove: { files: [path], commands: [{ cmd: 'launchctl', args: ['unload', path] }] },
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const cfg = env.XDG_CONFIG_HOME || posix.join(home, '.config');
|
|
79
|
+
const service = posix.join(cfg, 'systemd', 'user', 'holohq.service');
|
|
80
|
+
const desktop = posix.join(cfg, 'autostart', 'holohq.desktop');
|
|
81
|
+
const envLine = shellPath === null ? '' : `Environment="PATH=${systemdEnvValue(shellPath)}"\n`;
|
|
82
|
+
return {
|
|
83
|
+
files: [
|
|
84
|
+
{
|
|
85
|
+
path: service,
|
|
86
|
+
// Lié à la session graphique : DISPLAY, WAYLAND_DISPLAY et DBus y sont définis (ouverture du terminal, de l'éditeur).
|
|
87
|
+
content: `[Unit]
|
|
88
|
+
Description=HoloHQ
|
|
89
|
+
After=graphical-session.target
|
|
90
|
+
PartOf=graphical-session.target
|
|
91
|
+
|
|
92
|
+
[Service]
|
|
93
|
+
${envLine}ExecStart=${systemdArg(node)} ${systemdArg(entry)}
|
|
94
|
+
Restart=on-failure
|
|
95
|
+
|
|
96
|
+
[Install]
|
|
97
|
+
WantedBy=graphical-session.target
|
|
98
|
+
`,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
path: desktop,
|
|
102
|
+
content: `[Desktop Entry]
|
|
103
|
+
Type=Application
|
|
104
|
+
Name=HoloHQ
|
|
105
|
+
Exec=${desktopArg(node)} ${desktopArg(entry)}
|
|
106
|
+
Terminal=false
|
|
107
|
+
`,
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
commands: [{ cmd: 'systemctl', args: ['--user', 'enable', '--now', 'holohq.service'] }],
|
|
111
|
+
start: [],
|
|
112
|
+
remove: { files: [service, desktop], commands: [{ cmd: 'systemctl', args: ['--user', 'disable', '--now', 'holohq.service'] }] },
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/** Linux : avec systemctl on garde le service, sinon seulement le .desktop de secours. */
|
|
116
|
+
export function forSystemd(plan, hasSystemctl) {
|
|
117
|
+
const isDesktop = (p) => p.endsWith('.desktop');
|
|
118
|
+
if (hasSystemctl) {
|
|
119
|
+
return { ...plan, files: plan.files.filter(f => !isDesktop(f.path)) };
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
files: plan.files.filter(f => isDesktop(f.path)),
|
|
123
|
+
commands: [],
|
|
124
|
+
start: [],
|
|
125
|
+
remove: { files: plan.remove.files, commands: [] },
|
|
126
|
+
};
|
|
127
|
+
}
|