Skip to main content

Usage

vibe init [options]

Description

Initialize a new VibeHub repository in the current directory. This sets up the necessary configuration for syncing with VibeHub.

What It Does

When you run vibe init, the CLI:
  1. Creates a .vibehub directory in your project
  2. Generates a local configuration file
  3. Prepares the project for pushing to VibeHub

Options

--name
string
Specify a project name (optional)
--description
string
Add a project description (optional)

Examples

Basic Initialization

cd my-project
vibe init

Initialize with Name

vibe init --name "My Awesome Project"

Initialize with Description

vibe init --name "API Server" --description "REST API backend service"

Directory Structure

After initialization, your project will have:
my-project/
├── .vibehub/
│   └── config.json
├── src/
├── package.json
└── ... (your files)
The .vibehub directory contains local configuration. You may want to add it to .gitignore.

Next Steps After Init

After initializing, you typically:
  1. Create a VibeHub project (if you haven’t already):
  2. Connect to the project:
    vibe set https://vibehub.co.in/username/project-name
    
  3. Push your code:
    vibe push
    

Common Workflows

New Project from Scratch

# Create and enter directory
mkdir my-new-project
cd my-new-project

# Initialize npm/your tooling
npm init -y

# Initialize VibeHub
vibe init

# Connect to VibeHub project
vibe set https://vibehub.co.in/username/my-new-project

# Start coding, then push
vibe push

Existing Project

# Enter your existing project
cd existing-project

# Initialize VibeHub
vibe init

# Connect to VibeHub project
vibe set https://vibehub.co.in/username/existing-project

# Push existing code
vibe push

Re-initializing

If you need to reinitialize (e.g., after deleting .vibehub):
vibe init
This creates a fresh configuration. You’ll need to run vibe set again to connect to your project.

Troubleshooting

Already Initialized

If the project is already initialized:
  • The command will notify you
  • Your existing configuration is preserved
  • Use vibe status to check current state

Permission Denied

If you can’t create the .vibehub directory:
  • Check you have write permissions in the current directory
  • Ensure you’re not in a read-only location