@neta-art/cohub-cli 1.20.2 → 1.20.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -60,6 +60,8 @@ cohub spaces prompt -h
60
60
  ```bash
61
61
  cohub spaces ls --json
62
62
  cohub spaces get <spaceId> --json
63
+ cohub -s <spaceId> spaces get
64
+ COHUB_SPACE_ID=<spaceId> cohub spaces get
63
65
  cohub spaces create --name "<name>" --description "<description>" --json
64
66
  cohub spaces update <spaceId> --slug <space-slug>
65
67
  cohub spaces rename <spaceId> "<new name>"
@@ -70,6 +72,7 @@ Many space-scoped commands need a target Space:
70
72
 
71
73
  ```bash
72
74
  cohub -s <spaceId> spaces prompt "message" --json
75
+ COHUB_SPACE_ID=<spaceId> cohub spaces prompt "message" --json
73
76
  ```
74
77
 
75
78
  ## Chats and prompts
@@ -296,18 +296,20 @@ export function registerSpaces(program) {
296
296
  });
297
297
  // ── spaces get ──
298
298
  spacesCmd
299
- .command("get <id>")
299
+ .command("get [id]")
300
300
  .description("Show space details")
301
301
  .option("--json", "Output as JSON")
302
302
  .action(async (id, opts) => {
303
+ const spaceId = id?.trim() || resolveSpace(spacesCmd);
303
304
  const client = createClient();
304
305
  try {
305
- const space = await client.spaces.get(id);
306
+ const space = await client.spaces.get(spaceId);
306
307
  if (jsonRequested(opts))
307
308
  return outJson(space);
308
309
  table([space], [
309
310
  { key: "id", label: "ID" },
310
311
  { key: "name", label: "Name" },
312
+ { key: "slug", label: "Slug" },
311
313
  { key: "description", label: "Description" },
312
314
  { key: "status", label: "Status" },
313
315
  { key: "createdAt", label: "Created" },
@@ -70,6 +70,14 @@ function printWork(work) {
70
70
  { key: "publishedAt", label: "Published" },
71
71
  ]);
72
72
  }
73
+ function printWorkUrls(result) {
74
+ const lines = [
75
+ result.publicUrl ? `Public URL: ${result.publicUrl}` : null,
76
+ result.content?.url ? `Content URL: ${result.content.url}` : null,
77
+ ].filter((line) => Boolean(line));
78
+ if (lines.length)
79
+ console.log(`\n${lines.join("\n")}`);
80
+ }
73
81
  async function confirmDelete(opts) {
74
82
  if (opts.yes)
75
83
  return;
@@ -124,6 +132,7 @@ export function registerWorks(program) {
124
132
  if (jsonRequested(opts))
125
133
  return outJson(result);
126
134
  printWork(result.work);
135
+ printWorkUrls(result);
127
136
  }
128
137
  catch (e) {
129
138
  handleHttp(e);
@@ -146,8 +155,7 @@ export function registerWorks(program) {
146
155
  if (jsonRequested(opts))
147
156
  return outJson(result);
148
157
  printWork(result.work);
149
- if (result.content?.url)
150
- console.log(`\nURL: ${result.content.url}`);
158
+ printWorkUrls(result);
151
159
  }
152
160
  catch (e) {
153
161
  handleHttp(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neta-art/cohub-cli",
3
- "version": "1.20.2",
3
+ "version": "1.20.4",
4
4
  "description": "CLI for Cohub — spaces, sessions, and agent collaboration.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -16,7 +16,7 @@
16
16
  "@neta-art/generation": "^0.1.7",
17
17
  "commander": "^14.0.3",
18
18
  "sharp": "^0.34.5",
19
- "@neta-art/cohub": "1.32.0"
19
+ "@neta-art/cohub": "1.33.0"
20
20
  },
21
21
  "publishConfig": {
22
22
  "access": "public"