Todolist and Card Table Templates
The template library holds three kinds of template. Basecamp's own navigation separates them, and the CLI did not: templates list meant project templates, templates library meant to-do list templates, and nothing in either name said so. You found out by running one and reading what came back.
This groups the commands by the kind they act on, adds card table templates, and adds a way to turn work you already have into a template.
The command tree
basecamp templates projects list show create update delete construct construction
basecamp templates todolists list create duplicate duplication archive trash restore
basecamp templates card-tables list create duplicate duplication archive trash restore
basecamp todolists templatify <id> --in <project>
basecamp todolists templatification <id> <templatification_id> --in <project>
basecamp card-tables templatify <id> --in <project> [--move-cards-to-triage]
basecamp card-tables templatification <id> <templatification_id> --in <project>
The flat spellings are hidden and deprecated, not removed. templates list, show, create, update, delete, construct and construction run templates projects …; templates library runs templates todolists list; templates copy and copy-status run templates todolists duplicate and duplication. They're out of --help and completion, so the grouped tree is the only one people discover, and each prints a one-line deprecation notice to stderr naming the new command. Output is otherwise unchanged. copy and copy-status also survive as aliases inside the grouped paths.
The 252 surface lines the grouped tree replaces are acknowledged in .surface-breaking (hidden commands aren't in .surface), and STYLE.md now says to hide and deprecate shipped spellings rather than remove them.
Taking a template out of the library
Basecamp offers to archive or delete a to-do list or card table template, and the CLI could do neither. templates show and templates delete route to project templates and answer 404 for anything in the library.
A library template is a recording, so archive, trash and restore go through the recordings status endpoint. They are spelled the way every other recording in this CLI is: cards, files, messages, comments and todolists all use trash/archive/restore off one shared helper, so delete here would have made the templates tree the only place the same operation on the same kind of object gets a different verb. templates projects delete keeps its name because it is a different endpoint.
restore has no UI equivalent under that name; it is the CLI spelling of the "unarchive it" affordance on an archived template.
Naming
Three asynchronous operations now read the same way, each status command named after the record it polls:
construct -> construction
duplicate -> duplication
templatify -> templatification
duplicate follows the product, which calls the operation Duplicate everywhere it appears. The API resource stays copies and the SDK operation stays CreateLibraryCopy; that separation is deliberate and matches what the front-end already does, where the UI says Duplicate and the route says copies.
templatify and templatification are coined words, and they are the only honest ones available. The product has no name for this operation at all, so rather than borrowing an unrelated English word that would read ambiguously next to todolists' other verbs, the CLI takes the resource noun. The help text carries the definition at the point you meet it.
A card table group
There was no home for actions on a card table itself. cards manages what is inside a board, and its --card-table flag only picks which board to look in. basecamp card-tables is that home, and it starts with one verb because a command group is a resource identity rather than a subcommand quota. messageboards has exactly one action for the same reason.
Duplicating names the project, not the container
duplicate sends the destination project and Basecamp resolves the container from the template's kind: a to-do list into the project's To-dos tool, a card table onto its dock. --todoset still pins the container when a project has more than one to-do set, and still checks that it belongs to the project and is enabled, because a clear message beats a 404. card-tables duplicate has no container flag, because a project has exactly one dock.
Verification
Unit tests cover request shape and output rendering. e2e covers error paths, flag surface and help.
Run against a live server with a seeded database:
templatify <id>with no flags sends{}. The template came back carrying the source's title, "Strategy ideas".card-tables templatifyon the same board twice, with and without--move-cards-to-triage. With it, all 7 cards including one under an on-hold container are inKanban::Triage. Without it,Triage 1, Column 4, NotNowColumn 1, OnHold 1. The two results differ, so the flag reaches the wire rather than being dropped.templatificationon both kinds reports a real template name and id, and the matchingdestination_todolist/destination_card_tableis populated, so neither falls through to the generic completion message.templatificationwith its two ids transposed exits 2 withnot_found, rather than reading a different record.templatifyon a recording that cannot be templatified exits 4 withforbidden, which is a different code and shape from the transposed case, so the two stay distinguishable.templates todolists create,templates todolists listandtemplates card-tables listall succeed, and everything created during the run appears in the listings.- stderr was empty on every command, including both failures.
archive, trash and restore were not exercised against a live account from this branch. Unit tests pin each verb to its exact route (/:account/recordings/:id/status/{archived,trashed,active}.json) and assert a non-numeric id is rejected before any request goes out. The endpoints themselves were verified end to end against a local bc3 for both template kinds: each call returned 204 and the status transition was confirmed in the database.
Depends on
https://github.com/basecamp/basecamp-sdk/pull/877
Three commits use SDK operations added in basecamp-sdk#877 and do not compile against the current release. Bump go.mod before merging.