> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wit.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Install wit and start using it in 5 minutes

## Install

Requires Node.js 22.13.0+.

```bash theme={null}
git clone https://github.com/abhiaiyer91/wit.git
cd wit
npm install && npm run build && npm link
```

Verify it works:

```bash theme={null}
wit --help
```

## Your First Repository

```bash theme={null}
mkdir my-project && cd my-project
wit init
```

## Basic Workflow

```bash theme={null}
# Stage and commit
wit add .
wit commit -m "Initial commit"

# Check status
wit status
wit log
```

## Branches

```bash theme={null}
wit switch -c feature    # create and switch
wit switch main          # switch back
wit branch -d feature    # delete
```

Uncommitted changes are automatically saved when switching and restored when you return.

## Undo Mistakes

```bash theme={null}
wit undo              # undo last operation
wit undo --steps 3    # undo last 3 operations
wit uncommit          # undo commit, keep changes staged
```

## AI Features (Optional)

Set an API key:

```bash theme={null}
export OPENAI_API_KEY=sk-your-key
# or
export ANTHROPIC_API_KEY=sk-ant-your-key
```

Then:

```bash theme={null}
wit ai commit -a -x    # AI writes commit message
wit ai review          # AI reviews staged changes
wit search "where is auth handled?"
```

## Visual Interfaces

```bash theme={null}
wit web    # browser UI at localhost:3847
wit ui     # terminal UI
wit graph  # ASCII commit graph
```

## Working with GitHub

```bash theme={null}
wit clone https://github.com/user/repo.git
wit push origin main
wit pull
```

Full GitHub compatibility. Works with any Git remote.

## Next Steps

<CardGroup cols={2}>
  <Card title="Commands" icon="terminal" href="/commands/overview">
    Full command reference
  </Card>

  <Card title="AI Features" icon="robot" href="/features/ai-powered">
    Deep dive on AI capabilities
  </Card>
</CardGroup>
