hacktheandes-cli 0.1.202

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.
Files changed (3) hide show
  1. package/README.md +177 -0
  2. package/dist/index.js +64376 -0
  3. package/package.json +35 -0
package/README.md ADDED
@@ -0,0 +1,177 @@
1
+ # Hack the Andes CLI
2
+
3
+ Command-line client for Hack the Andes.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install --global hacktheandes-cli@latest
9
+ ```
10
+
11
+ También puedes instalar `chofex-cli`. Ambos paquetes instalan los comandos
12
+ `andes` y `chofex`, con los mismos subcomandos, configuración y sesión guardada.
13
+ Instala uno de los dos paquetes.
14
+
15
+ ```sh
16
+ andes register
17
+ chofex register
18
+ ```
19
+
20
+ Para instalarlo dentro de un proyecto, usa `npm install hacktheandes-cli` y
21
+ ejecuta `npx andes register` o `npx chofex register`.
22
+
23
+ Los ejemplos con `chofex` también funcionan con `andes`:
24
+
25
+ ```sh
26
+ chofex
27
+ chofex whoami
28
+ chofex update
29
+ chofex upgrade
30
+ chofex register
31
+ chofex status
32
+ chofex requirements
33
+ chofex challenge list
34
+ chofex challenge query --challenge black-box
35
+ chofex challenge notebook --challenge black-box
36
+ chofex challenge test --challenge black-box --source ./shipping.js
37
+ chofex challenge evaluate --challenge black-box --source ./shipping.js
38
+ chofex challenge ranking --challenge black-box
39
+ chofex challenge init --challenge broken-agent
40
+ cd broken-agent && npm test
41
+ chofex challenge test --challenge broken-agent --source ./scheduler.js
42
+ chofex challenge evaluate --challenge broken-agent --source ./scheduler.js --review ./review.json
43
+ chofex challenge ranking --challenge broken-agent
44
+ chofex confirm
45
+ chofex badge
46
+ chofex badge regenerate
47
+ ```
48
+
49
+ `chofex update` and `chofex upgrade` are interchangeable; both update the CLI
50
+ to the latest published version.
51
+
52
+ Las actualizaciones conservan el paquete instalado: `hacktheandes-cli` o
53
+ `chofex-cli`, independientemente del comando que uses.
54
+
55
+ Las copias instaladas también consultan npm cada vez que se inicia `chofex` e
56
+ instalan una versión publicada más reciente antes de ejecutar el comando. Si
57
+ npm o la red no están disponibles temporalmente, se continúa con la versión
58
+ actual. Usa `CHOFEX_AUTO_UPDATE=0` para desactivar esta comprobación.
59
+
60
+ `chofex register` collects and submits an application with full name, role,
61
+ optional phone number, bio, portfolio URL, shipped project, LinkedIn and GitHub
62
+ URLs, and Terms and Conditions. Use `--input` to submit a completed JSON
63
+ application.
64
+ Acceptance creates a default badge from the Clerk profile visible to reviewers.
65
+ `chofex confirm` updates the public name, one-line description, and picture
66
+ while separately collecting the legal full name and venue details required for attendance. After confirmation,
67
+ `chofex badge regenerate` can also update those public fields and the QR
68
+ destination without changing the submitted application.
69
+ The technical challenges do not block application submission, but they are
70
+ mandatory for admission. An application does not reserve a seat; organizers
71
+ select the strongest engineers from challenge rankings. Broken Agent requires a
72
+ participant-only browser handoff with passkey user verification before each
73
+ official evaluation. Every challenge slug resolves to the current server
74
+ version; legacy attempts do not count toward admission.
75
+
76
+ The public ranking is read-only at `https://hacktheandes.com/challenges`.
77
+
78
+ Run `chofex` for a compact retro welcome screen with a pixel Sacred Valley and
79
+ the main commands. Run `chofex --help` for the full command reference. The
80
+ landscape uses colored terminal cells, with readable text that works with your
81
+ terminal's line spacing. It adapts to the terminal width and has a plain ASCII
82
+ fallback when color is disabled with `NO_COLOR`. JSON output and individual
83
+ command results omit the welcome screen.
84
+
85
+ For agent or script input, `chofex schema --stage application` and
86
+ `chofex schema --stage acceptance` print complete templates containing every
87
+ accepted JSON key. Validate a completed input file locally before submitting it:
88
+
89
+ ```sh
90
+ chofex --output json validate --stage application --input application.json
91
+ ```
92
+
93
+ Validation does not contact the API, and a successful result does not echo input
94
+ values. Local validation errors include `acceptedFields` in JSON mode. The
95
+ `status` response already includes both the registration and its requirements;
96
+ use `requirements` only when requirements-only human output is preferred.
97
+
98
+ Run `chofex login` to authenticate. For automation, provide an OAuth access
99
+ token with `CHOFEX_TOKEN`.
100
+
101
+ ### Authentication troubleshooting
102
+
103
+ If `chofex login` succeeds but `whoami` or an authenticated challenge command
104
+ returns `AUTHENTICATION_REQUIRED`, first remove any token or API URL overrides
105
+ from the shell. In Bash or Zsh:
106
+
107
+ ```sh
108
+ unset CHOFEX_TOKEN CHOFEX_API_URL
109
+ ```
110
+
111
+ In PowerShell:
112
+
113
+ ```powershell
114
+ Remove-Item Env:CHOFEX_TOKEN, Env:CHOFEX_API_URL -ErrorAction SilentlyContinue
115
+ ```
116
+
117
+ Update by repeating the installation method you originally used. For npm:
118
+
119
+ ```sh
120
+ npm install --global chofex-cli@latest
121
+ ```
122
+
123
+ For the standalone installer:
124
+
125
+ ```sh
126
+ curl -fsSL https://hacktheandes.com/install | bash
127
+ ```
128
+
129
+ Then renew the stored session and verify it:
130
+
131
+ ```sh
132
+ chofex --version
133
+ chofex logout
134
+ chofex login
135
+ chofex --output json whoami
136
+ ```
137
+
138
+ Versions before `0.1.140` used a retired API origin whose cross-origin redirect
139
+ removed the bearer token. Versions `0.1.140` through `0.1.145` call
140
+ `https://hacktheandes.com` but still mint OAuth tokens from the retired Clerk
141
+ application, so login can print success while `whoami` and `status` return
142
+ `AUTHENTICATION_REQUIRED`. Current releases (`0.1.146` and later) use
143
+ `https://clerk.hacktheandes.com`. If the API still responds with
144
+ `Authentication failed` after updating, share the CLI version, error code, and
145
+ request ID when asking for support. For a different local authentication error,
146
+ share its code and message instead. Never share the access or refresh token.
147
+
148
+ When applying again after a rejection, interactive registration pre-fills the
149
+ previous application's answers. Keep a value by pressing Enter, or press Ctrl+U
150
+ and type a replacement for an answer that needs to change.
151
+
152
+ Accepted participants must confirm which profile picture reviewers should use:
153
+ their Clerk picture, their GitHub avatar, or a custom upload. Interactive
154
+ confirmation prompts for the choice and local file path. For JSON input, set
155
+ `pictureSource` and pass `--picture /path/to/image` when its value is `upload`.
156
+ Uploads show percentage progress and accept JPEG, PNG, or WebP files up to 5 MB.
157
+
158
+ API requests use `https://hacktheandes.com` by default. Use `CHOFEX_API_URL` to
159
+ override the API URL when running against a local or preview Chofex instance.
160
+
161
+ Registration links use `https://hacktheandes.com` by default. Local or preview
162
+ environments can override that origin with `CHOFEX_PUBLIC_SITE_URL`.
163
+
164
+ ## Verificar los paquetes npm
165
+
166
+ Desde la raíz del repositorio:
167
+
168
+ ```sh
169
+ bun --filter chofex-cli build
170
+ bun --filter chofex-cli prepare-packages
171
+ bun --filter chofex-cli verify-packages
172
+ ```
173
+
174
+ La verificación empaqueta e instala ambos paquetes en directorios temporales.
175
+ Comprueba los dos comandos, la ayuda de registro, la salida JSON y el paquete
176
+ que solicita cada actualización. El workflow de publicación ejecuta estos
177
+ mismos pasos antes de publicar ambos paquetes con la misma versión.