Add org description (org_info) support to SDK and CLI#320
Conversation
The organization description ("org info") is only exposed by the backend as
an optional side-effect of the org rename endpoint (POST /v1/orgs/{oid}/name),
which requires a non-empty name. There was no way to set it from the Python
SDK/CLI: Organization.rename() dropped the description and there was no
dedicated helper.
- Organization.rename(new_name, description=None): optionally forwards a
description to the rename endpoint.
- Organization.set_description(description): reads the org's current name and
re-submits it unchanged so only the description is updated.
- CLI: `limacharlie org rename --description ...` and new
`limacharlie org set-description --description ...`.
- Unit tests + CHANGELOG entry.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SM95Gx4iwyHN4Yf8HaVmKU
Auto code reviewNo blocking issues found. Two independent bug/correctness passes plus manual verification confirmed: Two non-blocking notes — both inherent to reusing the rate-limited rename endpoint (the backend only exposes the description as a side-effect of rename), not defects in this code:
python-limacharlie/limacharlie/sdk/organization.py Lines 231 to 239 in 1911bd0
python-limacharlie/limacharlie/commands/org.py Lines 385 to 392 in 1911bd0 |
The lazy-loading regression test pins the exact subcommand set for each group; the new `org set-description` command must be added to EXPECTED_SUBCOMMANDS or test_subcommands_match[org] fails. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SM95Gx4iwyHN4Yf8HaVmKU
Summary
Answers a support question: how to set an organization's description (org info) via the Python SDK.
The description is only exposed by the backend as an optional side-effect of the org rename endpoint (
POST /v1/orgs/{oid}/name), which requires a non-emptyname. Previously there was no way to set it from the SDK/CLI —Organization.rename()dropped thedescriptionparam and there was no dedicated helper.Changes
Organization.rename(new_name, description=None)— optionally forwards adescriptionto the rename endpoint.Organization.set_description(description)— reads the org's current name viaget_info()and re-submits it unchanged, so only the description is updated. This is the ergonomic "just set the description on an existing org" call.limacharlie org rename --name ... --description ...limacharlie org set-description --description ...set_descriptionreuse-name + missing-name error) and CHANGELOG entry.Notes
POST /v1/orgs/{oid}/name(permbilling.ctrl, rate-limited 3/hour server-side).Organization.get_info()["desc"].🤖 Generated with Claude Code