diff --git a/artdag.py b/artdag.py index fc31a0e..0422add 100755 --- a/artdag.py +++ b/artdag.py @@ -434,12 +434,18 @@ def list_runs(limit, offset): end = offset + len(runs) click.echo(f"Showing {start}-{end}" + (" (more available)" if has_more else "")) click.echo() - click.echo(f"{'ID':<36} {'Status':<10} {'Recipe':<10} {'Output Hash':<20}") - click.echo("-" * 80) for run in runs: - output = run.get("output_cid", "")[:16] + "..." if run.get("output_cid") else "-" - click.echo(f"{run['run_id']} {run['status']:<10} {run['recipe']:<10} {output}") + click.echo(f"Run ID: {run['run_id']}") + click.echo(f" Status: {run['status']}") + click.echo(f" Recipe: {run['recipe']}") + if run.get("recipe_name"): + click.echo(f" Recipe Name: {run['recipe_name']}") + if run.get("output_cid"): + click.echo(f" Output: {run['output_cid']}") + if run.get("created_at"): + click.echo(f" Created: {run['created_at']}") + click.echo() @cli.command() @@ -504,9 +510,10 @@ def status(run_id, plan, artifacts, analysis): step_id = step.get("id", step.get("node_id", f"step_{i}")) step_type = step.get("type", "unknown") output_cid = step.get("output_cid", "") - output_str = f"→ {output_cid[:16]}..." if output_cid else "" - click.echo(f" {i}. {status_badge:<10} {step_id:<20} ({step_type}) {output_str}") + click.echo(f" {i}. {status_badge:<10} {step_id} ({step_type})") + if output_cid: + click.echo(f" Output: {output_cid}") else: click.echo(" No plan steps available.") else: @@ -530,9 +537,12 @@ def status(run_id, plan, artifacts, analysis): name = art.get("name", art.get("step_id", "output")) media_type = art.get("media_type", art.get("content_type", "")) size = art.get("size", "") - size_str = f" ({size})" if size else "" - type_str = f" [{media_type}]" if media_type else "" - click.echo(f" {name}: {cid[:24]}...{type_str}{size_str}") + click.echo(f" {name}:") + click.echo(f" CID: {cid}") + if media_type: + click.echo(f" Type: {media_type}") + if size: + click.echo(f" Size: {size}") else: click.echo(" No artifacts available.") else: @@ -739,10 +749,12 @@ def cache(limit, offset, media_type): name = item.get("friendly_name") or item.get("filename") if isinstance(item, dict) else None content_type = item.get("content_type", "") if isinstance(item, dict) else "" type_badge = f"[{content_type.split('/')[0]}]" if content_type else "" + click.echo(f"CID: {cid}") if name: - click.echo(f" {cid[:24]}... {name} {type_badge}") - else: - click.echo(f" {cid} {type_badge}") + click.echo(f" Name: {name}") + if type_badge: + click.echo(f" Type: {type_badge}") + click.echo() @cli.command() @@ -1555,11 +1567,13 @@ def list_effects(limit, offset): for effect in effects: meta = effect.get("meta", {}) - click.echo(f" {meta.get('name', 'unknown')} v{meta.get('version', '?')}") - click.echo(f" Hash: {effect['cid'][:32]}...") - click.echo(f" Temporal: {meta.get('temporal', False)}") + click.echo(f"Name: {meta.get('name', 'unknown')} v{meta.get('version', '?')}") + click.echo(f" CID: {effect['cid']}") + if effect.get('friendly_name'): + click.echo(f" Friendly Name: {effect['friendly_name']}") + click.echo(f" Temporal: {meta.get('temporal', False)}") if meta.get('params'): - click.echo(f" Params: {', '.join(p['name'] for p in meta['params'])}") + click.echo(f" Params: {', '.join(p['name'] for p in meta['params'])}") click.echo() except requests.RequestException as e: click.echo(f"Failed to list effects: {e}", err=True) @@ -1720,7 +1734,7 @@ def show_recipe(recipe_id): if recipe.get("fixed_inputs"): click.echo("\nFixed Inputs:") for inp in recipe["fixed_inputs"]: - click.echo(f" - {inp['asset']}: {inp['cid'][:16]}...") + click.echo(f" - {inp['asset']}: {inp['cid']}") @cli.command("run-recipe")