Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 44 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,49 @@ A Neovim plugin for automatic coding activity tracking. Works with the ShellTime
- **Event Debouncing** - Efficient heartbeat batching (30s cooldown per file)
- **Offline Support** - Queues heartbeats when daemon unavailable

## Prerequisites

### 1. Install ShellTime CLI

```bash
curl -sSL https://shelltime.xyz/i | bash
```
Comment on lines +21 to +23

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Piping curl to bash is convenient, but it's a security risk because it executes remote code without inspection. It's a good practice to offer a safer alternative where the user downloads the script first, can optionally inspect it, and then executes it.

Suggested change
```bash
curl -sSL https://shelltime.xyz/i | bash
```
curl -sSL https://shelltime.xyz/i -o install.sh
# You can inspect install.sh before running it
bash install.sh


After installation, reload your shell configuration:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Suggesting to 'reload your shell configuration' might be confusing for some users, and sourcing files like .bashrc doesn't always work for all shell setups (e.g., login shells using .bash_profile). A simpler and more reliable instruction is to open a new terminal. It's good to mention both options for completeness.

Suggested change
After installation, reload your shell configuration:
After installation, open a new terminal or reload your shell configuration:

- **zsh**: `source ~/.zshrc`
- **fish**: `source ~/.config/fish/config.fish`
- **bash**: `source ~/.bashrc`

### 2. Initialize and Authenticate

```bash
shelltime init
```

This will:
- Open your browser to authenticate with your ShellTime account
- Install shell hooks for your shell (zsh/fish/bash)
- Start the ShellTime daemon

### 3. Enable Code Tracking

Add the following to your ShellTime config (`~/.shelltime/config.yaml`):

```yaml
codeTracking:
enabled: true
```

Or in TOML format (`~/.shelltime/config.toml`):

```toml
[codeTracking]
enabled = true
```

## Requirements

- Neovim >= 0.10.0
- ShellTime daemon running (`/tmp/shelltime.sock`)
- Git (optional, for branch tracking)

## Installation
Expand Down Expand Up @@ -57,19 +96,11 @@ require("shelltime").setup()

## Quick Start

1. **Install the ShellTime daemon** - Make sure the daemon is running and listening on `/tmp/shelltime.sock`

2. **Create config file** at `~/.shelltime/config.yaml`:

```yaml
socketPath: /tmp/shelltime.sock
codeTracking:
enabled: true
```
1. **Complete the [Prerequisites](#prerequisites)** - Install CLI, authenticate, and enable code tracking

3. **Install the plugin** using your preferred plugin manager (see above)
2. **Install the plugin** using your preferred plugin manager (see above)

4. **Start coding** - The plugin automatically tracks your activity!
3. **Start coding** - The plugin automatically tracks your activity!

## Configuration

Expand Down Expand Up @@ -135,6 +166,7 @@ Each heartbeat includes:
1. Check if daemon is running:
```bash
ls -la /tmp/shelltime.sock
# If not present, run: shelltime init
```

2. Verify config file exists:
Expand Down