Scaffoldrite

Command Reference & Positional Arguments

This page documents all Scaffoldrite commands, their positional arguments, and usage patterns.


1. Argument Processing Rules

Before any command is executed:

  1. Flags are removed first
    All --flag or -f options are extracted and do NOT count as positional arguments.

  2. Remaining inputs are positional
    Their meaning depends entirely on the command and position.


2. Command Table (Positional Reference)

CommandPos 1Pos 2Pos 3Pos 4Notes
initCommand—Directory (--from-fs)—Initializes structure
updateCommand—Directory (--from-fs)—Updates from filesystem
mergeCommand—Directory (--from-fs)—Merges folder structure
listCommand———Lists structure or filesystem
createCommandPathfile or folder—Creates file/folder
deleteCommandPath——Deletes file/folder
renameCommandOld pathNew path/name—Renames file/folder
generateCommandOutput directory——Generates structure
validateCommand———Validates filesystem vs structure
findCommandSearch query——Finds file/folder
versionCommand———Shows version
lockCommand———Applies project restrictions
unlockCommand———Removes project restrictions
depsCommand———Analyzes project dependencies

3. Usage Examples

Initialize from filesystem

sr init --from-fs ./src
# Pos 3: ./src

Create a file

sr create src/components/Button.ts file --yes
# Pos 2: src/components/Button.ts
# Pos 3: file

Rename a file

sr rename src/oldfile.txt src/newfile.txt --yes
# Pos 2: oldfile.txt
# Pos 3: newfile.txt

Generate structure

sr generate .
# Pos 2: .

Find a component

sr find Button
# Pos 2: Button

Lock project rules

sr lock --git
# Positional args: none (flag-driven command)

Unlock project rules

sr unlock --structure
# Positional args: none (flag-driven command)

Analyze dependencies

sr deps --fs
# Positional args: none (analysis mode via flags)

4. Best Practices

  • Always provide required positional arguments first.
  • Use . as a safe default output directory.
  • Use --dry-run to preview changes before execution.
  • Check the command table before assuming argument meaning.
  • Flags can be combined in any order and are ignored in positional parsing.
  • Commands like lock, unlock, and deps are flag-driven only (no positional inputs).

On this page