atharvalade opened a new pull request, #2998: URL: https://github.com/apache/iggy/pull/2998
## Which issue does this PR close? Closes #595 ## Rationale The login/logout commands and context infrastructure (list, use) already existed, but users had to manually edit `~/.iggy/contexts.toml` to create or remove contexts. This PR adds the missing `context create` and `context delete` subcommands so the entire credential workflow can be managed entirely through the CLI, similar to `docker login`/`docker logout` + `docker context`. ## What changed? Users could not create or delete contexts via the CLI — they had to manually edit TOML files. This made the docker-login-like workflow incomplete. Added `iggy context create <name> [--transport, --tcp-server-address, --username, ...]` and `iggy context delete <name>` commands with proper validation (duplicate prevention, cannot delete `default`, active context reset on deletion), along with integration tests covering success paths, edge cases, and help text. ## Local Execution - Passed - Pre-commit hooks ran ## AI Usage 1. Opus 4.6 2. Minimal AI used 3. Verified by building, running all commands locally with edge cases, and running cargo fmt/clippy/license checks 4. Yes <img width="647" height="216" alt="Screenshot 2026-03-20 at 2 08 46 PM" src="https://github.com/user-attachments/assets/a5e298b3-f227-4227-aa65-d2e1d3d8f079" /> <img width="758" height="698" alt="Screenshot 2026-03-20 at 2 08 53 PM" src="https://github.com/user-attachments/assets/1d6ca7f2-a66f-40ae-9a1d-ea6ada134c92" /> <img width="702" height="278" alt="Screenshot 2026-03-20 at 2 09 01 PM" src="https://github.com/user-attachments/assets/4bf1a14f-fa8e-4ab9-a645-36495fbb9cd8" /> <img width="812" height="80" alt="Screenshot 2026-03-20 at 2 09 16 PM" src="https://github.com/user-attachments/assets/188f2783-f762-4914-8b65-690e973e0e5c" /> <img width="822" height="77" alt="Screenshot 2026-03-20 at 2 09 22 PM" src="https://github.com/user-attachments/assets/e87c80f3-4c20-4332-acbe-a01a1b1ccc47" /> <img width="739" height="164" alt="Screenshot 2026-03-20 at 2 09 29 PM" src="https://github.com/user-attachments/assets/d50aa222-b52e-40d5-88f8-9c58b838b664" /> <img width="802" height="173" alt="Screenshot 2026-03-20 at 2 09 49 PM" src="https://github.com/user-attachments/assets/cd45fbcf-41e2-4ae4-8b47-31612940a775" /> <img width="811" height="186" alt="Screenshot 2026-03-20 at 2 09 56 PM" src="https://github.com/user-attachments/assets/db72994c-0bee-41e5-b822-2effc06464f8" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
