From 09edf9f59e22123526fc1e11200e65c957511744 Mon Sep 17 00:00:00 2001 From: gilesb Date: Mon, 12 Jan 2026 07:28:44 +0000 Subject: [PATCH] Update effect upload to show IPFS CID - Display CID instead of content hash after upload - Update example recipe syntax to use :cid Co-Authored-By: Claude Opus 4.5 --- artdag.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/artdag.py b/artdag.py index 4fb62e6..6d274fd 100755 --- a/artdag.py +++ b/artdag.py @@ -1017,10 +1017,10 @@ def upload_recipe(filepath): @cli.command("upload-effect") @click.argument("filepath", type=click.Path(exists=True)) def upload_effect(filepath): - """Upload an effect file. Requires login. + """Upload an effect file to IPFS. Requires login. Effects are Python files with PEP 723 dependencies and @-tag metadata. - Returns the content hash for use in recipes. + Returns the IPFS CID for use in recipes. """ token_data = load_token() if not token_data.get("access_token"): @@ -1048,7 +1048,7 @@ def upload_effect(filepath): result = resp.json() click.echo(f"Uploaded effect: {result['name']} v{result.get('version', '1.0.0')}") - click.echo(f"Content hash: {result['content_hash']}") + click.echo(f"CID: {result['cid']}") click.echo(f"Temporal: {result.get('temporal', False)}") if result.get('params'): click.echo(f"Parameters: {', '.join(p['name'] for p in result['params'])}") @@ -1056,7 +1056,7 @@ def upload_effect(filepath): click.echo(f"Dependencies: {', '.join(result['dependencies'])}") click.echo() click.echo("Use in recipes:") - click.echo(f' (effect {result["name"]} :hash "{result["content_hash"]}")') + click.echo(f' (effect {result["name"]} :cid "{result["cid"]}")') except requests.RequestException as e: click.echo(f"Upload failed: {e}", err=True) sys.exit(1)