Update name to gitlore instead of gitlab-inbox
This commit is contained in:
208
README.md
208
README.md
@@ -1,6 +1,6 @@
|
||||
# gi - GitLab Inbox
|
||||
# Gitlore
|
||||
|
||||
A command-line tool for managing GitLab issues and merge requests locally. Syncs issues, MRs, discussions, and notes from GitLab to a local SQLite database for fast, offline-capable querying and filtering.
|
||||
Local GitLab data management with semantic search. Syncs issues, MRs, discussions, and notes from GitLab to a local SQLite database for fast, offline-capable querying and filtering.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -22,40 +22,40 @@ Or build from source:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
./target/release/gi --help
|
||||
./target/release/lore --help
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Initialize configuration (interactive)
|
||||
gi init
|
||||
lore init
|
||||
|
||||
# Verify authentication
|
||||
gi auth-test
|
||||
lore auth-test
|
||||
|
||||
# Sync issues from GitLab
|
||||
gi ingest --type issues
|
||||
lore ingest --type issues
|
||||
|
||||
# Sync merge requests from GitLab
|
||||
gi ingest --type mrs
|
||||
lore ingest --type mrs
|
||||
|
||||
# List recent issues
|
||||
gi list issues --limit 10
|
||||
lore list issues --limit 10
|
||||
|
||||
# List open merge requests
|
||||
gi list mrs --state opened
|
||||
lore list mrs --state opened
|
||||
|
||||
# Show issue details
|
||||
gi show issue 123 --project group/repo
|
||||
lore show issue 123 --project group/repo
|
||||
|
||||
# Show MR details with discussions
|
||||
gi show mr 456 --project group/repo
|
||||
lore show mr 456 --project group/repo
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Configuration is stored in `~/.config/gi/config.json` (or `$XDG_CONFIG_HOME/gi/config.json`).
|
||||
Configuration is stored in `~/.config/lore/config.json` (or `$XDG_CONFIG_HOME/lore/config.json`).
|
||||
|
||||
### Example Configuration
|
||||
|
||||
@@ -96,8 +96,8 @@ Configuration is stored in `~/.config/gi/config.json` (or `$XDG_CONFIG_HOME/gi/c
|
||||
| `sync` | `cursorRewindSeconds` | `2` | Seconds to rewind cursor for overlap safety |
|
||||
| `sync` | `primaryConcurrency` | `4` | Concurrent GitLab requests for primary resources |
|
||||
| `sync` | `dependentConcurrency` | `2` | Concurrent requests for dependent resources |
|
||||
| `storage` | `dbPath` | `~/.local/share/gi/gi.db` | Database file path |
|
||||
| `storage` | `backupDir` | `~/.local/share/gi/backups` | Backup directory |
|
||||
| `storage` | `dbPath` | `~/.local/share/lore/lore.db` | Database file path |
|
||||
| `storage` | `backupDir` | `~/.local/share/lore/backups` | Backup directory |
|
||||
| `storage` | `compressRawPayloads` | `true` | Compress stored API responses with gzip |
|
||||
| `embedding` | `provider` | `ollama` | Embedding provider |
|
||||
| `embedding` | `model` | `nomic-embed-text` | Model name for embeddings |
|
||||
@@ -108,9 +108,9 @@ Configuration is stored in `~/.config/gi/config.json` (or `$XDG_CONFIG_HOME/gi/c
|
||||
|
||||
The config file is resolved in this order:
|
||||
1. `--config` CLI flag
|
||||
2. `GI_CONFIG_PATH` environment variable
|
||||
3. `~/.config/gi/config.json` (XDG default)
|
||||
4. `./gi.config.json` (local fallback for development)
|
||||
2. `LORE_CONFIG_PATH` environment variable
|
||||
3. `~/.config/lore/config.json` (XDG default)
|
||||
4. `./lore.config.json` (local fallback for development)
|
||||
|
||||
### GitLab Token
|
||||
|
||||
@@ -125,40 +125,40 @@ Create a personal access token with `read_api` scope:
|
||||
| Variable | Purpose | Required |
|
||||
|----------|---------|----------|
|
||||
| `GITLAB_TOKEN` | GitLab API authentication token (name configurable via `gitlab.tokenEnvVar`) | Yes |
|
||||
| `GI_CONFIG_PATH` | Override config file location | No |
|
||||
| `LORE_CONFIG_PATH` | Override config file location | No |
|
||||
| `XDG_CONFIG_HOME` | XDG Base Directory for config (fallback: `~/.config`) | No |
|
||||
| `XDG_DATA_HOME` | XDG Base Directory for data (fallback: `~/.local/share`) | No |
|
||||
| `RUST_LOG` | Logging level filter (e.g., `gi=debug`) | No |
|
||||
| `RUST_LOG` | Logging level filter (e.g., `lore=debug`) | No |
|
||||
|
||||
## Commands
|
||||
|
||||
### `gi init`
|
||||
### `lore init`
|
||||
|
||||
Initialize configuration and database interactively.
|
||||
|
||||
```bash
|
||||
gi init # Interactive setup
|
||||
gi init --force # Overwrite existing config
|
||||
gi init --non-interactive # Fail if prompts needed
|
||||
lore init # Interactive setup
|
||||
lore init --force # Overwrite existing config
|
||||
lore init --non-interactive # Fail if prompts needed
|
||||
```
|
||||
|
||||
### `gi auth-test`
|
||||
### `lore auth-test`
|
||||
|
||||
Verify GitLab authentication is working.
|
||||
|
||||
```bash
|
||||
gi auth-test
|
||||
lore auth-test
|
||||
# Authenticated as @username (Full Name)
|
||||
# GitLab: https://gitlab.com
|
||||
```
|
||||
|
||||
### `gi doctor`
|
||||
### `lore doctor`
|
||||
|
||||
Check environment health and configuration.
|
||||
|
||||
```bash
|
||||
gi doctor # Human-readable output
|
||||
gi doctor --json # JSON output for scripting
|
||||
lore doctor # Human-readable output
|
||||
lore doctor --json # JSON output for scripting
|
||||
```
|
||||
|
||||
Checks performed:
|
||||
@@ -168,21 +168,21 @@ Checks performed:
|
||||
- Project accessibility
|
||||
- Ollama connectivity (optional)
|
||||
|
||||
### `gi ingest`
|
||||
### `lore ingest`
|
||||
|
||||
Sync data from GitLab to local database.
|
||||
|
||||
```bash
|
||||
# Issues
|
||||
gi ingest --type issues # Sync all projects
|
||||
gi ingest --type issues --project group/repo # Single project
|
||||
gi ingest --type issues --force # Override stale lock
|
||||
gi ingest --type issues --full # Full re-sync (reset cursors)
|
||||
lore ingest --type issues # Sync all projects
|
||||
lore ingest --type issues --project group/repo # Single project
|
||||
lore ingest --type issues --force # Override stale lock
|
||||
lore ingest --type issues --full # Full re-sync (reset cursors)
|
||||
|
||||
# Merge Requests
|
||||
gi ingest --type mrs # Sync all projects
|
||||
gi ingest --type mrs --project group/repo # Single project
|
||||
gi ingest --type mrs --full # Full re-sync (reset cursors)
|
||||
lore ingest --type mrs # Sync all projects
|
||||
lore ingest --type mrs --project group/repo # Single project
|
||||
lore ingest --type mrs --full # Full re-sync (reset cursors)
|
||||
```
|
||||
|
||||
The `--full` flag resets sync cursors and discussion watermarks, then fetches all data from scratch. Useful when:
|
||||
@@ -190,103 +190,103 @@ The `--full` flag resets sync cursors and discussion watermarks, then fetches al
|
||||
- You want to ensure complete data after schema changes
|
||||
- Troubleshooting sync issues
|
||||
|
||||
### `gi list issues`
|
||||
### `lore list issues`
|
||||
|
||||
Query issues from local database.
|
||||
|
||||
```bash
|
||||
gi list issues # Recent issues (default 50)
|
||||
gi list issues --limit 100 # More results
|
||||
gi list issues --state opened # Only open issues
|
||||
gi list issues --state closed # Only closed issues
|
||||
gi list issues --author username # By author (@ prefix optional)
|
||||
gi list issues --assignee username # By assignee (@ prefix optional)
|
||||
gi list issues --label bug # By label (AND logic)
|
||||
gi list issues --label bug --label urgent # Multiple labels
|
||||
gi list issues --milestone "v1.0" # By milestone title
|
||||
gi list issues --since 7d # Updated in last 7 days
|
||||
gi list issues --since 2w # Updated in last 2 weeks
|
||||
gi list issues --since 2024-01-01 # Updated since date
|
||||
gi list issues --due-before 2024-12-31 # Due before date
|
||||
gi list issues --has-due-date # Only issues with due dates
|
||||
gi list issues --project group/repo # Filter by project
|
||||
gi list issues --sort created --order asc # Sort options
|
||||
gi list issues --open # Open first result in browser
|
||||
gi list issues --json # JSON output
|
||||
lore list issues # Recent issues (default 50)
|
||||
lore list issues --limit 100 # More results
|
||||
lore list issues --state opened # Only open issues
|
||||
lore list issues --state closed # Only closed issues
|
||||
lore list issues --author username # By author (@ prefix optional)
|
||||
lore list issues --assignee username # By assignee (@ prefix optional)
|
||||
lore list issues --label bug # By label (AND logic)
|
||||
lore list issues --label bug --label urgent # Multiple labels
|
||||
lore list issues --milestone "v1.0" # By milestone title
|
||||
lore list issues --since 7d # Updated in last 7 days
|
||||
lore list issues --since 2w # Updated in last 2 weeks
|
||||
lore list issues --since 2024-01-01 # Updated since date
|
||||
lore list issues --due-before 2024-12-31 # Due before date
|
||||
lore list issues --has-due-date # Only issues with due dates
|
||||
lore list issues --project group/repo # Filter by project
|
||||
lore list issues --sort created --order asc # Sort options
|
||||
lore list issues --open # Open first result in browser
|
||||
lore list issues --json # JSON output
|
||||
```
|
||||
|
||||
Output includes: IID, title, state, author, assignee, labels, and update time.
|
||||
|
||||
### `gi list mrs`
|
||||
### `lore list mrs`
|
||||
|
||||
Query merge requests from local database.
|
||||
|
||||
```bash
|
||||
gi list mrs # Recent MRs (default 50)
|
||||
gi list mrs --limit 100 # More results
|
||||
gi list mrs --state opened # Only open MRs
|
||||
gi list mrs --state merged # Only merged MRs
|
||||
gi list mrs --state closed # Only closed MRs
|
||||
gi list mrs --state locked # Only locked MRs
|
||||
gi list mrs --state all # All states
|
||||
gi list mrs --author username # By author (@ prefix optional)
|
||||
gi list mrs --assignee username # By assignee (@ prefix optional)
|
||||
gi list mrs --reviewer username # By reviewer (@ prefix optional)
|
||||
gi list mrs --draft # Only draft/WIP MRs
|
||||
gi list mrs --no-draft # Exclude draft MRs
|
||||
gi list mrs --target-branch main # By target branch
|
||||
gi list mrs --source-branch feature/foo # By source branch
|
||||
gi list mrs --label needs-review # By label (AND logic)
|
||||
gi list mrs --since 7d # Updated in last 7 days
|
||||
gi list mrs --project group/repo # Filter by project
|
||||
gi list mrs --sort created --order asc # Sort options
|
||||
gi list mrs --open # Open first result in browser
|
||||
gi list mrs --json # JSON output
|
||||
lore list mrs # Recent MRs (default 50)
|
||||
lore list mrs --limit 100 # More results
|
||||
lore list mrs --state opened # Only open MRs
|
||||
lore list mrs --state merged # Only merged MRs
|
||||
lore list mrs --state closed # Only closed MRs
|
||||
lore list mrs --state locked # Only locked MRs
|
||||
lore list mrs --state all # All states
|
||||
lore list mrs --author username # By author (@ prefix optional)
|
||||
lore list mrs --assignee username # By assignee (@ prefix optional)
|
||||
lore list mrs --reviewer username # By reviewer (@ prefix optional)
|
||||
lore list mrs --draft # Only draft/WIP MRs
|
||||
lore list mrs --no-draft # Exclude draft MRs
|
||||
lore list mrs --target-branch main # By target branch
|
||||
lore list mrs --source-branch feature/foo # By source branch
|
||||
lore list mrs --label needs-review # By label (AND logic)
|
||||
lore list mrs --since 7d # Updated in last 7 days
|
||||
lore list mrs --project group/repo # Filter by project
|
||||
lore list mrs --sort created --order asc # Sort options
|
||||
lore list mrs --open # Open first result in browser
|
||||
lore list mrs --json # JSON output
|
||||
```
|
||||
|
||||
Output includes: IID, title (with [DRAFT] prefix if applicable), state, author, assignee, labels, and update time.
|
||||
|
||||
### `gi show issue`
|
||||
### `lore show issue`
|
||||
|
||||
Display detailed issue information.
|
||||
|
||||
```bash
|
||||
gi show issue 123 # Show issue #123
|
||||
gi show issue 123 --project group/repo # Disambiguate if needed
|
||||
lore show issue 123 # Show issue #123
|
||||
lore show issue 123 --project group/repo # Disambiguate if needed
|
||||
```
|
||||
|
||||
Shows: title, description, state, author, assignees, labels, milestone, due date, web URL, and threaded discussions.
|
||||
|
||||
### `gi show mr`
|
||||
### `lore show mr`
|
||||
|
||||
Display detailed merge request information.
|
||||
|
||||
```bash
|
||||
gi show mr 456 # Show MR !456
|
||||
gi show mr 456 --project group/repo # Disambiguate if needed
|
||||
lore show mr 456 # Show MR !456
|
||||
lore show mr 456 --project group/repo # Disambiguate if needed
|
||||
```
|
||||
|
||||
Shows: title, description, state, draft status, author, assignees, reviewers, labels, source/target branches, merge status, web URL, and threaded discussions. Inline code review comments (DiffNotes) display file context in the format `[src/file.ts:45]`.
|
||||
|
||||
### `gi count`
|
||||
### `lore count`
|
||||
|
||||
Count entities in local database.
|
||||
|
||||
```bash
|
||||
gi count issues # Total issues
|
||||
gi count mrs # Total MRs (with state breakdown)
|
||||
gi count discussions # Total discussions
|
||||
gi count discussions --type issue # Issue discussions only
|
||||
gi count discussions --type mr # MR discussions only
|
||||
gi count notes # Total notes (shows system vs user breakdown)
|
||||
lore count issues # Total issues
|
||||
lore count mrs # Total MRs (with state breakdown)
|
||||
lore count discussions # Total discussions
|
||||
lore count discussions --type issue # Issue discussions only
|
||||
lore count discussions --type mr # MR discussions only
|
||||
lore count notes # Total notes (shows system vs user breakdown)
|
||||
```
|
||||
|
||||
### `gi sync-status`
|
||||
### `lore sync-status`
|
||||
|
||||
Show current sync state and watermarks.
|
||||
|
||||
```bash
|
||||
gi sync-status
|
||||
lore sync-status
|
||||
```
|
||||
|
||||
Displays:
|
||||
@@ -294,40 +294,40 @@ Displays:
|
||||
- Cursor positions per project and resource type (issues and MRs)
|
||||
- Data summary counts
|
||||
|
||||
### `gi migrate`
|
||||
### `lore migrate`
|
||||
|
||||
Run pending database migrations.
|
||||
|
||||
```bash
|
||||
gi migrate
|
||||
lore migrate
|
||||
```
|
||||
|
||||
Shows current schema version and applies any pending migrations.
|
||||
|
||||
### `gi version`
|
||||
### `lore version`
|
||||
|
||||
Show version information.
|
||||
|
||||
```bash
|
||||
gi version
|
||||
lore version
|
||||
```
|
||||
|
||||
### `gi backup`
|
||||
### `lore backup`
|
||||
|
||||
Create timestamped database backup.
|
||||
|
||||
```bash
|
||||
gi backup
|
||||
lore backup
|
||||
```
|
||||
|
||||
*Note: Not yet implemented.*
|
||||
|
||||
### `gi reset`
|
||||
### `lore reset`
|
||||
|
||||
Delete database and reset all state.
|
||||
|
||||
```bash
|
||||
gi reset --confirm
|
||||
lore reset --confirm
|
||||
```
|
||||
|
||||
*Note: Not yet implemented.*
|
||||
@@ -356,12 +356,12 @@ Data is stored in SQLite with WAL mode and foreign keys enabled. Main tables:
|
||||
| `raw_payloads` | Compressed original API responses |
|
||||
| `schema_version` | Migration version tracking |
|
||||
|
||||
The database is stored at `~/.local/share/gi/gi.db` by default (XDG compliant).
|
||||
The database is stored at `~/.local/share/lore/lore.db` by default (XDG compliant).
|
||||
|
||||
## Global Options
|
||||
|
||||
```bash
|
||||
gi --config /path/to/config.json <command> # Use alternate config
|
||||
lore --config /path/to/config.json <command> # Use alternate config
|
||||
```
|
||||
|
||||
## Development
|
||||
@@ -371,10 +371,10 @@ gi --config /path/to/config.json <command> # Use alternate config
|
||||
cargo test
|
||||
|
||||
# Run with debug logging
|
||||
RUST_LOG=gi=debug gi list issues
|
||||
RUST_LOG=lore=debug lore list issues
|
||||
|
||||
# Run with trace logging
|
||||
RUST_LOG=gi=trace gi ingest --type issues
|
||||
RUST_LOG=lore=trace lore ingest --type issues
|
||||
|
||||
# Check formatting
|
||||
cargo fmt --check
|
||||
@@ -396,7 +396,7 @@ cargo clippy
|
||||
|
||||
## Current Status
|
||||
|
||||
This is Checkpoint 2 (CP2) of the GitLab Knowledge Engine project. Currently implemented:
|
||||
This is Checkpoint 2 (CP2) of the Gitlore project. Currently implemented:
|
||||
|
||||
- Issue ingestion with cursor-based incremental sync
|
||||
- Merge request ingestion with cursor-based incremental sync
|
||||
|
||||
Reference in New Issue
Block a user