Skip to content

Commit 001288e

Browse files
committed
refactor: rename project from 'gitforge' to 'gitcraft'
This commit updates all internal and external references to align with the new project name 'gitcraft'. This includes: - Rust crate name and binary target in Cargo.toml - Python package name in pyproject.toml - Command-line tool name in main.rs and help texts - All references in README.md and integration tests - Package names and URLs in the GitHub Actions build workflow - Cache directory name in utils/cache.rs - User agent string in utils/remote.rs - Formula file name in Homebrew publishing script - NPM package names in publishing scripts - GitHub Release asset names
1 parent 8d95552 commit 001288e

File tree

19 files changed

+166
-166
lines changed

19 files changed

+166
-166
lines changed

.github/workflows/build.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
fi
7979
8080
# Verify the binary was built
81-
BINARY_PATH="target/${{ matrix.build.TARGET }}/release/gitforge" # Adjust if your binary name is different
81+
BINARY_PATH="target/${{ matrix.build.TARGET }}/release/gitcraft" # Adjust if your binary name is different
8282
if [[ "${{ matrix.build.TARGET }}" == *"windows"* ]]; then
8383
BINARY_PATH="${BINARY_PATH}.exe"
8484
fi
@@ -108,7 +108,7 @@ jobs:
108108
run: |
109109
# Run maturin build for the current target platform
110110
# It will use the pyproject.toml in the repo root
111-
# Ensure your pyproject.toml has: bindings = "bin" and module-name = "gitforge" (or correct name)
111+
# Ensure your pyproject.toml has: bindings = "bin" and module-name = "gitcraft" (or correct name)
112112
maturin build --release --target ${{ matrix.build.TARGET }}
113113
114114
# Verify the wheel was created
@@ -142,7 +142,7 @@ jobs:
142142
mkdir -p npm/bin
143143
144144
# Copy the built binary to npm/bin (adjust path if different)
145-
BINARY_NAME="gitforge"
145+
BINARY_NAME="gitcraft"
146146
if [[ "${{ matrix.build.TARGET }}" == *"windows"* ]]; then
147147
BINARY_NAME="${BINARY_NAME}.exe"
148148
fi
@@ -151,10 +151,10 @@ jobs:
151151
# Create npm package.json (adjust as needed for your npm package structure)
152152
cat > npm/package.json << EOF
153153
{
154-
"name": "@rafaeljohn9/gitforge-${{ matrix.build.NAME }}",
154+
"name": "@rafaeljohn9/gitcraft-${{ matrix.build.NAME }}",
155155
"version": "$VERSION",
156156
"bin": {
157-
"gitforge": "./bin/$BINARY_NAME"
157+
"gitcraft": "./bin/$BINARY_NAME"
158158
},
159159
"files": ["bin/"],
160160
"license": "APACHE-2.0"
@@ -183,12 +183,12 @@ jobs:
183183
shell: bash
184184
run: |
185185
# Copy the built binary with a platform-specific name for GitHub Release
186-
BINARY_NAME="gitforge-${{ matrix.build.NAME }}"
186+
BINARY_NAME="gitcraft-${{ matrix.build.NAME }}"
187187
if [[ "${{ matrix.build.TARGET }}" == *"windows"* ]]; then
188188
BINARY_NAME="${BINARY_NAME}.exe"
189-
cp target/${{ matrix.build.TARGET }}/release/gitforge.exe $BINARY_NAME
189+
cp target/${{ matrix.build.TARGET }}/release/gitcraft.exe $BINARY_NAME
190190
else
191-
cp target/${{ matrix.build.TARGET }}/release/gitforge $BINARY_NAME
191+
cp target/${{ matrix.build.TARGET }}/release/gitcraft $BINARY_NAME
192192
chmod +x $BINARY_NAME
193193
fi
194194
echo "BINARY=$BINARY_NAME" >> $GITHUB_ENV
@@ -241,29 +241,29 @@ jobs:
241241

242242
- name: Create unified package
243243
run: |
244-
mkdir -p gitforge-unified/bin
244+
mkdir -p gitcraft-unified/bin
245245
246246
# Create package.json
247-
cat > gitforge-unified/package.json << EOF
247+
cat > gitcraft-unified/package.json << EOF
248248
{
249-
"name": "gitforge",
249+
"name": "gitcraft",
250250
"version": "${{ env.RELEASE_VERSION }}",
251251
"description": "GitHub Templates CLI tool (platform-aware wrapper)",
252252
"bin": {
253-
"gitforge": "./bin/gitforge"
253+
"gitcraft": "./bin/gitcraft"
254254
},
255255
"license": "Apache-2.0",
256256
"repository": {
257257
"type": "git",
258258
"url": "git+https://github.com/${{ github.repository }}.git"
259259
},
260260
"optionalDependencies": {
261-
"gitforge-linux-x64": "${{ env.RELEASE_VERSION }}",
262-
"gitforge-linux-arm64": "${{ env.RELEASE_VERSION }}",
263-
"gitforge-darwin-x64": "${{ env.RELEASE_VERSION }}",
264-
"gitforge-darwin-arm64": "${{ env.RELEASE_VERSION }}",
265-
"gitforge-windows-x64": "${{ env.RELEASE_VERSION }}",
266-
"gitforge-windows-arm64": "${{ env.RELEASE_VERSION }}"
261+
"gitcraft-linux-x64": "${{ env.RELEASE_VERSION }}",
262+
"gitcraft-linux-arm64": "${{ env.RELEASE_VERSION }}",
263+
"gitcraft-darwin-x64": "${{ env.RELEASE_VERSION }}",
264+
"gitcraft-darwin-arm64": "${{ env.RELEASE_VERSION }}",
265+
"gitcraft-windows-x64": "${{ env.RELEASE_VERSION }}",
266+
"gitcraft-windows-arm64": "${{ env.RELEASE_VERSION }}"
267267
},
268268
"files": ["bin/"],
269269
"engines": {
@@ -273,7 +273,7 @@ jobs:
273273
EOF
274274
275275
# Create the smart wrapper
276-
cat > gitforge-unified/bin/gitforge << 'EOF'
276+
cat > gitcraft-unified/bin/gitcraft << 'EOF'
277277
#!/usr/bin/env node
278278
279279
const { execFileSync } = require('child_process');
@@ -286,35 +286,35 @@ jobs:
286286
let packageName;
287287
if (platform === 'win32') {
288288
if (arch === 'arm64') {
289-
packageName = 'gitforge-windows-arm64';
289+
packageName = 'gitcraft-windows-arm64';
290290
} else {
291-
packageName = 'gitforge-windows-x64';
291+
packageName = 'gitcraft-windows-x64';
292292
}
293293
} else if (platform === 'darwin') {
294-
packageName = arch === 'arm64' ? 'gitforge-darwin-arm64' : 'gitforge-darwin-x64';
294+
packageName = arch === 'arm64' ? 'gitcraft-darwin-arm64' : 'gitcraft-darwin-x64';
295295
} else if (platform === 'linux') {
296-
packageName = arch === 'arm64' ? 'gitforge-linux-arm64' : 'gitforge-linux-x64';
296+
packageName = arch === 'arm64' ? 'gitcraft-linux-arm64' : 'gitcraft-linux-x64';
297297
} else {
298298
console.error(`Unsupported platform: ${platform}-${arch}`);
299299
process.exit(1);
300300
}
301301
302302
try {
303303
const pkgPath = require.resolve(`${packageName}/package.json`);
304-
const binPath = path.join(path.dirname(pkgPath), 'bin', platform === 'win32' ? 'gitforge.exe' : 'gitforge');
304+
const binPath = path.join(path.dirname(pkgPath), 'bin', platform === 'win32' ? 'gitcraft.exe' : 'gitcraft');
305305
execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
306306
} catch (err) {
307307
console.error(`Platform-specific package not found: ${packageName}`);
308308
console.error(`Install it directly:`);
309309
console.error(` npm install -g ${packageName}`);
310310
console.error(` OR`);
311-
console.error(` npm install -g gitforge-${platform}-${arch}`);
311+
console.error(` npm install -g gitcraft-${platform}-${arch}`);
312312
process.exit(1);
313313
}
314314
EOF
315315
316-
chmod +x gitforge-unified/bin/gitforge
317-
cd gitforge-unified
316+
chmod +x gitcraft-unified/bin/gitcraft
317+
cd gitcraft-unified
318318
npm publish
319319
env:
320320
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -333,9 +333,9 @@ jobs:
333333
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
334334
335335
# Get release assets
336-
LINUX_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gitforge-linux-x64-glibc"
337-
DARWIN_ARM_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gitforge-darwin-arm64"
338-
DARWIN_X64_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gitforge-darwin-x64"
336+
LINUX_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gitcraft-linux-x64-glibc"
337+
DARWIN_ARM_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gitcraft-darwin-arm64"
338+
DARWIN_X64_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gitcraft-darwin-x64"
339339
340340
# Calculate checksums
341341
wget -q $LINUX_URL -O linux-binary
@@ -350,7 +350,7 @@ jobs:
350350
cd homebrew-tap
351351
352352
# Create/update formula
353-
cat > Formula/gitforge.rb << EOF
353+
cat > Formula/gitcraft.rb << EOF
354354
class GhTemplates < Formula
355355
desc "GitHub Templates CLI tool"
356356
homepage "https://github.com/${{ github.repository }}"
@@ -369,18 +369,18 @@ jobs:
369369
sha256 "$LINUX_SHA"
370370
end
371371
def install
372-
bin.install "gitforge"
372+
bin.install "gitcraft"
373373
end
374374
375375
test do
376-
system "#{bin}/gitforge", "--version"
376+
system "#{bin}/gitcraft", "--version"
377377
end
378378
end
379379
EOF
380380
381381
# Commit and push
382382
git config user.name "github-actions[bot]"
383383
git config user.email "github-actions[bot]@users.noreply.github.com"
384-
git add Formula/gitforge.rb
385-
git commit -m "Update gitforge to $VERSION"
384+
git add Formula/gitcraft.rb
385+
git commit -m "Update gitcraft to $VERSION"
386386
git push https://x-access-token:${{ secrets.HOMEBREW_GITHUB_TOKEN }}@github.com/rafaeljohn9/homebrew-tap.git

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22

3-
name = "gitforge"
3+
name = "gitcraft"
44
version = "0.1.10"
55
edition = "2021"
66
authors = ["John Kagunda [email protected]"]

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,20 @@ You can help by:
6969

7070
#### Using npm:
7171
```bash
72-
npm install -g gitforge
72+
npm install -g gitcraft
7373
```
7474

7575
#### Using pip:
7676

7777
```
78-
pip install gitforge
78+
pip install gitcraft
7979
```
8080

8181

8282
#### Using Cargo:
8383

8484
```
85-
cargo install gitforge
85+
cargo install gitcraft
8686
```
8787

8888

@@ -98,19 +98,19 @@ cargo install gitforge
9898

9999
```sh
100100
# Add a Python .gitignore
101-
gitforge add gitignore python
101+
gitcraft add gitignore python
102102

103103
# List available gitignore templates
104-
gitforge list gitignores
104+
gitcraft list gitignores
105105

106106
# Add a bug report issue template
107-
gitforge add issue-template bug
107+
gitcraft add issue-template bug
108108

109109
# Preview a pull request template
110-
gitforge preview pr-template
110+
gitcraft preview pr-template
111111

112112
# List available licenses
113-
gitforge list licenses
113+
gitcraft list licenses
114114
```
115115

116116
#### Old Syntax (Still Supported Temporarily)
@@ -145,7 +145,7 @@ These will be updated as the migration completes.
145145
### Key Highlights:
146146
- Renamed to **GitForge**, with a clear **transition notice**.
147147
- Updated **badges, usage examples**, and **command syntax**.
148-
- Introduced new **natural language CLI syntax** (`gitforge add gitignore python`).
148+
- Introduced new **natural language CLI syntax** (`gitcraft add gitignore python`).
149149
- Kept **backward compatibility** note for developers still using `gh-templates`.
150150

151151
---

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ requires = ["maturin>=1.0,<2.0"]
33
build-backend = "maturin"
44

55
[project]
6-
name = "gitforge"
6+
name = "gitcraft"
77
version = "0.0.1" # This version should ideally match the Rust crate's version in Cargo.toml
88
description = "Scaffold new repositories quickly using templates hosted on GitHub. A Rust-powered CLI."
99
authors = [{ name = "ByteBarn", email = "[email protected]" }]
1010
requires-python = ">=3.8"
1111
keywords = [
12-
"gitforge", "scaffold", "template", "github", "repository", "cli", "developer", "productivity"
12+
"gitcraft", "scaffold", "template", "github", "repository", "cli", "developer", "productivity"
1313
]
1414
classifiers = [
1515
"Development Status :: 5 - Production/Stable",
@@ -33,11 +33,11 @@ classifiers = [
3333
readme = "README.md"
3434

3535
[project.urls]
36-
Repository = "https://github.com/Byte-Barn/gitforge"
36+
Repository = "https://github.com/Byte-Barn/gitcraft"
3737
Homepage = "https://gh-templates.dev/"
3838
Documentation = "https://gh-templates.dev/"
39-
Changelog = "https://github.com/Byte-Barn/gitforge/blob/main/CHANGELOG.md"
40-
Releases = "https://github.com/Byte-Barn/gitforge/releases"
39+
Changelog = "https://github.com/Byte-Barn/gitcraft/blob/main/CHANGELOG.md"
40+
Releases = "https://github.com/Byte-Barn/gitcraft/releases"
4141

4242

4343
# --- Maturin Configuration ---
@@ -50,7 +50,7 @@ bindings = "bin"
5050
manifest-path = "Cargo.toml"
5151
# The name of the Rust binary target as defined in Cargo.toml's [[bin]] section.
5252
# This is usually the same as the crate name if not explicitly set differently.
53-
module-name = "gitforge"
53+
module-name = "gitcraft"
5454
# Set to true to strip debug symbols from the final binary, reducing size.
5555
strip = true
5656

@@ -93,8 +93,8 @@ ignore_missing_imports = true
9393
files = [
9494
# Adjust paths if your Python files are in a different location relative to pyproject.toml
9595
# This section might be less relevant if there's minimal Python code.
96-
# "python/gitforge/*.py",
96+
# "python/gitcraft/*.py",
9797
]
9898

99-
[tool.gitforge]
99+
[tool.gitcraft]
100100
managed = false

src/commands/add.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use anyhow::Result;
22
use clap::Subcommand;
33
use crate::commands::{gitignore, issue, license, pr};
44

5-
/// Subcommands for `gitforge add ...`
5+
/// Subcommands for `gitcraft add ...`
66
#[derive(Subcommand)]
77
pub enum Command {
88
/// Add gitignore templates

src/commands/gitignore/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ fn find_template_in_cache<'a>(
8585
}
8686

8787
Err(anyhow::anyhow!(
88-
"Template '{}' not found in cache. Try `gitforge gitignore list` to view available templates.",
88+
"Template '{}' not found in cache. Try `gitcraft gitignore list` to view available templates.",
8989
template_name
9090
))
9191
}

src/commands/issue/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub mod preview;
88

99
// Global constants - these can stay in the main module file
1010
const GITHUB_RAW_BASE: &str =
11-
"https://raw.githubusercontent.com/rafaeljohn9/gitforge/main/templates";
11+
"https://raw.githubusercontent.com/rafaeljohn9/gitcraft/main/templates";
1212

1313
#[derive(Subcommand)]
1414
pub enum Command {

src/commands/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::commands::issue;
66
use crate::commands::license;
77
use crate::commands::pr;
88

9-
/// Subcommands for `gitforge list ...`
9+
/// Subcommands for `gitcraft list ...`
1010
#[derive(Subcommand)]
1111
pub enum Command {
1212
/// List available gitignore templates

src/commands/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ pub mod preview;
1313
#[derive(Subcommand)]
1414
pub enum Command {
1515
#[command(subcommand)]
16-
/// Add issue templates (e.g. `gitforge add issue-template`)
16+
/// Add issue templates (e.g. `gitcraft add issue-template`)
1717
Add(add::Command),
1818

1919
#[command(subcommand)]
20-
/// List issue templates (e.g. `gitforge list issue-templates`)
20+
/// List issue templates (e.g. `gitcraft list issue-templates`)
2121
List(list::Command),
2222

2323
#[command(subcommand)]
24-
/// Preview an issue template (e.g. `gitforge preview issue-template`)
24+
/// Preview an issue template (e.g. `gitcraft preview issue-template`)
2525
Preview(preview::Command),
2626
}
2727

0 commit comments

Comments
 (0)