CircleCI-Public / CircleCI-Public/chunk-cli
`chunk task config` project picker does not scale for large CircleCI accounts
- Dominant language
- Go
- Stars
- 86
- Forks
- 41
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 56
Description
`chunk task config` is the only supported way to create `.chunk/run.json`, but its project-selection step does not scale for CircleCI accounts with many followed projects.
On a verified account with **438 followed projects**, the wizard loads every project into a single `SelectFromList` with no search, filter, or pagination. Navigating to the target repo with arrow keys is impractical.
## Current behavior
1. `chunk task config` calls `GET /api/v1.1/projects` and lists all followed projects alphabetically.
2. The user must scroll through the full list in a TTY (`↑/↓` only).
3. The fallback ("Enter manually") still requires looking up org and project UUIDs elsewhere.
There is no `--project` flag or other way to skip the picker when the project slug is already known (e.g. `gh/CircleCI-Public/chunk-cli`).
## Impact
- **Who:** Users on CircleCI accounts with hundreds or thousands of followed projects.
- **Workaround:** Hand-edit `.chunk/run.json`, or use "Enter manually" after looking up UUIDs in the web UI or API.
- **Cost:** First-time setup is blocked unless the user already knows how to bypass the wizard.
## Reproduction
```bash
chunk auth set circleci
chunk task config
# All followed projects appear in one flat list.
# On a large account, reaching the target project is impractical.
```
Verified on an account with 438 followed projects across 8 orgs. The count and UI implementation (flat list, no search) are sufficient to confirm the problem without completing the full interactive walkthrough.
## Expected behavior
Users should be able to specify the target project without scrolling through the full followed-projects list:
```bash
chunk task config --project gh/CircleCI-Public/chunk-cli
```
The wizard should resolve org and project IDs from the slug and continue to the remaining prompts.
A longer-term improvement would be search or org/repo filtering in the interactive picker, but a slug flag is the highest-leverage fix.
## Proposed fix
- [ ] Add `--project ` to `chunk task config` to skip project selection
- [ ] Resolve org/project IDs via `GetProjectBySlug`
- [ ] Skip `ListFollowedProjects` when `--project` is set
- [ ] Document the flag in `docs/CLI.md`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the `chunk task config` command and trace its project-selection flow, especially `ListFollowedProjects` and `GetProjectBySlug`. Verify the `--project` path continues through the remaining prompts without listing all projects, then document the flag in `docs/CLI.md` and confirm the existing interactive flow still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100