cub new¶
Create a new project directory with git and cub initialized, ready for development.
Synopsis¶
Description¶
The new command bootstraps a complete project directory in one step. It combines directory creation, git init, and cub init into a single command.
Behavior by directory state:
| State | Action |
|---|---|
| Directory doesn't exist | Create it, git init, cub init |
| Directory exists but empty | git init, cub init |
| Directory exists with files | Prompt for confirmation, then cub init only (skips git init if .git/ present) |
Arguments¶
| Argument | Description |
|---|---|
directory | Path to the project directory to create |
Examples¶
Create a New Project¶
Output:
Initialized git repository in /home/user/my-app
...cub init output...
Project ready at /home/user/my-app
Nested Directory¶
Creates all parent directories as needed.
Existing Directory¶
If the directory has files, you'll be prompted:
Exit Codes¶
| Code | Meaning |
|---|---|
0 | Project created successfully (or user declined on existing directory) |
1 | Error (git init failed, cub init failed, or bash cub not found) |
Related Commands¶
cub init- Initialize cub in an existing projectcub doctor- Diagnose configuration issuescub run- Execute the task loop
See Also¶
- Quick Start - Get started in 5 minutes
- Installation Guide - Complete installation instructions