Skip to content

Add --pos support for creating, moving, and reordering cards - #8

Open
antigp wants to merge 1 commit into
ZenoxZX:mainfrom
antigp:feat/card-position
Open

antigp wants to merge 1 commit into
ZenoxZX:mainfrom
antigp:feat/card-position

Conversation

@antigp

@antigp antigp commented Sep 13, 2026

Copy link
Copy Markdown

Cards currently cannot be placed at the top when created, and moving a card only selects its destination list. Add optional --pos top|bottom|number to --create-card, --move-card, and --update-card.

trello-cli --create-card LIST "New task" --pos top
trello-cli --move-card CARD LIST --pos bottom
trello-cli --update-card CARD --pos 123.5

The position is included in the same POST/PUT request. Omitting it preserves existing behavior; position-only updates reorder a card within its current list. Invalid, missing, or repeated position values return JSON INVALID_PARAM with exit code 1 before a request is sent. Literal --pos in a card name or another option's value remains text.

Includes CLI help, README examples, and an offline regression runner with no added package dependencies. The package and displayed version are updated to 1.2.0.

Validation:

  • dotnet run --project tests/PositionTests.csproj — 13 HTTP request checks and 22 parsing checks passed. HTTP requests are intercepted with dummy credentials; no real cards are created or changed.
  • dotnet pack src/TrelloCli.csproj -c Release — passed (existing package-readme advisory).
  • git diff --check — 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.

1 participant