Workspace Commands
These commands manage workspace structure, package templates, and app package synchronization.
create
fsda create <workspace_name>
Creates a new workspace folder with baseline directories and config.
What happens:
- Creates
<workspace_name>/apps,<workspace_name>/modules, and<workspace_name>/packages. - Creates
<workspace_name>/fsda.yamlpopulated with package templates available in the CLI bundle. - Prints affected paths summary.
Rerun behavior:
- If workspace folder already exists, command stops and does not modify files.
configure
fsda configure
Synchronizes workspace/packages to match active package list in fsda.yaml.
What happens:
- Reads
fsda.yamlkeypackages. - Ignores unknown package names that are not available in bundled templates.
- Removes managed template package folders that are no longer listed.
- Generates missing managed template package folders that are listed.
- Prints dependency/dev-dependency/post-hook execution plan for each package template that is generated.
- Prints
added/removed/keptsummary and concise shared-package affected summary (package names only, not every file inside package templates).
Rerun behavior:
- Idempotent for already-synced state.
- Existing desired package folders are kept.
- Unlisted managed package folders are removed.
configure-app
fsda configure-app <app>
Synchronizes app dependencies and DI external wiring based on active workspace packages.
What happens:
- Targets
apps/<app>/pubspec.yaml. - Ensures managed package path dependencies under
dependencies:match active folders inworkspace/packages. - Removes managed package entries when package folder is no longer active.
- Reads
infra_*template specs and installs missing app dependencies viadart pub add. - Synchronizes infra DI snippets/imports in:
apps/<app>/lib/core/di/core_di.dartapps/<app>/lib/core/di/external_di.dart
- Synchronizes external config files in
apps/<app>/lib/core/externals. - Prints synchronization counters and affected paths.
Rerun behavior:
- Idempotent when app is already aligned.
- Adds only missing managed dependencies/snippets and removes stale managed ones.
list-pckg
fsda list-pckg
Lists package template names available inside the bundled package registry.
What happens:
- Reads bundled template catalog.
- Prints sorted package names.
Rerun behavior:
- Read-only command, no file changes.
add-pckg
fsda add-pckg <name>
Adds one package template to workspace and ensures it is active in fsda.yaml.
What happens:
- Validates package name and existence in bundled template catalog.
- Updates
fsda.yamlpackages list:- keeps if already active
- re-activates if previously commented
- appends if missing
- Generates
packages/<name>only when the folder does not already exist. - Runs template dependency/dev-dependency/post-hook pipeline for new package generation.
- Prints dependency/dev-dependency/post-hook execution plan before pipeline execution.
- Does not print per-file affected-path list for package template internals.
Rerun behavior:
- If
packages/<name>already exists, generation is skipped to prevent overwrite.