@redcumbrecl/cli 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/README.md +25 -0
- package/dist/cli.js +1049 -0
- package/dist/plantillas/dotnet/AGENTS.md +24 -0
- package/dist/plantillas/dotnet/Program.cs +106 -0
- package/dist/plantillas/dotnet/Redcumbre/LlaveRedcumbre.cs +48 -0
- package/dist/plantillas/php/AGENTS.md +24 -0
- package/dist/plantillas/php/redcumbre/ejemplo.php +117 -0
- package/dist/plantillas/php/redcumbre/llave.php +48 -0
- package/dist/plantillas/python/AGENTS.md +24 -0
- package/dist/plantillas/python/redcumbre_ejemplo.py +97 -0
- package/dist/plantillas/python/redcumbre_llave.py +38 -0
- package/dist/plantillas/typescript/AGENTS.md +24 -0
- package/dist/plantillas/typescript/redcumbre/ejemplo.ts +82 -0
- package/dist/plantillas/typescript/redcumbre/llave.ts +44 -0
- package/package.json +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @redcumbrecl/cli
|
|
2
|
+
|
|
3
|
+
Conecta tu proyecto con la **API de Redcumbre**: inicia sesión con tu cuenta en el navegador y deja
|
|
4
|
+
la llave de la API instalada en el proyecto.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
npx @redcumbrecl/cli init
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
- La llave queda en `keys/redcumbre-sandbox.json` o `keys/redcumbre-produccion.json` (el mismo JSON
|
|
11
|
+
que descarga la pantalla web de llaves) y el `.env` sólo **apunta** a ese archivo
|
|
12
|
+
(`REDCUMBRE_LLAVE_SANDBOX=keys/redcumbre-sandbox.json`). `keys/` y `.env` quedan fuera del control
|
|
13
|
+
de versiones.
|
|
14
|
+
- En una carpeta vacía, arma antes el proyecto con el generador de tu lenguaje (TypeScript con Node,
|
|
15
|
+
Python, .NET o PHP) y agrega un ejemplo.
|
|
16
|
+
- Crear llaves exige ser administrador de la empresa.
|
|
17
|
+
- Para agentes de código: `init --json --empresa <slug> --entorno sandbox`. La salida nunca incluye el
|
|
18
|
+
secreto, y el inicio de sesión lo aprueba siempre la persona en su navegador.
|
|
19
|
+
|
|
20
|
+
`redcumbre login` inicia sesión; `redcumbre logout` la cierra y la revoca. La sesión se guarda en el
|
|
21
|
+
llavero del sistema o, si no hay, en un archivo `0600` de tu carpeta de configuración — nunca en el
|
|
22
|
+
proyecto. Con `REDCUMBRE_SESION_EN_ARCHIVO=1` va al archivo aunque haya llavero (útil en
|
|
23
|
+
contenedores y equipos compartidos).
|
|
24
|
+
|
|
25
|
+
Documentación: https://docs.redcumbre.cl/primeros-pasos/integrar-con-ia/
|