diff --git a/README.md b/README.md index eed85e3..ae8eaaa 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ Configuration is stored in `~/.config/lore/config.json` (or `$XDG_CONFIG_HOME/lo { "path": "group/project" }, { "path": "other-group/other-project" } ], + "defaultProject": "group/project", "sync": { "backfillDays": 14, "staleLockMinutes": 10, @@ -119,6 +120,7 @@ Configuration is stored in `~/.config/lore/config.json` (or `$XDG_CONFIG_HOME/lo | `gitlab` | `baseUrl` | -- | GitLab instance URL (required) | | `gitlab` | `tokenEnvVar` | `GITLAB_TOKEN` | Environment variable containing API token | | `projects` | `path` | -- | Project path (e.g., `group/project`) | +| *(top-level)* | `defaultProject` | none | Fallback project path used when `-p` is omitted. Must match a configured project path (exact or suffix). CLI `-p` always overrides. | | `sync` | `backfillDays` | `14` | Days to backfill on initial sync | | `sync` | `staleLockMinutes` | `10` | Minutes before sync lock considered stale | | `sync` | `heartbeatIntervalSeconds` | `30` | Frequency of lock heartbeat updates | @@ -204,7 +206,7 @@ When showing a single issue (e.g., `lore issues 123`), output includes: title, d #### Project Resolution -The `-p` / `--project` flag uses cascading match logic across all commands: +When `-p` / `--project` is omitted, the `defaultProject` from config is used as a fallback. If neither is set, results span all configured projects. When a project is specified (via `-p` or config default), it uses cascading match logic across all commands: 1. **Exact match**: `group/project` 2. **Case-insensitive**: `Group/Project` @@ -508,12 +510,15 @@ lore init --force # Overwrite existing config lore init --non-interactive # Fail if prompts needed ``` +When multiple projects are configured, `init` prompts whether to set a default project (used when `-p` is omitted). This can also be set via the `--default-project` flag. + In robot mode, `init` supports non-interactive setup via flags: ```bash lore -J init --gitlab-url https://gitlab.com \ --token-env-var GITLAB_TOKEN \ - --projects "group/project,other/project" + --projects "group/project,other/project" \ + --default-project group/project ``` ### `lore auth`