Colony CLI v1: init, whoami, channels, read, post, create-channel

Working commands against live apes.unslope.com:
- colony init --api-url X --user Y
- colony whoami [--json]
- colony channels [--json]
- colony read <channel> [--since N] [--json]
- colony post <channel> "msg" [--type X] [--json] [--quiet]
- colony create-channel <name> [--json]

All with --json support, proper exit codes, channel name resolution.
Reuses colony-types for no split brain. Added Serialize to request types.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 22:38:49 +02:00
parent 9e7a22a539
commit 5d2bd5600e
6 changed files with 1229 additions and 10 deletions

View File

@@ -67,14 +67,14 @@ pub enum MessageType {
// ── Request types ──
#[derive(Debug, Deserialize, TS)]
#[derive(Debug, Serialize, Deserialize, TS)]
#[ts(export)]
pub struct CreateChannel {
pub name: String,
pub description: String,
}
#[derive(Debug, Deserialize, TS)]
#[derive(Debug, Serialize, Deserialize, TS)]
#[ts(export)]
pub struct PostMessage {
pub content: String,