it4-tools 0.1.0 → 0.1.2
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/README.md +12 -1
- package/package.json +1 -1
- package/src/index.js +28 -4
package/README.md
CHANGED
|
@@ -24,7 +24,18 @@ Fluxo:
|
|
|
24
24
|
3. **Escreve `~/.npmrc`** com o token. Migra config IT4 antiga (substitui
|
|
25
25
|
linhas do feed IT4 com token vencido/compartilhado), preserva tudo
|
|
26
26
|
que não é IT4.
|
|
27
|
-
4. **`npm i -g @it4solution/tools`** — instala o CLI
|
|
27
|
+
4. **`npm i -g @it4solution/tools`** — instala o **core** do CLI (bin `it4`).
|
|
28
|
+
|
|
29
|
+
O CLI é **core + plugins por capacidade**: o core traz só `auth`/`config`.
|
|
30
|
+
Instale os plugins que for usar (o mesmo `~/.npmrc` configurado acima
|
|
31
|
+
autentica o download deles):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
it4 plugins install @it4solution/plugin-create # cria projetos
|
|
35
|
+
it4 plugins install @it4solution/plugin-skills # skills do Claude Code
|
|
36
|
+
it4 plugins install @it4solution/plugin-publish-nuget # publica libs .NET
|
|
37
|
+
it4 plugins # lista o que está instalado
|
|
38
|
+
```
|
|
28
39
|
|
|
29
40
|
Depois disso, `it4 --help` mostra os comandos disponíveis. Pra re-logar
|
|
30
41
|
quando o PAT expirar (em ~90 dias), rode de novo `npx -y it4-tools`
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -78,6 +78,27 @@ function parseArgs(argv) {
|
|
|
78
78
|
return args;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
const PLUGINS = [
|
|
82
|
+
["@it4solution/plugin-create", "cria projetos (frontend, backend, monorepo)"],
|
|
83
|
+
["@it4solution/plugin-skills", "instala/atualiza skills do Claude Code"],
|
|
84
|
+
["@it4solution/plugin-publish-nuget", "publica libs .NET (nuget)"],
|
|
85
|
+
];
|
|
86
|
+
|
|
87
|
+
function printPluginsHint() {
|
|
88
|
+
log.info("O CLI é core + plugins. Instale só as capacidades que for usar:");
|
|
89
|
+
for (const [name, desc] of PLUGINS) {
|
|
90
|
+
log.message(` ${pc.cyan(`it4 plugins install ${name}`)} ${pc.dim(`# ${desc}`)}`);
|
|
91
|
+
}
|
|
92
|
+
log.message(` ${pc.dim("Liste o que está instalado com")} ${pc.cyan("it4 plugins")}.`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function printSkillHint() {
|
|
96
|
+
log.info("Usa Claude Code? Instale a skill que ensina o Claude a operar o CLI:");
|
|
97
|
+
log.message(
|
|
98
|
+
` ${pc.cyan("it4 skills install --name it4-cli")} ${pc.dim("# comandos e flags do it4 direto no Claude Code")}`,
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
81
102
|
function bail(message) {
|
|
82
103
|
cancel(message);
|
|
83
104
|
process.exit(0);
|
|
@@ -179,9 +200,10 @@ async function main() {
|
|
|
179
200
|
);
|
|
180
201
|
|
|
181
202
|
if (!shouldInstall) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
);
|
|
203
|
+
log.info(`Quando quiser instalar o core: ${pc.cyan("npm i -g @it4solution/tools")}.`);
|
|
204
|
+
printPluginsHint();
|
|
205
|
+
printSkillHint();
|
|
206
|
+
outro(`Depois, ${pc.cyan("it4 --help")} lista os comandos.`);
|
|
185
207
|
return;
|
|
186
208
|
}
|
|
187
209
|
|
|
@@ -201,7 +223,9 @@ async function main() {
|
|
|
201
223
|
process.exit(1);
|
|
202
224
|
}
|
|
203
225
|
|
|
204
|
-
|
|
226
|
+
printPluginsHint();
|
|
227
|
+
printSkillHint();
|
|
228
|
+
outro(`Pronto. Depois de instalar os plugins, ${pc.cyan("it4 --help")} lista os comandos.`);
|
|
205
229
|
}
|
|
206
230
|
|
|
207
231
|
main().catch((err) => {
|