Skip to content

Refactor: Remove Yeoman and switch to Oclif#640

Merged
dzikowski merged 41 commits intohyperledger-labs:mainfrom
OsamaRab3:del-yeoman
Mar 27, 2026
Merged

Refactor: Remove Yeoman and switch to Oclif#640
dzikowski merged 41 commits intohyperledger-labs:mainfrom
OsamaRab3:del-yeoman

Conversation

@OsamaRab3
Copy link
Copy Markdown
Contributor

Description

This PR introduces the initial setup for removing and fully migrating the CLI to Oclif.
The goal is to simplify the CLI implementation, remove the generator dependency, and make future features easier to maintain and extend.

All commands are currently working as expected, but I haven’t run the full automated test suite yet

Current Progress

Implemented so far

  • Replaced Yeoman-based commands with Oclif commands.
  • Added the new init implementation using Oclif.
  • fablo init now accepts the following optional features (order does not matter):
fablo init [node] [dev] [rest] [ccaas] [gateway]
  • Added initial Oclif commands for:
    • up
    • down
    • start
    • stop
    • recreate
    • prune

Basic usage examples

Run the network:

ffablo up -c fablo-config.json

The -c flag is optional if omitted, it will default to fablo-config.json just like the original Fablo CLI

Important Note

  • I temporarily named the executable ffablo to avoid conflicts with the existing fablo command during development.
    Once the migration is complete and fully tested, the name will be switched back to fablo
  • I haven’t removed the old Yeoman-based code yet.
    Once the new Oclif implementation is fully completed and fully tested, I will remove all legacy code.

@OsamaRab3
Copy link
Copy Markdown
Contributor Author

To run and test it locally, please follow these steps

npm install
npm run build
npm link

Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
dzikowski and others added 10 commits December 5, 2025 15:50
Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Comment thread package.json Outdated
Comment on lines +84 to +86
"bin": "ffablo",
"commands": "./generators/commands",
"dirname": "ffablo",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"bin": "ffablo",
"commands": "./generators/commands",
"dirname": "ffablo",
"bin": "fablo",
"commands": "./generators/commands",
"dirname": "fablo",

Comment thread src/app/index.ts Outdated
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we no longer need this file since we have migrated away from Yeoman. It does not seem to be used anywhere, so we can safely remove it.

Comment thread package.json Outdated
Comment on lines +25 to +27
"postpack": "shx rm -f oclif.manifest.json",
"posttest": "npm run lint",
"prepack": "oclif manifest && oclif readme",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need these scripts?

Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Comment thread fablo.sh Outdated
}

executeOnFabloDocker() {
# set -x
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we can remove that line

Comment thread fablo.sh Outdated
Comment on lines +202 to +213
if [ -f /etc/passwd ]; then
fablo_workspace_params+=(
-v /etc/passwd:/etc/passwd:ro
)
fi

if [ -f /etc/group ]; then
fablo_workspace_params+=(
-v /etc/group:/etc/group:ro
)
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does it do? do we need it?

Comment thread fablo.sh

if [ -f "$FABLO_TARGET/fabric-docker.sh" ]; then
echo "Executing Fablo Docker command: $1"
chmod +x "$FABLO_TARGET/fabric-docker.sh" || true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should not be required. We should grant x permission when the file is created

Comment thread tsconfig.json Outdated
Comment thread e2e-network/docker/test-01-v3-simple.sh Outdated
Comment thread Dockerfile Outdated
Comment thread Dockerfile Outdated
Comment thread docker-entrypoint.sh Outdated
Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
@mergify mergify bot mentioned this pull request Mar 6, 2026
dzikowski and others added 4 commits March 6, 2026 18:55
…f they exist

Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
…g and adjust output directories

Signed-off-by: OsamaRab3 <osrab3@gmail.com>
@OsamaRab3 OsamaRab3 requested a review from dzikowski March 6, 2026 22:58
…ted minimal files for security

Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
Signed-off-by: OsamaRab3 <osrab3@gmail.com>
@dzikowski dzikowski changed the title remove Yeoman and switched to Oclif for the CLI Refactor: Remove Yeoman and switch to Oclif Mar 27, 2026
@dzikowski dzikowski merged commit 7258020 into hyperledger-labs:main Mar 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants