Skip to content

Commit c3dec07

Browse files
jdillonclaude
andcommitted
refactor: complete forge→commando rename in bin scripts and examples
- bin/cmdo: rename run_forge→run_commando, update Cellar paths and error messages - bin/cmdo-dev: rename run_forge→run_commando, update comments - bin/install.sh: update default repo URLs to jdillon/commando - examples/*/README.md: update commands (forge→cmdo), paths (.forge→.commando) - examples/*/cmdo: new symlinks replacing forge symlinks - beads: set issue_prefix=commando, close forge-kdf, update forge-dfh Related: forge-aaj 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a7621d6 commit c3dec07

File tree

13 files changed

+96
-95
lines changed

13 files changed

+96
-95
lines changed

.beads/beads.jsonl

Lines changed: 5 additions & 4 deletions
Large diffs are not rendered by default.

.beads/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"database": "beads.db",
33
"jsonl_export": "beads.jsonl",
4-
"last_bd_version": "0.28.0"
4+
"last_bd_version": "0.27.0"
55
}

bin/cmdo

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ resolve_paths() {
3838
[[ "${script_path}" != /* ]] && script_path="${script_dir}/${script_path}"
3939
done
4040

41-
# Installed mode only - forge-dev handles dev mode
41+
# Installed mode only - cmdo-dev handles dev mode
4242
SCRIPT_DIR="$(cd "$(dirname "${script_path}")" && pwd)"
4343
}
4444

@@ -48,9 +48,9 @@ resolve_paths() {
4848

4949
detect_homebrew_install() {
5050
# Check if we're running from a Homebrew Cellar path
51-
# Pattern: /opt/homebrew/Cellar/forge/<version>/libexec/bin
52-
# or: /usr/local/Cellar/forge/<version>/libexec/bin (Intel Mac)
53-
if [[ "${SCRIPT_DIR}" == */Cellar/forge/*/libexec/bin ]]; then
51+
# Pattern: /opt/homebrew/Cellar/commando/<version>/libexec/bin
52+
# or: /usr/local/Cellar/commando/<version>/libexec/bin (Intel Mac)
53+
if [[ "${SCRIPT_DIR}" == */Cellar/commando/*/libexec/bin ]]; then
5454
# Return libexec path (parent of bin)
5555
echo "${SCRIPT_DIR%/bin}"
5656
return 0
@@ -93,22 +93,22 @@ validate_installation() {
9393
run_homebrew_bootstrap "${libexec}"
9494
# Verify bootstrap succeeded
9595
if [[ ! -f "${COMMANDO_CLI}" ]]; then
96-
echo "ERROR: Homebrew bootstrap failed - forge CLI not found" >&2
96+
echo "ERROR: Homebrew bootstrap failed - commando CLI not found" >&2
9797
exit 1
9898
fi
9999
else
100-
echo "ERROR: Forge installation is corrupted" >&2
100+
echo "ERROR: Commando installation is corrupted" >&2
101101
echo "Expected: ${COMMANDO_CLI}" >&2
102102
exit 1
103103
fi
104104
fi
105105
}
106106

107107
#
108-
# Forge execution
108+
# Commando execution
109109
#
110110

111-
run_forge() {
111+
run_commando() {
112112
local is_restarted="$1"
113113
shift
114114

@@ -118,7 +118,7 @@ run_forge() {
118118
fi
119119

120120
# Use --preserve-symlinks to prevent Bun from resolving through symlinks
121-
# This allows user commands symlinked into node_modules to resolve forge correctly
121+
# This allows user commands symlinked into node_modules to resolve commando correctly
122122
bun run --preserve-symlinks "${COMMANDO_CLI}" "$@"
123123
}
124124

@@ -130,7 +130,7 @@ handle_restart() {
130130
# "I checked it very thoroughly, and that quite definitely is the answer."
131131
if [[ $exit_code -eq 42 ]]; then
132132
# Re-run with COMMANDO_RESTARTED=1 to prevent infinite loops
133-
run_forge "true" "$@"
133+
run_commando "true" "$@"
134134
return $?
135135
fi
136136

@@ -147,9 +147,9 @@ main() {
147147
setup_environment
148148
validate_installation
149149

150-
# Run forge and handle restart if needed
150+
# Run commando and handle restart if needed
151151
set +e # Don't exit on non-zero
152-
run_forge "false" "$@"
152+
run_commando "false" "$@"
153153
local exit_code=$?
154154
set -e
155155

bin/cmdo-dev

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ set -euo pipefail
3030
#
3131

3232
PROJECT_ROOT=""
33-
# COMMANDO_HOME set in setup_environment() to dev-home/forge
33+
# COMMANDO_HOME set in setup_environment() to dev-home/commando
3434

3535
#
3636
# Path resolution
@@ -55,7 +55,7 @@ setup_environment() {
5555
export COMMANDO_HOME
5656
export NODE_PATH="${COMMANDO_HOME}/node_modules"
5757

58-
# Ensure dev-home forge structure exists
58+
# Ensure dev-home commando structure exists
5959
mkdir -p "${COMMANDO_HOME}"
6060
}
6161

@@ -192,7 +192,7 @@ generate_version_info() {
192192
# Build semver
193193
local semver="${version}+${date_time}.${hash}"
194194

195-
# Write version.json to forge home
195+
# Write version.json to commando home
196196
cat > "${COMMANDO_HOME}/version.json" <<EOF
197197
{
198198
"version": "$version",
@@ -229,7 +229,7 @@ rebuild_and_install() {
229229
# Delegate to bin/cmdo
230230
#
231231

232-
run_forge() {
232+
run_commando() {
233233
# Delegate to bin/cmdo script (installed mode bootstrap)
234234
# It will use our COMMANDO_HOME environment variable
235235
exec "${PROJECT_ROOT}/bin/cmdo" "$@"
@@ -251,7 +251,7 @@ main() {
251251

252252
# Delegate to bin/cmdo (will exec, replacing this process)
253253
# bin/cmdo handles restart logic (exit code 42)
254-
run_forge "$@"
254+
run_commando "$@"
255255
}
256256

257257
# Execute main with all arguments

bin/install.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
# limitations under the License.
1515
set -euo pipefail
1616

17-
# Forge v2 Installation Script
18-
# Installs forge to ~/.commando and creates wrapper at ~/.local/bin/cmdo
17+
# Commando Installation Script
18+
# Installs commando to ~/.commando and creates wrapper at ~/.local/bin/cmdo
1919

2020
# Color output (only if terminal supports it)
2121
if [[ -t 1 ]] && command -v tput &>/dev/null && tput colors &>/dev/null && [[ $(tput colors) -ge 8 ]]; then
@@ -79,7 +79,7 @@ while [[ $# -gt 0 ]]; do
7979
echo " -h, --help Show this help message"
8080
echo ""
8181
echo "Environment variables:"
82-
echo " COMMANDO_REPO Repository URL (default: git+ssh://git@github.com/jdillon/forge)"
82+
echo " COMMANDO_REPO Repository URL (default: git+ssh://git@github.com/jdillon/commando)"
8383
echo " COMMANDO_BRANCH Branch to install (default: module-system)"
8484
exit 0
8585
;;
@@ -106,7 +106,7 @@ if [[ -z "${COMMANDO_REPO:-}" ]]; then
106106
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
107107
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
108108

109-
# Check if we're in the forge git repo and have a local tarball
109+
# Check if we're in the commando git repo and have a local tarball
110110
if [[ -d "${REPO_ROOT}/.git" ]]; then
111111
# Find any planet57-commando-*.tgz tarball
112112
TARBALL=$(ls -t "${REPO_ROOT}/build/planet57-commando-"*.tgz 2>/dev/null | head -n1)
@@ -117,15 +117,15 @@ if [[ -z "${COMMANDO_REPO:-}" ]]; then
117117
info "Detected local development mode - using tarball: $(basename "${TARBALL}")"
118118
else
119119
# Use GitHub for production installs
120-
COMMANDO_REPO="git+ssh://git@github.com/jdillon/forge"
120+
COMMANDO_REPO="git+ssh://git@github.com/jdillon/commando"
121121
# Determine branch (default to module-system for Phase 1, unless explicitly set to empty)
122122
if [[ -z "${COMMANDO_BRANCH+x}" ]]; then
123123
COMMANDO_BRANCH="module-system"
124124
fi
125125
fi
126126
else
127127
# Use GitHub for production installs
128-
COMMANDO_REPO="git+ssh://git@github.com/jdillon/forge"
128+
COMMANDO_REPO="git+ssh://git@github.com/jdillon/commando"
129129
# Determine branch (default to module-system for Phase 1, unless explicitly set to empty)
130130
if [[ -z "${COMMANDO_BRANCH+x}" ]]; then
131131
COMMANDO_BRANCH="module-system"
@@ -260,7 +260,7 @@ else
260260
SEMVER="${VERSION}+${DATE_TIME}"
261261
fi
262262

263-
# Write version.json to forge home
263+
# Write version.json to commando home
264264
cat > "${COMMANDO_HOME}/version.json" <<EOF
265265
{
266266
"version": "$VERSION",

examples/basic/README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Basic Example
22

3-
Minimal Forge module demonstrating simple command patterns.
3+
Minimal Commando module demonstrating simple command patterns.
44

55
## What This Demonstrates
66

@@ -13,8 +13,8 @@ Minimal Forge module demonstrating simple command patterns.
1313

1414
```
1515
basic/
16-
├── .forge/
17-
│ ├── config.yml # Forge configuration
16+
├── .commando/
17+
│ ├── config.yml # Commando configuration
1818
│ ├── simple.ts # Command module
1919
│ └── .gitignore
2020
└── README.md
@@ -27,11 +27,11 @@ basic/
2727
cd examples/basic
2828

2929
# Run commands
30-
forge basic ping
31-
forge basic greet
32-
forge basic greet Alice
33-
forge basic greet --loud
34-
forge basic greet Alice --loud
30+
cmdo basic ping
31+
cmdo basic greet
32+
cmdo basic greet Alice
33+
cmdo basic greet --loud
34+
cmdo basic greet Alice --loud
3535
```
3636

3737
## Commands
@@ -54,19 +54,19 @@ Greet someone by name.
5454

5555
**Examples**:
5656
```bash
57-
forge basic greet # Hello, Forge User!
58-
forge basic greet Alice # Hello, Alice!
59-
forge basic greet --loud # HELLO, FORGE USER!
60-
forge basic greet Bob --loud # HELLO, BOB!
57+
cmdo basic greet # Hello, Commando User!
58+
cmdo basic greet Alice # Hello, Alice!
59+
cmdo basic greet --loud # HELLO, COMMANDO USER!
60+
cmdo basic greet Bob --loud # HELLO, BOB!
6161
```
6262

6363
## Module Code
6464

65-
See `.forge/simple.ts` for the implementation. Key features:
65+
See `.commando/simple.ts` for the implementation. Key features:
6666

6767
1. **Module metadata** - Uses `__module__` export to customize group name:
6868
```typescript
69-
export const __module__: ForgeModuleMetadata = {
69+
export const __module__: CommandoModuleMetadata = {
7070
group: 'basic',
7171
description: 'Basic example commands'
7272
};
@@ -84,7 +84,7 @@ See `.forge/simple.ts` for the implementation. Key features:
8484

8585
3. **Command with options** - Use `defineCommand` to add arguments/flags:
8686
```typescript
87-
export const greet: ForgeCommand = {
87+
export const greet: CommandoCommand = {
8888
description: 'Greet someone',
8989
defineCommand: (cmd) =>
9090
cmd.argument('[name]', '...').option('-l, --loud', '...'),
@@ -101,15 +101,15 @@ See `.forge/simple.ts` for the implementation. Key features:
101101

102102
## Config
103103

104-
See `.forge/config.yml`:
104+
See `.commando/config.yml`:
105105

106106
```yaml
107107
modules:
108108
- ./simple
109109

110110
settings:
111111
basic.greet:
112-
defaultName: Forge User
112+
defaultName: Commando User
113113
```
114114
115115
## Comparison with Website Example

examples/basic/cmdo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../bin/cmdo-dev

examples/basic/forge

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/deps/README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Dependencies Example
22

3-
This example demonstrates Phase 2 dependency management - installing npm packages to forge home and importing them in modules.
3+
This example demonstrates Phase 2 dependency management - installing npm packages to commando home and importing them in modules.
44

55
## What This Does
66

77
- Declares `cowsay` as a dependency in `config.yml`
8-
- Auto-installs to `~/.local/share/forge/node_modules/` on first run
8+
- Auto-installs to `~/.commando/node_modules/` on first run
99
- Imports and uses `cowsay` in the `moo` module
1010

1111
## Usage
@@ -14,7 +14,7 @@ This example demonstrates Phase 2 dependency management - installing npm package
1414

1515
```bash
1616
cd examples/deps
17-
forge moo say hello
17+
cmdo moo say hello
1818
```
1919

2020
On first run, you'll see:
@@ -36,18 +36,18 @@ Restarting to pick up changes...
3636
### Subsequent Runs (No Install)
3737

3838
```bash
39-
forge moo say "Phase 2 is working!"
40-
forge moo think "Dependencies are seamless..."
39+
cmdo moo say "Phase 2 is working!"
40+
cmdo moo think "Dependencies are seamless..."
4141
```
4242

4343
## Commands
4444

45-
- `forge moo say <text>` - Make a cow say something
46-
- `forge moo think <text>` - Make a cow think something (with thought bubbles)
45+
- `cmdo moo say <text>` - Make a cow say something
46+
- `cmdo moo think <text>` - Make a cow think something (with thought bubbles)
4747

4848
## How It Works
4949

50-
1. **Config** (`.forge/config.yml`):
50+
1. **Config** (`.commando/config.yml`):
5151
```yaml
5252
dependencies:
5353
- cowsay
@@ -56,11 +56,11 @@ forge moo think "Dependencies are seamless..."
5656
- ./moo
5757
```
5858
59-
2. **Module** (`.forge/moo.ts`):
59+
2. **Module** (`.commando/moo.ts`):
6060
```typescript
6161
import cowsay from 'cowsay';
6262
63-
export const say: ForgeCommand = {
63+
export const say: CommandoCommand = {
6464
description: 'Make a cow say something',
6565
execute: async (options, args, context) => {
6666
const text = args.join(' ');
@@ -70,18 +70,18 @@ forge moo think "Dependencies are seamless..."
7070
```
7171

7272
3. **Magic**:
73-
- Forge detects missing dependency
74-
- Runs `bun add cowsay` in `~/.local/share/forge/`
73+
- Commando detects missing dependency
74+
- Runs `bun add cowsay` in `~/.commando/`
7575
- Exits with code 42
76-
- Wrapper restarts with `--forge-restarted` flag
76+
- Wrapper restarts with `--commando-restarted` flag
7777
- Module imports work, command executes
7878

7979
## Verify Installation
8080

8181
```bash
82-
# Check what's installed in forge home
83-
ls ~/.local/share/forge/node_modules/
82+
# Check what's installed in commando home
83+
ls ~/.commando/node_modules/
8484
8585
# Check package.json
86-
cat ~/.local/share/forge/package.json
86+
cat ~/.commando/package.json
8787
```

0 commit comments

Comments
 (0)