CLICommands
initLast updated on
Last updated on
Initialize a new OpenForm project
Initializes a new OpenForm project in the current or specified directory.
Usage
ofm init [directory] [options]Arguments
| Argument | Description |
|---|---|
directory | Directory to initialize (defaults to current directory) |
Options
| Option | Description |
|---|---|
-y, --yes | Non-interactive mode (skip prompts) |
--name <name> | Project title (required in non-interactive mode) |
--description <desc> | Project description |
--visibility <public|private> | Project visibility (default: private) |
--nested | Allow creating nested project inside existing project |
--dry-run | Preview without creating files |
Description
The init command creates a new OpenForm project with the following structure:
my-project/
├── open-form.json # Project manifest
└── .ofm/ # CLI state directory
├── HEAD
├── index.json
├── config.json
├── commits/
└── objects/In interactive mode, you'll be prompted for:
- Project title
- Description (optional)
- Visibility (public or private)
- Directory name
Examples
Interactive initialization:
ofm initNon-interactive with all options:
ofm init --yes --name "My Project" --visibility privateInitialize in a specific directory:
ofm init my-new-projectPreview what would be created:
ofm init --dry-run --yes --name "Test Project"