Command-line interface for File Architect - create file and directory structures from text descriptions.
# Global installation
npm install -g @filearchitect/cli
# Local installation
npm install @filearchitect/cli
# Create a directory structure from a file
filearchitect create structure.txt output
# Create a structure with file name replacements
filearchitect create structure.txt output --fileReplacements user:admin
# Create a structure with folder name replacements
filearchitect create structure.txt output --folderReplacements api:rest
# Validate a structure file
filearchitect validate structure.txt
# Show help
filearchitect --help
# Show version
filearchitect --version
# Simple directory structure
src/
components/
Button.tsx
Card.tsx
styles/
global.css
# Copy files/directories
config/
[~/configs/base.json] > base.json # Copy file
[~/templates/react/] > template/ # Copy directory
# Move files/directories
src/
(~/old-project/components/) > components/ # Move directory
(~/old-project/config.json) > config.json # Move file
# Replace in file/folder names
src/
user-profile.tsx # With --fileReplacements user:admin -> admin-profile.tsx
api/ # With --folderReplacements api:rest -> rest/
-
--fileReplacements <pattern>
: Replace text in file names (e.g. --fileReplacements user:admin) -
--folderReplacements <pattern>
: Replace text in folder names (e.g. --folderReplacements api:rest) -
-h, --help
: Show help message -
-v, --version
: Show version
- Clone and navigate to the repository:
git clone https://github.com/filearchitect/filearchitect.git
cd filearchitect
- Install dependencies:
pnpm install
- Build the packages:
pnpm build
- Use the CLI locally:
# Using the root package script
pnpm cli create structure.txt output
# Link globally
cd packages/cli
pnpm link --global
filearchitect create structure.txt output
# Run directly
node dist/cli.js create structure.txt output
- @filearchitect/core: Core library for programmatic usage