This guide will help you run the ForgeTS CLI locally for development or testing purposes.
After Installation and Setup, follow these steps to verify the CLI functionality.
-
Build the Project
Ensure the latest code is compiled.
pnpm build
-
Run the CLI Help Command
You can execute the CLI directly via
pnpmfrom the root:pnpm --filter @forge-ts/cli start --help
Or navigate to the package:
cd packages/cli pnpm start --helpYou should see the help output listing available commands and options.
-
Test Scaffolding (Example)
To test the generator, you can run the scaffold command. Note: Being a scaffolding tool, this will generate files. It is recommended to run this in a temporary directory or clean up afterwards.
# (Assuming a 'new' or 'init' command exists - adjust based on actual CLI implementation) pnpm --filter @forge-ts/cli start new my-test-project
When developing new features for the CLI:
- Start the build in watch mode (if available) or rebuild manually after changes.
pnpm --filter @forge-ts/cli run build --watch
- Test your changes immediately by running the CLI against a test folder.
- "Command not found": Ensure dependencies are installed (
pnpm install) and the project is built (pnpm build). - Permission errors: Check file permissions, though
pnpmusually handles this.