HansaChat

Documentation

Channels and members

Create, join, archive channels and manage memberships with idempotent commands.

Channel commands read the current state first and converge on what you ask for: repeating a command that has already taken effect succeeds with changed: false instead of failing or duplicating.

hansa chat channels list                       # your channels
hansa chat channels browse                     # public channels you have not joined
hansa chat channels get --channel general      # one channel by slug or ID

Creating and changing channels

# Return "Marketing" and create it only if it does not exist yet
hansa chat channels ensure --name Marketing --type public

# Rename or change the type; a no-op when nothing changes
hansa chat channels set --channel marketing --name Marketing EU --type private

# Archive a channel (idempotent)
hansa chat channels archive --channel marketing

References use the backend's slug or ID, never display-name matching. Note that renaming a channel changes its slug — reference the channel by ID in scripts, or re-resolve it after a rename.

Membership

hansa chat channels join --channel general     # no-op when already a member
hansa chat channels leave --channel general    # no-op when not a member
hansa chat channels members --channel general  # list channel members
hansa chat channels invite --channel general --member 42

Direct messages

hansa chat channels dm --member 42

Returns the existing direct channel with that user or creates it; the backend treats this operation as idempotent.

Read state

Reading channels and messages never changes what counts as read. The only command that does is:

hansa chat channels mark-read --channel general

Workspace members

hansa chat members list --query igor   # search members by text
hansa chat members get --member 42     # one member by user ID