@pasosdejesus/m 0.33.0 → 0.34.1

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/man/man1/m.1 ADDED
@@ -0,0 +1,212 @@
1
+ .\" $OpenBSD$
2
+ .Dd $Mdocdate: October 20 2026 $
3
+ .Dt M 1
4
+ .Os
5
+ .Sh NAME
6
+ .Nm m
7
+ .Nd CLI for Next.js and Hardhat projects
8
+ .Sh SYNOPSIS
9
+ .Nm
10
+ .Op Fl Vh
11
+ .Ar command
12
+ .Op Ar args ...
13
+ .Sh DESCRIPTION
14
+ The
15
+ .Nm
16
+ command scaffolds and manages integrated Next.js and Hardhat
17
+ applications: projects (m:create, m:update, m:check), databases,
18
+ engines, wallets, end-to-end tests and environment checks.
19
+ .Sh COMMANDS
20
+ .Ss AI
21
+ .Bl -tag -width Ds
22
+ .It Cm ai:context Op Ar flags
23
+ Genera contexto del proyecto para chat IA (compatible con DeepSeek)
24
+ .It Cm ai:edit Op Ar flags
25
+ Aplica cambios desde el portapapeles (formato diff de DeepSeek)
26
+ .It Cm ai:readfile Op Ar file
27
+ Muestra contenido de archivos (como read_file de Claude Code)
28
+ .It Cm ai:writefile Op Ar file
29
+ Crea o reemplaza un archivo con el contenido del portapapeles
30
+ .It Cm ai:grep Op Ar pattern
31
+ Busca texto en archivos (grep)
32
+ .It Cm ai:glob Op Ar pattern
33
+ Busca archivos por patrón (glob)
34
+ .El
35
+ .Ss ENV
36
+ .Bl -tag -width Ds
37
+ .It Cm env:diff Op Ar base [target]
38
+ Compara .env.example vs .env mostrando variables faltantes, sobrantes y
39
+ diferentes
40
+ .It Cm env:check Op Ar [file...]
41
+ Avisa de variables de entorno renombradas en el ecosistema (informativo)
42
+ .El
43
+ .Ss Project
44
+ .Bl -tag -width Ds
45
+ .It Cm m:create Ar name
46
+ Crea un nuevo proyecto
47
+ .It Cm m:update
48
+ Sincroniza el proyecto actual con las mejoras de las plantillas
49
+ (interactivo)
50
+ .It Cm m:check Op Ar --json|--strict|--fix
51
+ Verifica la estructura del proyecto (workspace, apps/web,
52
+ apps/contracts, catalog) y reporta hallazgos (--json, --strict, --fix)
53
+ .El
54
+ .Ss Help
55
+ .Bl -tag -width Ds
56
+ .It Cm m:man Op Ar --out <file>
57
+ Genera la página de manual en mdoc desde el registro de comandos (--out
58
+ <archivo>)
59
+ .El
60
+ .Ss Test
61
+ .Bl -tag -width Ds
62
+ .It Cm test:e2e:summary Op Ar output
63
+ Muestra el resultado por spec de uno o más logs de test:e2e y los
64
+ compara (marca las filas que difieren)
65
+ .It Cm warmup Op Ar output
66
+ Calienta un sitio (compila rutas en secuencial y verifica en paralelo)
67
+ leyendo e2e/warmup-paths.json o package.json:e2e.warmupPaths.
68
+ Opcional: filtro, --sequential
69
+ .El
70
+ .Ss Database
71
+ .Bl -tag -width Ds
72
+ .It Cm db:create
73
+ Crea la base de datos
74
+ .It Cm db:drop
75
+ Elimina la base de datos
76
+ .It Cm db:super:createuser
77
+ Crea un superusuario para la base de datos
78
+ .It Cm db:structure:dump
79
+ Vuelca la estructura de la base de datos
80
+ .It Cm db:structure:load
81
+ Carga la estructura de la base de datos
82
+ .It Cm db:migrate
83
+ Ejecuta las migraciones de la base de datos
84
+ .It Cm db:mig:make Ar name
85
+ Crea un nuevo archivo de migración
86
+ .It Cm db:rollback Op Ar --step N
87
+ Revierte la última migración (--step N para revertir N)
88
+ .It Cm db:seed
89
+ Siembra la base de datos
90
+ .It Cm db:console Op Ar query
91
+ Abre una consola de base de datos
92
+ .It Cm db:test
93
+ Prueba la conexión a la base de datos de forma no interactiva
94
+ .It Cm db:dump Op Ar name
95
+ Respaldar la base de datos (datos + esquema) en db/backups/
96
+ .It Cm db:restore Op Ar name
97
+ Restaurar la base de datos desde un respaldo en db/backups/
98
+ .El
99
+ .Ss Engine
100
+ .Bl -tag -width Ds
101
+ .It Cm eng:list
102
+ Lista motores disponibles
103
+ .It Cm eng:sync
104
+ Regenera el m-engine.generated.ts de un motor desde sus fuentes (--check
105
+ no escribe; --vendor lo copia)
106
+ .It Cm eng:remove
107
+ Quita una copia vendorizada de un motor de packages/generated (--drop
108
+ borra además sus tablas)
109
+ .It Cm eng:verify
110
+ Guarda el m-engine.generated.ts de un motor contra sus fuentes y su
111
+ intención
112
+ .It Cm eng:check
113
+ Verifica esquemas de motores
114
+ .It Cm eng:setup
115
+ Escribe en el consumidor las migraciones de los motores (db/migrations);
116
+ --check falla en CI si está atrasado
117
+ .It Cm eng:seed
118
+ Carga el seed de un motor (db/seed.sql.gz); msip conserva su seed
119
+ idempotente (--force recarga, --check reporta)
120
+ .It Cm eng:wba:setup
121
+ Crea archivos de migración WBA
122
+ .It Cm eng:credentials:setup
123
+ Crea archivos de migración credentials
124
+ .It Cm eng:msip:setup Op Ar flags
125
+ Escribe en el consumidor las migraciones del modelo msip que faltan
126
+ (db/migrations); --check falla en CI si está atrasado
127
+ .It Cm eng:msip:seed Op Ar flags
128
+ Carga los datos iniciales de msip (catálogos + geografía); --file
129
+ <sql> para el dataset completo, --force recarga, --check reporta
130
+ .It Cm eng:msip:baseline Op Ar flags
131
+ Imprime el baseline publicado del modelo msip (--out <archivo> para
132
+ guardarlo)
133
+ .It Cm eng:msip:dump Op Ar flags
134
+ Genera el baseline del modelo msip desde una base de referencia
135
+ .It Cm eng:msip:verify Op Ar flags
136
+ Verifica el baseline publicado de msip contra una estructura de
137
+ referencia (guard de derivación + D12)
138
+ .El
139
+ .Ss Engine/Opwallet
140
+ .Bl -tag -width Ds
141
+ .It Cm eng:opwallet:generate
142
+ Genera una nueva billetera con mnemotécnico
143
+ .It Cm eng:opwallet:approve
144
+ Aprueba gasto de token ERC20
145
+ .It Cm eng:opwallet:list
146
+ Lista billeteras almacenadas
147
+ .It Cm eng:opwallet:import
148
+ Importa una billetera desde mnemotécnico o clave privada
149
+ .It Cm eng:opwallet:send
150
+ Envía tokens nativos o ERC20
151
+ .It Cm eng:opwallet:balance
152
+ Consulta saldo de billetera
153
+ .It Cm eng:opwallet:sign
154
+ Firma una transacción offline (airgapped)
155
+ .It Cm eng:opwallet:broadcast
156
+ Transmite una transacción firmada
157
+ .It Cm eng:opwallet:call
158
+ Lee datos de un contrato inteligente
159
+ .It Cm eng:opwallet:derive
160
+ Deriva billetera hija desde mnemotécnico
161
+ .It Cm eng:opwallet:keccak
162
+ Calcula hash Keccak-256 de un texto
163
+ .El
164
+ .Ss Requirements
165
+ .Bl -tag -width Ds
166
+ .It Cm req:list
167
+ Lista requerimientos de REQ/ con estado y cross-project
168
+ .It Cm req:show Ar N
169
+ Muestra un requerimiento de REQ/
170
+ .It Cm req:cross
171
+ Lista requerimientos con impacto cross-project
172
+ .It Cm req:compare Op Ar N
173
+ Compara REQ local con issue remoto (GitLab/GitHub)
174
+ .It Cm req:sync-from-repo Ar N
175
+ Actualiza REQ local desde issue remoto
176
+ .It Cm req:sync-to-repo Ar N
177
+ Actualiza issue remoto desde REQ local
178
+ .It Cm req:list-repo
179
+ Lista issues abiertos del repositorio remoto
180
+ .It Cm req:create Ar title
181
+ Crea nuevo issue remoto y REQ local (repo asigna IID)
182
+ .It Cm req:close Ar N
183
+ Cierra un requerimiento: sync→repo, cierra issue, elimina local
184
+ .El
185
+ .Sh ENVIRONMENT
186
+ .Bl -tag -width Ds
187
+ .It Ev PGUSER , Ev PGPASSWORD , Ev PGDATABASE
188
+ PostgreSQL connection for the database commands and the test project.
189
+ .It Ev E2E_RETRIES
190
+ Default retry count for
191
+ .Cm test:e2e .
192
+ .It Ev E2E_LOG_DIR
193
+ Directory for the E2E logs (default
194
+ .Pa /tmp ) .
195
+ .It Ev E2E_SPEC_DELAY_MS
196
+ Delay between specs during an E2E run.
197
+ .El
198
+ .Sh FILES
199
+ .Bl -tag -width Ds
200
+ .It Pa .env
201
+ Project environment (consumers keep it in
202
+ .Pa apps/.env ) .
203
+ .It Pa ~/.m/wallets/
204
+ Encrypted operator wallets written by
205
+ .Cm eng:opwallet:* .
206
+ .It Pa m-extensions/
207
+ Project-specific hooks loaded by the CLI.
208
+ .El
209
+ .Sh EXIT STATUS
210
+ .Ex -std
211
+ .Sh SEE ALSO
212
+ .Xr sh 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pasosdejesus/m",
3
- "version": "0.33.0",
3
+ "version": "0.34.1",
4
4
  "description": "Motor para crear y gestionar proyectos al estilo Pasos de Jesus.",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -122,6 +122,7 @@
122
122
  },
123
123
  "files": [
124
124
  "dist",
125
+ "man",
125
126
  "!dist/**/*.test.*",
126
127
  "src/tasks/README.md",
127
128
  "src/util/README.md",
@@ -141,7 +142,7 @@
141
142
  "picocolors": "^1.1.1"
142
143
  },
143
144
  "optionalDependencies": {
144
- "@pasosdejesus/contract-test": "0.1.5",
145
+ "@pasosdejesus/contract-test": "0.1.7",
145
146
  "@pasosdejesus/edr": "0.1.2"
146
147
  },
147
148
  "devDependencies": {
@@ -233,7 +234,7 @@
233
234
  },
234
235
  "scripts": {
235
236
  "clean": "rm -rf dist tsconfig.tsbuildinfo",
236
- "build": "rm -rf dist tsconfig.tsbuildinfo && npx tsc -b && perl -pi -e 'print \"#!/usr/bin/env node\\n\" if $. == 1 && $_ ne \"#!/usr/bin/env node\\n\"' dist/m.js && mkdir -p dist/templates dist/blockchain && cp -R templates/* dist/templates/ && cp ../../CHANGELOG.md dist/CHANGELOG.md",
237
+ "build": "rm -rf dist tsconfig.tsbuildinfo && npx tsc -b && perl -pi -e 'print \"#!/usr/bin/env node\\n\" if $. == 1 && $_ ne \"#!/usr/bin/env node\\n\"' dist/m.js && mkdir -p dist/templates dist/blockchain && cp -R templates/* dist/templates/ && cp ../../CHANGELOG.md dist/CHANGELOG.md && cd ../.. && node packages/m/dist/m.js m:man --out packages/m/man/man1/m.1",
237
238
  "start": "node dist/m.js m:create",
238
239
  "test": "npx vitest run",
239
240
  "typecheck": "npx tsc -b --pretty false",
@@ -21,6 +21,7 @@ Each file in this directory exports a `runXxx()` function registered in `../m.ts
21
21
  | `context-reqs.ts` | *(internal)* | Parses `REQ/*.md` and keeps only open requirements |
22
22
  | `context-render.ts` | *(internal)* | Structure and document rendering with a hard size budget |
23
23
  | `check.ts` | `m:check` | Verifies the recommended project layout (root workspace, `apps/web`, `apps/contracts`, `catalog:`) and reports findings; `--fix` applies only reversible fixes |
24
+ | `man.ts` | `m:man` | Generates the mdoc manual page from the live command registry (`--out <file>`) |
24
25
  | `create.ts` | `m:create` | Scaffolds new projects from `templates/` via direct recursive copy (replaced Plop.js) |
25
26
  | `db.ts` | `db:create`, `db:drop`, `db:super:createuser`, `db:structure:dump`, `db:structure:load`, `db:migrate`, `db:rollback`, `db:mig:make`, `db:seed`, `db:console`, `db:test`, `db:dump`, `db:restore` | PostgreSQL database lifecycle, migration management, schema verification, and backup/restore |
26
27
  | `e2e.ts` | `test:e2e` | E2E tests (Puppeteer specs, axios smoke) |