Skip to content

Conversation

@giordano-lucas
Copy link
Member

@giordano-lucas giordano-lucas commented Feb 4, 2026

Rename all generic --id flags to resource-specific names for improved clarity:

  • page, files: --id → --session-id
  • functions: --id → --function-id
  • vaults: --id → --vault-id
  • profiles: --id → --profile-id
  • personas: --id → --persona-id
  • agents: --id → --agent-id

Also adds TestNoGenericIDFlags test to prevent regression.

Greptile Overview

Greptile Summary

This PR systematically renames all generic --id flags to resource-specific names across the CLI, improving clarity and preventing ambiguity when multiple resource types are in scope.

Key Changes

  • Command files: Renamed flags for all resource types (agents, files, functions, page, personas, profiles, vaults)
  • Test suite: Updated 9 integration test files with new flag names
  • Regression prevention: Added TestNoGenericIDFlags to prevent future use of generic --id flags

Flag Mappings

  • page, files: --id--session-id
  • functions: --id--function-id
  • vaults: --id--vault-id
  • profiles: --id--profile-id
  • personas: --id--persona-id
  • agents: --id--agent-id

Impact

This is a breaking change for CLI users who rely on the --id flag. Error messages and documentation have been updated accordingly. The refactoring is thorough and consistent across all affected commands.

Confidence Score: 5/5

  • Safe to merge - well-structured refactoring with comprehensive test coverage
  • The refactoring is mechanical, consistent, and thorough. All command files were updated alongside their corresponding tests. The addition of a regression test ensures this pattern is maintained going forward. No logical errors or security concerns.
  • No files require special attention

Important Files Changed

Filename Overview
internal/cmd/agents.go Renamed --id to --agent-id for status, stop, workflow-code, and replay commands; updated error message
internal/cmd/flags_test.go Added regression test to prevent future use of generic --id flags across all command groups
internal/cmd/functions.go Renamed --id to --function-id across all function commands; updated comments and examples
internal/cmd/page.go Renamed persistent --id flag to --session-id for all page commands
internal/cmd/vaults.go Renamed --id to --vault-id for credentials, update, and delete commands
tests/integration/functions_test.go Updated all function test cases to use --function-id and updated test comments
tests/integration/page_commands_test.go Updated all page command test cases to use --session-id instead of --id

Rename all generic --id flags to resource-specific names for improved clarity:
- page, files: --id → --session-id
- functions: --id → --function-id
- vaults: --id → --vault-id
- profiles: --id → --profile-id
- personas: --id → --persona-id
- agents: --id → --agent-id

Also adds TestNoGenericIDFlags test to prevent regression.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

7 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@giordano-lucas giordano-lucas merged commit 9f60d74 into main Feb 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants