My agentic slop goes here. Not intended for anyone else!
1#!/bin/bash
2
3# River CLI Demo Script
4set -e
5
6echo "=== River Feed Management CLI Demo ==="
7echo ""
8
9DEMO_DIR="/tmp/river-demo"
10CLI="dune exec bin/river_cli.exe --"
11
12# Cleanup and setup
13rm -rf $DEMO_DIR
14mkdir -p $DEMO_DIR
15
16echo "1. Setting up users..."
17$CLI user add alice --state-dir $DEMO_DIR --name "Alice Smith" --email "alice@example.com"
18$CLI user add bob --state-dir $DEMO_DIR --name "Bob Jones" --email "bob@example.com"
19
20echo ""
21echo "2. Adding feeds to users..."
22$CLI user add-feed alice --state-dir $DEMO_DIR --name "HackerNews" --url "https://hnrss.org/frontpage"
23$CLI user add-feed alice --state-dir $DEMO_DIR --name "Lobste.rs" --url "https://lobste.rs/rss"
24$CLI user add-feed bob --state-dir $DEMO_DIR --name "Rust Blog" --url "https://blog.rust-lang.org/feed.xml"
25
26echo ""
27echo "3. Listing all users..."
28$CLI user list --state-dir $DEMO_DIR
29
30echo ""
31echo "4. Showing Alice's details..."
32$CLI user show alice --state-dir $DEMO_DIR
33
34echo ""
35echo "5. Demonstrating sync with structured logging..."
36echo " Note: This will show connection timeouts for demo purposes"
37$CLI sync alice --state-dir $DEMO_DIR --verbosity=debug 2>&1 | head -20
38
39echo ""
40echo "6. Directory structure created:"
41find $DEMO_DIR -type f -exec echo " {}" \;
42
43echo ""
44echo "7. Example user JSON:"
45echo " Content of alice.json:"
46cat $DEMO_DIR/users/alice.json | sed 's/^/ /'
47
48echo ""
49echo "Demo complete! The River CLI has:"
50echo " ✓ Created user management system"
51echo " ✓ Added feed management for users"
52echo " ✓ Implemented sync functionality with deduplication"
53echo " ✓ Integrated structured logging with Logs, fmt, and logs.cli"
54echo " ✓ Supports both Atom and RSS feeds"
55echo " ✓ Professional CLI with multiple log levels and color support"
56echo ""
57echo "Logging features:"
58echo " • --verbosity=debug|info|warning|error|quiet"
59echo " • -v/--verbose and -q/--quiet flags"
60echo " • --color=auto|always|never"
61echo ""
62echo "Ready for use as the foundation for a Zulip bot!"