forgegit 1.2.2 → 1.4.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/MANUAL.md +61 -68
- package/README.md +130 -26
- package/config.cmd +14 -14
- package/init.cmd +199 -192
- package/lib/git-ops.cmd +91 -68
- package/lib/templates.cmd +98 -79
- package/lib/ui.cmd +58 -62
- package/package.json +1 -1
- package/templates/abrir.cmd.tpl +1 -1
- package/templates/auditar.cmd.tpl +5 -5
- package/templates/forge.cmd.tpl +114 -0
- package/templates/historial.cmd.tpl +1 -1
- package/templates/{subir.cmd.tpl → push.cmd.tpl} +2 -2
- package/templates/readme.md.tpl +24 -15
- package/templates/{guardar.cmd.tpl → save.cmd.tpl} +4 -4
- package/templates/serve-static.js +86 -0
- package/templates/serve.cmd.tpl +209 -0
- package/templates/snapshots.cmd.tpl +1 -1
package/MANUAL.md
CHANGED
|
@@ -1,68 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
$utf8 = New-Object System.Text.UTF8Encoding($false)
|
|
64
|
-
[System.IO.File]::WriteAllText("$PWD\MANUAL.txt", $content, $utf8)
|
|
65
|
-
|
|
66
|
-
Write-Host " [OK] MANUAL.txt creado" -ForegroundColor Green
|
|
67
|
-
Write-Host ""
|
|
68
|
-
Get-Item "MANUAL.txt" | Select-Object Name, Length
|
|
1
|
+
# forgeGit - Manual de uso
|
|
2
|
+
|
|
3
|
+
Guia completa de instalacion, uso y mantenimiento.
|
|
4
|
+
|
|
5
|
+
## Instalacion
|
|
6
|
+
|
|
7
|
+
npm install -g forgegit
|
|
8
|
+
|
|
9
|
+
O descarga el ZIP desde:
|
|
10
|
+
https://github.com/vloitz/forgeGit/releases/latest
|
|
11
|
+
|
|
12
|
+
Requisitos: Windows 10/11, Node.js 18+, Git 2.30+
|
|
13
|
+
|
|
14
|
+
## Uso en un proyecto nuevo
|
|
15
|
+
|
|
16
|
+
cd ruta\del\proyecto
|
|
17
|
+
forge
|
|
18
|
+
|
|
19
|
+
El proyecto queda con Git, .gitignore, README.md, commit inicial,
|
|
20
|
+
tag v1.0.0 y 7 helpers en .forge/commands/.
|
|
21
|
+
|
|
22
|
+
## Comandos disponibles
|
|
23
|
+
|
|
24
|
+
| Comando | Descripcion |
|
|
25
|
+
|---------|-------------|
|
|
26
|
+
| forge save | Commit de cambios |
|
|
27
|
+
| forge push | Push a GitHub |
|
|
28
|
+
| forge log | Ver commits recientes |
|
|
29
|
+
| forge snap | Crear/restaurar snapshots |
|
|
30
|
+
| forge audit | Generar reporte diff |
|
|
31
|
+
| forge open | Abrir en VS Code |
|
|
32
|
+
| forge serve | Servidor de desarrollo (auto-detect) |
|
|
33
|
+
| forge help | Ayuda completa |
|
|
34
|
+
|
|
35
|
+
## Estructura del proyecto
|
|
36
|
+
|
|
37
|
+
MiProyecto/
|
|
38
|
+
├── forge.cmd Menu + CLI
|
|
39
|
+
├── init.cmd Bootstrap
|
|
40
|
+
├── config.cmd Configuracion
|
|
41
|
+
├── .forge/
|
|
42
|
+
│ ├── commands/ 6 helpers
|
|
43
|
+
│ ├── lib/ Modulos internos
|
|
44
|
+
│ ├── templates/ Fuentes .tpl
|
|
45
|
+
│ └── serve-static.js
|
|
46
|
+
└── (tus archivos)
|
|
47
|
+
|
|
48
|
+
## Actualizar
|
|
49
|
+
|
|
50
|
+
npm install -g forgegit@latest
|
|
51
|
+
forge update
|
|
52
|
+
|
|
53
|
+
## Links
|
|
54
|
+
|
|
55
|
+
- Repo: https://github.com/vloitz/forgeGit
|
|
56
|
+
- npm: https://www.npmjs.com/package/forgegit
|
|
57
|
+
- Releases: https://github.com/vloitz/forgeGit/releases
|
|
58
|
+
|
|
59
|
+
## Licencia
|
|
60
|
+
|
|
61
|
+
MIT
|
package/README.md
CHANGED
|
@@ -1,26 +1,130 @@
|
|
|
1
|
-
# forgeGit
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
# forgeGit
|
|
2
|
+
|
|
3
|
+
Universal Git bootstrap kit for Windows.
|
|
4
|
+
|
|
5
|
+
## What it is
|
|
6
|
+
|
|
7
|
+
forgeGit is a small toolkit that eliminates the repetitive setup work
|
|
8
|
+
of starting a new Git project. Instead of manually copying `.gitignore`,
|
|
9
|
+
creating a README, making the first commit, and tagging a version,
|
|
10
|
+
you run one command and the project is ready.
|
|
11
|
+
|
|
12
|
+
Born from a real annoyance: copying the same 6 files into every new
|
|
13
|
+
project, over and over, for years.
|
|
14
|
+
|
|
15
|
+
## What it does
|
|
16
|
+
|
|
17
|
+
Running `forge` in an empty folder:
|
|
18
|
+
|
|
19
|
+
- Initializes a Git repository
|
|
20
|
+
- Sets `main` as default branch
|
|
21
|
+
- Creates a universal `.gitignore` (covers Node, Python, Rust, Go)
|
|
22
|
+
- Generates an adaptive `README.md`
|
|
23
|
+
- Creates initial commit + tag `v1.0.0`
|
|
24
|
+
- Generates 7 helper commands in the project
|
|
25
|
+
|
|
26
|
+
## The 7 helpers
|
|
27
|
+
|
|
28
|
+
| File | Purpose |
|
|
29
|
+
|------|---------|
|
|
30
|
+
| `guardar.cmd` | Commit changes locally |
|
|
31
|
+
| `subir.cmd` | Push to GitHub |
|
|
32
|
+
| `snapshots.cmd` | Create/restore full project snapshots |
|
|
33
|
+
| `historial.cmd` | View recent commits |
|
|
34
|
+
| `auditar.cmd` | Generate diff reports (for AI review) |
|
|
35
|
+
| `abrir.cmd` | Open project in VS Code |
|
|
36
|
+
| `init.cmd` | Re-bootstrap (idempotent) |
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
### Option A - npm (recommended)
|
|
41
|
+
|
|
42
|
+
```cmd
|
|
43
|
+
npm install -g forgegit
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Option B - GitHub Release
|
|
47
|
+
|
|
48
|
+
Download the ZIP from:
|
|
49
|
+
https://github.com/vloitz/forgeGit/releases/latest
|
|
50
|
+
|
|
51
|
+
Extract anywhere. Run `tools\install.cmd` once.
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
```cmd
|
|
56
|
+
cd any\project\folder
|
|
57
|
+
forge
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The folder becomes a fully configured Git repository with helpers.
|
|
61
|
+
|
|
62
|
+
## Global commands
|
|
63
|
+
|
|
64
|
+
```cmd
|
|
65
|
+
forge Bootstrap current directory
|
|
66
|
+
forge update Sync templates from kit
|
|
67
|
+
forge help Show help
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Philosophy
|
|
71
|
+
|
|
72
|
+
- **Idempotent**: safe to run multiple times, never overwrites user files
|
|
73
|
+
- **Modular**: templates live in .tpl files, separated from logic
|
|
74
|
+
- **Portable**: works in any Windows folder, any project type
|
|
75
|
+
- **Configurable**: edit `config.cmd`, not the logic
|
|
76
|
+
- **Self-documenting**: generates colored terminal output
|
|
77
|
+
- **Batteries included**: snapshots, audit reports, tests
|
|
78
|
+
|
|
79
|
+
## Structure
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
forgeGit/
|
|
83
|
+
├── init.cmd Entry point (14 steps)
|
|
84
|
+
├── config.cmd Configuration values
|
|
85
|
+
├── MANUAL.md Full user manual
|
|
86
|
+
├── FUTURE.md Roadmap / ideas
|
|
87
|
+
├── lib/ Internal modules
|
|
88
|
+
│ ├── ui.cmd Terminal UI helpers
|
|
89
|
+
│ ├── git-ops.cmd Git operations
|
|
90
|
+
│ └── templates.cmd Template renderer
|
|
91
|
+
├── templates/ Source templates (.tpl)
|
|
92
|
+
├── tools/ Author tools
|
|
93
|
+
│ ├── install.cmd Install forge globally
|
|
94
|
+
│ ├── uninstall.cmd Uninstall forge
|
|
95
|
+
│ ├── restore.cmd Restore PATH from backup
|
|
96
|
+
│ ├── pack.cmd Build clean distribution
|
|
97
|
+
│ ├── release.cmd Build ZIP + open GitHub
|
|
98
|
+
│ └── bin/forge.cmd Global command
|
|
99
|
+
└── tests/ Automated tests (14/14)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Requirements
|
|
103
|
+
|
|
104
|
+
- Windows 10 or 11
|
|
105
|
+
- Node.js 18+
|
|
106
|
+
- Git 2.30+
|
|
107
|
+
- VS Code CLI (optional, for `abrir.cmd`)
|
|
108
|
+
|
|
109
|
+
## Status
|
|
110
|
+
|
|
111
|
+
- Version: 1.2.2
|
|
112
|
+
- Published: npm + GitHub Release
|
|
113
|
+
- Tests: 14/14 passing
|
|
114
|
+
- Platform: Windows only (Linux/Mac planned as Node.js CLI)
|
|
115
|
+
|
|
116
|
+
## Roadmap
|
|
117
|
+
|
|
118
|
+
See [FUTURE.md](FUTURE.md) for the plan to convert this into a
|
|
119
|
+
cross-platform Node.js CLI (zero friction, no .cmd files in projects).
|
|
120
|
+
|
|
121
|
+
## Links
|
|
122
|
+
|
|
123
|
+
- Repository: https://github.com/vloitz/forgeGit
|
|
124
|
+
- npm: https://www.npmjs.com/package/forgegit
|
|
125
|
+
- Releases: https://github.com/vloitz/forgeGit/releases
|
|
126
|
+
- Manual: [MANUAL.md](MANUAL.md)
|
|
127
|
+
|
|
128
|
+
## License
|
|
129
|
+
|
|
130
|
+
MIT
|
package/config.cmd
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
REM ============================================================
|
|
2
|
-
REM forge-git / config.cmd
|
|
3
|
-
REM Configuration - edit these values to customize
|
|
4
|
-
REM Called from init.cmd via: call config.cmd
|
|
5
|
-
REM ============================================================
|
|
6
|
-
|
|
7
|
-
set "FG_VERSION=1.
|
|
8
|
-
set "TAG_INITIAL=v1.0.0"
|
|
9
|
-
set "TAG_MESSAGE=Primera version estable"
|
|
10
|
-
set "BRANCH_MAIN=main"
|
|
11
|
-
set "COMMIT_MESSAGE=chore: initial commit"
|
|
12
|
-
|
|
13
|
-
REM --- Exclusions for subir.cmd (robocopy) ---
|
|
14
|
-
set "EXCLUDE_DIRS=.git versiones old_versions backup backups node_modules __pycache__ venv .venv env dist build out cache .cache .parcel-cache .vite .vscode .idea"
|
|
1
|
+
REM ============================================================
|
|
2
|
+
REM forge-git / config.cmd
|
|
3
|
+
REM Configuration - edit these values to customize
|
|
4
|
+
REM Called from init.cmd via: call config.cmd
|
|
5
|
+
REM ============================================================
|
|
6
|
+
|
|
7
|
+
set "FG_VERSION=1.4.0"
|
|
8
|
+
set "TAG_INITIAL=v1.0.0"
|
|
9
|
+
set "TAG_MESSAGE=Primera version estable"
|
|
10
|
+
set "BRANCH_MAIN=main"
|
|
11
|
+
set "COMMIT_MESSAGE=chore: initial commit"
|
|
12
|
+
|
|
13
|
+
REM --- Exclusions for subir.cmd (robocopy) ---
|
|
14
|
+
set "EXCLUDE_DIRS=.git versiones old_versions backup backups node_modules __pycache__ venv .venv env dist build out cache .cache .parcel-cache .vite .vscode .idea"
|
|
15
15
|
set "EXCLUDE_FILES=*.log *.tmp *.bak *.orig Thumbs.db .DS_Store"
|