@gitpagedocs/cli 0.0.7 → 0.0.8

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.
@@ -1,21 +1,49 @@
1
1
  /** Build route objects for md, html, and video content types */
2
2
 
3
+ /** Title/description styling every content route starts from (key order is part of the output). */
4
+ const ROUTE_TEXT_DEFAULTS = {
5
+ titleCss: "font-size: 1.85rem; font-weight: 700;",
6
+ titleDarkCss: "font-size: 1.85rem; font-weight: 700; color: var(--text);",
7
+ titleLightCss: "font-size: 1.85rem; font-weight: 700; color: var(--text);",
8
+ titlePosition: "center",
9
+ titleIsVisible: true,
10
+ descriptionCss: "font-size: 1.2rem; font-weight: 500;",
11
+ descriptionDarkCss: "font-size: 1.2rem; font-weight: 500; color: var(--text-secondary);",
12
+ descriptionLightCss: "font-size: 1.2rem; font-weight: 500; color: var(--text-secondary);",
13
+ descriptionPosition: "center",
14
+ descriptionIsVisible: true,
15
+ };
16
+
17
+ /** Container frame settings every content route starts from. */
18
+ const ROUTE_FRAME_DEFAULTS = {
19
+ fullscreenEnabled: true,
20
+ marginTop: "",
21
+ marginBottom: "",
22
+ blockLink: true,
23
+ };
24
+
25
+ /** Each default key, taking the option value when it is set. */
26
+ function withDefaults(defaults, options) {
27
+ return Object.fromEntries(
28
+ Object.entries(defaults).map(([key, value]) => [key, options[key] === undefined ? value : options[key]]),
29
+ );
30
+ }
31
+
32
+ /** A single value becomes the same value for every language. */
33
+ function perLanguage(value) {
34
+ return typeof value === "string" ? { pt: value, en: value, es: value } : value;
35
+ }
36
+
37
+ /** Copies only the fields that are set. */
38
+ function assignDefined(target, fields) {
39
+ for (const [key, value] of Object.entries(fields)) {
40
+ if (value !== undefined) target[key] = value;
41
+ }
42
+ return target;
43
+ }
44
+
3
45
  export function buildMdRoute(versionId, routeId, pathByLang, titles, descriptions, options = {}) {
4
46
  const {
5
- titleCss = "font-size: 1.85rem; font-weight: 700;",
6
- titleDarkCss = "font-size: 1.85rem; font-weight: 700; color: var(--text);",
7
- titleLightCss = "font-size: 1.85rem; font-weight: 700; color: var(--text);",
8
- titlePosition = "center",
9
- titleIsVisible = true,
10
- descriptionCss = "font-size: 1.2rem; font-weight: 500;",
11
- descriptionDarkCss = "font-size: 1.2rem; font-weight: 500; color: var(--text-secondary);",
12
- descriptionLightCss = "font-size: 1.2rem; font-weight: 500; color: var(--text-secondary);",
13
- descriptionPosition = "center",
14
- descriptionIsVisible = true,
15
- fullscreenEnabled = true,
16
- marginTop = "",
17
- marginBottom = "",
18
- blockLink = true,
19
47
  container,
20
48
  browseAll = false,
21
49
  RouteguideBrand = true,
@@ -24,26 +52,15 @@ export function buildMdRoute(versionId, routeId, pathByLang, titles, description
24
52
  RouteguideBrandContainerTop = false,
25
53
  audio,
26
54
  authorization,
55
+ hierarchyPage,
27
56
  } = options;
28
57
  const out = {
29
58
  id: routeId,
30
59
  title: titles ?? { pt: "Documentação", en: "Documentation", es: "Documentación" },
31
60
  description: descriptions ?? { pt: "Descrição da página", en: "Page description", es: "Descripción de la página" },
32
- titleCss,
33
- titleDarkCss,
34
- titleLightCss,
35
- titlePosition,
36
- titleIsVisible,
37
- descriptionCss,
38
- descriptionDarkCss,
39
- descriptionLightCss,
40
- descriptionPosition,
41
- descriptionIsVisible,
61
+ ...withDefaults(ROUTE_TEXT_DEFAULTS, options),
42
62
  path: pathByLang,
43
- fullscreenEnabled,
44
- marginTop,
45
- marginBottom,
46
- blockLink,
63
+ ...withDefaults(ROUTE_FRAME_DEFAULTS, options),
47
64
  container,
48
65
  browseAll,
49
66
  RouteguideBrand,
@@ -51,10 +68,7 @@ export function buildMdRoute(versionId, routeId, pathByLang, titles, description
51
68
  RouteguideBrandPosition,
52
69
  RouteguideBrandContainerTop,
53
70
  };
54
- if (container !== undefined) out.container = container;
55
- if (audio !== undefined) out.audio = audio;
56
- if (authorization !== undefined) out.authorization = authorization;
57
- return out;
71
+ return assignDefined(out, { container, audio, authorization, hierarchyPage });
58
72
  }
59
73
 
60
74
  export function buildHtmlRoute(versionId, routeId, pathByLang, titles, descriptions, options = {}) {
@@ -63,61 +77,25 @@ export function buildHtmlRoute(versionId, routeId, pathByLang, titles, descripti
63
77
  }
64
78
 
65
79
  export function buildVideoRoute(versionId, routeId, videoType, pathVideo, titles, descriptions, options = {}) {
66
- const {
67
- titleCss = "font-size: 1.85rem; font-weight: 700;",
68
- titleDarkCss = "font-size: 1.85rem; font-weight: 700; color: var(--text);",
69
- titleLightCss = "font-size: 1.85rem; font-weight: 700; color: var(--text);",
70
- titlePosition = "center",
71
- titleIsVisible = true,
72
- descriptionCss = "font-size: 1.2rem; font-weight: 500;",
73
- descriptionDarkCss = "font-size: 1.2rem; font-weight: 500; color: var(--text-secondary);",
74
- descriptionLightCss = "font-size: 1.2rem; font-weight: 500; color: var(--text-secondary);",
75
- descriptionPosition = "center",
76
- descriptionIsVisible = true,
77
- fullscreenEnabled = true,
78
- marginTop = "",
79
- marginBottom = "",
80
- blockLink = true,
81
- container,
82
- browseAll = false,
83
- authorization,
84
- } = options;
85
- const videoTypeByLang = typeof videoType === "string" ? { pt: videoType, en: videoType, es: videoType } : videoType;
86
- const pathVideoByLang = typeof pathVideo === "string" ? { pt: pathVideo, en: pathVideo, es: pathVideo } : pathVideo;
80
+ const { container, browseAll = false, authorization } = options;
87
81
  const obj = {
88
82
  id: routeId,
89
83
  title: titles ?? { pt: "Vídeo", en: "Video", es: "Vídeo" },
90
84
  description: descriptions ?? { pt: "Descrição do vídeo", en: "Video description", es: "Descripción del vídeo" },
91
- titleCss,
92
- titleDarkCss,
93
- titleLightCss,
94
- titlePosition,
95
- titleIsVisible,
96
- descriptionCss,
97
- descriptionDarkCss,
98
- descriptionLightCss,
99
- descriptionPosition,
100
- descriptionIsVisible,
101
- fullscreenEnabled,
102
- marginTop,
103
- marginBottom,
104
- blockLink,
85
+ ...withDefaults(ROUTE_TEXT_DEFAULTS, options),
86
+ ...withDefaults(ROUTE_FRAME_DEFAULTS, options),
105
87
  browseAll,
106
- video: { videoType: videoTypeByLang, pathVideo: pathVideoByLang },
88
+ video: { videoType: perLanguage(videoType), pathVideo: perLanguage(pathVideo) },
107
89
  };
108
- if (container !== undefined) obj.container = container;
109
- if (authorization !== undefined) obj.authorization = authorization;
110
- return obj;
90
+ return assignDefined(obj, { container, authorization });
111
91
  }
112
92
 
113
93
  export function buildAudioRoute(versionId, routeId, audioType, pathAudio, titles, descriptions, options = {}) {
114
94
  const base = buildVideoRoute(versionId, routeId, audioType, pathAudio, titles, descriptions, options);
115
- const audioTypeByLang = typeof audioType === "string" ? { pt: audioType, en: audioType, es: audioType } : audioType;
116
- const pathAudioByLang = typeof pathAudio === "string" ? { pt: pathAudio, en: pathAudio, es: pathAudio } : pathAudio;
117
95
  const { video, ...rest } = base;
118
96
  return {
119
97
  ...rest,
120
- audio: { audioType: audioTypeByLang, pathAudio: pathAudioByLang },
98
+ audio: { audioType: perLanguage(audioType), pathAudio: perLanguage(pathAudio) },
121
99
  };
122
100
  }
123
101
 
@@ -20,6 +20,7 @@ import {
20
20
  AUDIO_META_ID12,
21
21
  SOURCE_VIEWER_META,
22
22
  DEFAULT_HIERARCHY,
23
+ VIDEO_FIRST_HIERARCHY,
23
24
  } from "../data/route-metas.mjs";
24
25
  import { buildAudioRoute, buildMdRoute, buildSourceViewerRoute, buildVideoRoute } from "./route-builders.mjs";
25
26
  import { resolveSourceViewerPath } from "./project-links.mjs";
@@ -35,6 +36,14 @@ const VIDEO_ROUTE_AUTHORIZATION = {
35
36
  requireExternalAuth: true,
36
37
  allowedProviders: EXTERNAL_AUTH_PROVIDERS,
37
38
  };
39
+ /** Video route left open so the scaffold always shows a playable video (GitHub's introduction to Git). */
40
+ const PUBLIC_VIDEO_ROUTE_ID = 11;
41
+ /** Video routes follow the six markdown pages and the source viewer (ids 8-11). */
42
+ const VIDEO_ROUTE_ID_OFFSET = 7;
43
+ /** Markdown page that also shows the public video, in a video container above its text. */
44
+ const VIDEO_PAGE_ROUTE_ID = 5;
45
+ /** VIDEO_IDS / VIDEO_METAS entry of the public video (GitHub's introduction to Git). */
46
+ const PUBLIC_VIDEO_INDEX = PUBLIC_VIDEO_ROUTE_ID - VIDEO_ROUTE_ID_OFFSET;
38
47
 
39
48
  const ROUTE_METAS = {
40
49
  1: ROUTE_META_ID1,
@@ -58,6 +67,7 @@ function buildVersionMdRoutes(versionId, includeDemoAuthorization) {
58
67
  };
59
68
  const routeOptions = {
60
69
  ...(id === 2 ? { audio: PAGE2_AUDIO } : {}),
70
+ ...(id === VIDEO_PAGE_ROUTE_ID ? { hierarchyPage: VIDEO_FIRST_HIERARCHY } : {}),
61
71
  ...(includeDemoAuthorization && id === 3
62
72
  ? { authorization: { requiredRoles: [MAINTAINER_ROLE] } }
63
73
  : {}),
@@ -76,18 +86,33 @@ function buildVersionMdRoutes(versionId, includeDemoAuthorization) {
76
86
  });
77
87
  }
78
88
 
89
+ /** Video container shown on the markdown page VIDEO_PAGE_ROUTE_ID (no menu entry of its own). */
90
+ function buildPageVideoRoute(versionId) {
91
+ return buildVideoRoute(
92
+ versionId,
93
+ VIDEO_PAGE_ROUTE_ID,
94
+ "youtube",
95
+ VIDEO_IDS[PUBLIC_VIDEO_INDEX - 1],
96
+ VIDEO_METAS[PUBLIC_VIDEO_INDEX].title,
97
+ VIDEO_METAS[PUBLIC_VIDEO_INDEX].description,
98
+ );
99
+ }
100
+
79
101
  function buildVersionVideoRoutes(versionId, includeDemoAuthorization) {
80
- return [1, 2, 3, 4].map((id) =>
81
- buildVideoRoute(
102
+ const menuVideoRoutes = [1, 2, 3, 4].map((id) => {
103
+ const routeId = id + VIDEO_ROUTE_ID_OFFSET;
104
+ const isGuarded = includeDemoAuthorization && routeId !== PUBLIC_VIDEO_ROUTE_ID;
105
+ return buildVideoRoute(
82
106
  versionId,
83
- id + 7,
107
+ routeId,
84
108
  "youtube",
85
109
  VIDEO_IDS[id - 1],
86
110
  VIDEO_METAS[id].title,
87
111
  VIDEO_METAS[id].description,
88
- includeDemoAuthorization ? { authorization: VIDEO_ROUTE_AUTHORIZATION } : {},
89
- )
90
- );
112
+ isGuarded ? { authorization: VIDEO_ROUTE_AUTHORIZATION } : {},
113
+ );
114
+ });
115
+ return [buildPageVideoRoute(versionId), ...menuVideoRoutes];
91
116
  }
92
117
 
93
118
  function buildVersionAudioRoutes(versionId) {
@@ -122,12 +147,15 @@ function buildVersionMenus(versionId) {
122
147
  en: { title: ROUTE_METAS[id].titles.en, "path-click": `${base}/en/${ROUTE_PATHS[id].en}` },
123
148
  es: { title: ROUTE_METAS[id].titles.es, "path-click": `${base}/es/${ROUTE_PATHS[id].es}` },
124
149
  }));
125
- const menuVideo = [1, 2, 3, 4].map((id) => ({
126
- id: id + 7,
127
- pt: { title: `${VIDEO_METAS[id].title.pt.slice(0, 40)}...`, "path-click": `page:${id + 7}` },
128
- en: { title: `${VIDEO_METAS[id].title.en.slice(0, 40)}...`, "path-click": `page:${id + 7}` },
129
- es: { title: `${VIDEO_METAS[id].title.es.slice(0, 40)}...`, "path-click": `page:${id + 7}` },
130
- }));
150
+ const menuVideo = [1, 2, 3, 4].map((id) => {
151
+ const routeId = id + VIDEO_ROUTE_ID_OFFSET;
152
+ return {
153
+ id: routeId,
154
+ pt: { title: `${VIDEO_METAS[id].title.pt.slice(0, 40)}...`, "path-click": `page:${routeId}` },
155
+ en: { title: `${VIDEO_METAS[id].title.en.slice(0, 40)}...`, "path-click": `page:${routeId}` },
156
+ es: { title: `${VIDEO_METAS[id].title.es.slice(0, 40)}...`, "path-click": `page:${routeId}` },
157
+ };
158
+ });
131
159
  const menuAudio = [
132
160
  {
133
161
  id: AUDIO_META_ID12.id,
@@ -102,7 +102,7 @@ Git Page Docs is a **pnpm + turborepo monorepo** that turns a repository's \`git
102
102
  - 14-provider AI system (OpenAI, Anthropic, Gemini, Ollama, Mistral, DeepSeek, Cohere, Groq, xAI, and more) with streaming
103
103
  - AI API keys stored **encrypted at rest** (AES-256-GCM) behind a local password gate — never plaintext
104
104
  - In-docs **AI chat drawer** plus a dedicated **\`/ai\` console**
105
- - 36-theme layout system; local and GitHub Pages execution modes
105
+ - 64-theme layout system (dark and light variants); local and GitHub Pages execution modes
106
106
  `,
107
107
  functionalities: `# Functionalities
108
108
 
@@ -119,10 +119,13 @@ Complete reference of CLI options, configuration keys, and runtime features.
119
119
  | \`gitpagedocs --interactive\` / \`-i\` | Interactive mode with prompts (the default in a terminal) |
120
120
  | \`gitpagedocs --no-interactive\` / \`--yes\` / \`-y\` | Never prompt; use flags and defaults |
121
121
  | \`gitpagedocs ai\` | Interactive AI documentation generator |
122
+ | \`gitpagedocs chat [question]\` | Streaming AI chat in the terminal (REPL on a TTY; one-shot with a question or piped stdin) |
122
123
  | \`gitpagedocs provider [id]\` / \`models [provider]\` | List AI providers / catalog models |
123
124
  | \`gitpagedocs document[:repo\\|:file\\|:folder]\` | Generate documentation with AI |
124
125
  | \`gitpagedocs deploy\` / \`pages [actions\\|deploy]\` | Configure GitHub Pages via Actions + push |
125
126
  | \`gitpagedocs docs\` | Refresh README/CONTRIBUTING/SECURITY managed regions |
127
+ | \`gitpagedocs password\` | Set a documentation access password (public key in \`site.docsAccess\`) |
128
+ | \`gitpagedocs config\` / \`config clear\` | Show the resolved config / delete the stored config and key vault |
126
129
  | \`gitpagedocs doctor\` / \`version\` / \`update\` | Diagnostics / version / registry update check |
127
130
  | \`gitpagedocs mcp start\` | Start the MCP server over stdio |
128
131
 
@@ -140,6 +143,7 @@ Install globally with \`npm install -g @gitpagedocs/cli\`, or run one-off with \
140
143
  | \`--layoutconfig\` | Generate local layouts in \`gitpagelayouts/\` |
141
144
  | \`--layouts-dir <dir>\` | Folder for local layouts (default: \`gitpagelayouts\`) |
142
145
  | \`--push\` | Create workflow, commit artifacts, push |
146
+ | \`--pages-actions\` | Only switch GitHub Pages to GitHub Actions (same as \`pages actions\`) |
143
147
  | \`--home\` | Generate \`gitpagedocshome/\` (static + .env + Dockerfile) |
144
148
 
145
149
  ## Generated output
@@ -177,6 +181,12 @@ The version config can render a **Source code** container through \`routes-sourc
177
181
  - \`ProjectLink\`, \`layoutsConfigPathOficial\`, \`layoutsConfigPath\`
178
182
  - Languages: \`site.languages\` (enable/disable each one); UI strings: \`gitpagedocs/langs/<lang>.json\`
179
183
 
184
+ ## Media playback (one sound at a time)
185
+
186
+ \`site.mediaExclusivePlayback\` (default \`true\`): playing a route video pauses the radio and the audio tracks, and playing the radio or an audio track pauses the video. It works with YouTube and Vimeo (through their player APIs), native files (\`mp4\`, \`webm\`, …) and any other embed.
187
+
188
+ To show a video without sound while the radio or an audio track explains it, set \`"muted": true\` in that route's \`video\` object: the video plays only the picture and stays out of the rule. \`"mediaExclusivePlayback": false\` turns the rule off for the whole site.
189
+
180
190
  ## Environment variables
181
191
 
182
192
  - \`GITPAGEDOCS_REPOSITORY_SEARCH\` – repository search (local)
@@ -95,7 +95,7 @@ Git Page Docs es un monorepo pnpm + turborepo que convierte la carpeta \`gitpage
95
95
  - Sistema de IA con 14 proveedores (OpenAI, Anthropic, Gemini, Ollama, Mistral, DeepSeek, Cohere, Groq, xAI y mas) con streaming
96
96
  - Claves de IA **cifradas en reposo** (AES-256-GCM) detras de una contrasena local — nunca en texto plano
97
97
  - **Panel de chat de IA** en los docs + una **consola \`/ai\`** dedicada
98
- - Sistema de 36 temas; ejecucion local y en GitHub Pages
98
+ - Sistema de 64 temas (variantes oscuras y claras); ejecucion local y en GitHub Pages
99
99
  `,
100
100
  functionalities: `# Funcionalidades
101
101
 
@@ -110,7 +110,19 @@ Referencia completa de opciones CLI, claves de configuracion y funciones del run
110
110
  | \`npx @gitpagedocs/cli --home\` | Distribucion standalone (\`gitpagedocshome/\`) |
111
111
  | \`npx @gitpagedocs/cli --push --owner X --repo Y\` | Configura workflow, commit, push |
112
112
  | \`npx @gitpagedocs/cli --interactive\` / \`-i\` | Modo interactivo con prompts (por defecto en una terminal) |
113
- | \`npx @gitpagedocs/cli --no-interactive\` / \`-y\` | Nunca pregunta; usa flags y valores por defecto |
113
+ | \`npx @gitpagedocs/cli --no-interactive\` / \`--yes\` / \`-y\` | Nunca pregunta; usa flags y valores por defecto |
114
+ | \`gitpagedocs ai\` | Generador interactivo de documentacion con IA |
115
+ | \`gitpagedocs chat [pregunta]\` | Chat de IA con streaming en la terminal (REPL en TTY; respuesta unica con pregunta o stdin) |
116
+ | \`gitpagedocs provider [id]\` / \`models [provider]\` | Lista proveedores de IA / modelos del catalogo |
117
+ | \`gitpagedocs document[:repo\\|:file\\|:folder]\` | Genera documentacion con IA |
118
+ | \`gitpagedocs deploy\` / \`pages [actions\\|deploy]\` | Configura GitHub Pages via Actions + push |
119
+ | \`gitpagedocs docs\` | Actualiza las regiones gestionadas de README/CONTRIBUTING/SECURITY |
120
+ | \`gitpagedocs password\` | Define la contrasena de acceso a la documentacion (clave publica en \`site.docsAccess\`) |
121
+ | \`gitpagedocs config\` / \`config clear\` | Muestra la config resuelta / borra la config guardada y la boveda de claves |
122
+ | \`gitpagedocs doctor\` / \`version\` / \`update\` | Diagnostico / version / comprobacion de actualizacion en el registro |
123
+ | \`gitpagedocs mcp start\` | Inicia el servidor MCP por stdio |
124
+
125
+ Instala globalmente con \`npm install -g @gitpagedocs/cli\` o ejecuta sin instalar con \`npx @gitpagedocs/cli\`.
114
126
 
115
127
  ## Opciones CLI
116
128
 
@@ -124,6 +136,7 @@ Referencia completa de opciones CLI, claves de configuracion y funciones del run
124
136
  | \`--layoutconfig\` | Genera layouts locales en \`gitpagelayouts/\` |
125
137
  | \`--layouts-dir <dir>\` | Carpeta de layouts locales (por defecto: \`gitpagelayouts\`) |
126
138
  | \`--push\` | Crea workflow, commit de artefactos, push |
139
+ | \`--pages-actions\` | Solo cambia la fuente de GitHub Pages a GitHub Actions (igual que \`pages actions\`) |
127
140
  | \`--home\` | Genera \`gitpagedocshome/\` (estatico + .env + Dockerfile) |
128
141
 
129
142
  ## Salida generada
@@ -161,6 +174,12 @@ El config de version puede renderizar un contenedor **Codigo fuente** via \`rout
161
174
  - \`ProjectLink\`, \`layoutsConfigPathOficial\`, \`layoutsConfigPath\`
162
175
  - Idiomas: \`site.languages\` (activa/desactiva cada uno); textos de la UI: \`gitpagedocs/langs/<lang>.json\`
163
176
 
177
+ ## Reproduccion de medios (un sonido a la vez)
178
+
179
+ \`site.mediaExclusivePlayback\` (por defecto \`true\`): reproducir un video de ruta pausa la radio y las pistas de audio, y reproducir la radio o una pista de audio pausa el video. Funciona con YouTube y Vimeo (mediante las APIs de sus reproductores), archivos nativos (\`mp4\`, \`webm\`, …) y cualquier otro embed.
180
+
181
+ Para mostrar un video sin sonido mientras la radio o una pista de audio lo explica, usa \`"muted": true\` en el objeto \`video\` de la ruta: el video reproduce solo la imagen y queda fuera de la regla. \`"mediaExclusivePlayback": false\` desactiva la regla en todo el sitio.
182
+
164
183
  ## Variables de entorno
165
184
 
166
185
  - \`GITPAGEDOCS_REPOSITORY_SEARCH\` – busqueda de repositorio (local)
@@ -95,7 +95,7 @@ Git Page Docs e um monorepo pnpm + turborepo que transforma a pasta \`gitpagedoc
95
95
  - Sistema de IA com 14 provedores (OpenAI, Anthropic, Gemini, Ollama, Mistral, DeepSeek, Cohere, Groq, xAI e mais) com streaming
96
96
  - Chaves de IA **criptografadas em repouso** (AES-256-GCM) atras de uma senha local — nunca em texto puro
97
97
  - **Drawer de chat de IA** nos docs + um **console \`/ai\`** dedicado
98
- - Sistema de 36 temas; execucao local e no GitHub Pages
98
+ - Sistema de 64 temas (variantes escuras e claras); execucao local e no GitHub Pages
99
99
  `,
100
100
  functionalities: `# Funcionalidades
101
101
 
@@ -110,7 +110,19 @@ Referencia completa de opcoes da CLI, chaves de configuracao e recursos do runti
110
110
  | \`npx @gitpagedocs/cli --home\` | Distribuicao standalone (\`gitpagedocshome/\`) |
111
111
  | \`npx @gitpagedocs/cli --push --owner X --repo Y\` | Configura workflow, commit, push |
112
112
  | \`npx @gitpagedocs/cli --interactive\` / \`-i\` | Modo interativo com prompts (padrao em um terminal) |
113
- | \`npx @gitpagedocs/cli --no-interactive\` / \`-y\` | Nunca pergunta; usa flags e padroes |
113
+ | \`npx @gitpagedocs/cli --no-interactive\` / \`--yes\` / \`-y\` | Nunca pergunta; usa flags e padroes |
114
+ | \`gitpagedocs ai\` | Gerador interativo de documentacao com IA |
115
+ | \`gitpagedocs chat [pergunta]\` | Chat de IA com streaming no terminal (REPL em TTY; resposta unica com pergunta ou stdin) |
116
+ | \`gitpagedocs provider [id]\` / \`models [provider]\` | Lista provedores de IA / modelos do catalogo |
117
+ | \`gitpagedocs document[:repo\\|:file\\|:folder]\` | Gera documentacao com IA |
118
+ | \`gitpagedocs deploy\` / \`pages [actions\\|deploy]\` | Configura GitHub Pages via Actions + push |
119
+ | \`gitpagedocs docs\` | Atualiza as regioes gerenciadas de README/CONTRIBUTING/SECURITY |
120
+ | \`gitpagedocs password\` | Define a senha de acesso a documentacao (chave publica em \`site.docsAccess\`) |
121
+ | \`gitpagedocs config\` / \`config clear\` | Mostra a config resolvida / apaga a config salva e o cofre de chaves |
122
+ | \`gitpagedocs doctor\` / \`version\` / \`update\` | Diagnostico / versao / verificacao de atualizacao no registro |
123
+ | \`gitpagedocs mcp start\` | Inicia o servidor MCP via stdio |
124
+
125
+ Instale globalmente com \`npm install -g @gitpagedocs/cli\` ou rode sem instalar com \`npx @gitpagedocs/cli\`.
114
126
 
115
127
  ## Opcoes da CLI
116
128
 
@@ -124,6 +136,7 @@ Referencia completa de opcoes da CLI, chaves de configuracao e recursos do runti
124
136
  | \`--layoutconfig\` | Gera layouts locais em \`gitpagelayouts/\` |
125
137
  | \`--layouts-dir <dir>\` | Pasta dos layouts locais (padrao: \`gitpagelayouts\`) |
126
138
  | \`--push\` | Cria workflow, commit de artefatos, push |
139
+ | \`--pages-actions\` | Apenas muda a fonte do GitHub Pages para GitHub Actions (igual a \`pages actions\`) |
127
140
  | \`--home\` | Gera \`gitpagedocshome/\` (estatico + .env + Dockerfile) |
128
141
 
129
142
  ## Saida gerada
@@ -161,6 +174,12 @@ O config da versao pode renderizar um container **Codigo fonte** via \`routes-so
161
174
  - \`ProjectLink\`, \`layoutsConfigPathOficial\`, \`layoutsConfigPath\`
162
175
  - Idiomas: \`site.languages\` (liga/desliga cada um); textos da UI: \`gitpagedocs/langs/<lang>.json\`
163
176
 
177
+ ## Reproducao de midia (um som por vez)
178
+
179
+ \`site.mediaExclusivePlayback\` (padrao \`true\`): dar play num video de rota pausa o radio e as trilhas de audio, e dar play no radio ou numa trilha de audio pausa o video. Funciona com YouTube e Vimeo (pelas APIs dos players), arquivos nativos (\`mp4\`, \`webm\`, …) e qualquer outro embed.
180
+
181
+ Para mostrar um video sem som enquanto o radio ou uma trilha de audio o explica, use \`"muted": true\` no objeto \`video\` da rota: o video roda so a imagem e fica fora da regra. \`"mediaExclusivePlayback": false\` desliga a regra no site inteiro.
182
+
164
183
  ## Variaveis de ambiente
165
184
 
166
185
  - \`GITPAGEDOCS_REPOSITORY_SEARCH\` – busca de repositorio (local)
@@ -1,3 +1,3 @@
1
- export const PACKAGE_VERSION = "0.0.7";
1
+ export const PACKAGE_VERSION = "0.0.8";
2
2
 
3
3
  export const DOC_VERSIONS = [PACKAGE_VERSION];
@@ -138,6 +138,7 @@ export function getDefaultSiteConfig(projectLink, languageToggles = buildLanguag
138
138
  audioSequentialPlayback: false,
139
139
  audioPopoverHideSource: false,
140
140
  audioPopoverShowMinutes: true,
141
+ mediaExclusivePlayback: true,
141
142
  AiChatAutoLockSeconds: 30,
142
143
  audioTracks: [
143
144
  {
@@ -1,6 +1,8 @@
1
1
  /** Route and video metadata for doc versions */
2
2
 
3
3
  export const DEFAULT_HIERARCHY = { md: 0, "source-viewer": 1, html: 2, video: 3, audio: 4 };
4
+ /** Page order that puts the video container above the markdown. */
5
+ export const VIDEO_FIRST_HIERARCHY = { video: 0, md: 1, "source-viewer": 2, html: 3, audio: 4 };
4
6
 
5
7
  export const ROUTE_META_ID1 = {
6
8
  titles: { pt: "Primeiros passos", en: "Getting Started", es: "Primeros pasos" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitpagedocs/cli",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "CLI that scaffolds and maintains gitpagedocs documentation, generates docs with AI, configures GitHub Pages, and runs the MCP server.",
5
5
  "bin": {
6
6
  "gitpagedocs": "index.mjs"
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@clack/prompts": "^1.5.1",
32
- "@gitpagedocs/mcp": "^0.0.7",
33
- "@gitpagedocs/tools": "^0.0.7",
32
+ "@gitpagedocs/mcp": "^0.0.8",
33
+ "@gitpagedocs/tools": "^0.0.8",
34
34
  "tsx": "^4.21.0"
35
35
  },
36
36
  "repository": {