π¦ ClawHub
Smalltalk
by @johnmci
Interact with live Smalltalk image (Cuis or Squeak). Use for evaluating Smalltalk code, browsing classes, viewing method source, defining classes/methods, querying hierarchy and categories.
π‘ Examples
# Check setup
python3 smalltalk.py --checkEvaluate code
python3 smalltalk.py evaluate "3 factorial"
python3 smalltalk.py evaluate "Date today"Browse a class
python3 smalltalk.py browse OrderedCollectionView method source (instance side)
python3 smalltalk.py method-source String asUppercaseView method source (class side)
python3 smalltalk.py method-source "MCPServer class" version
python3 smalltalk.py method-source MCPServer version --class-sideList classes (with optional prefix filter)
python3 smalltalk.py list-classes CollectionGet class hierarchy
python3 smalltalk.py hierarchy OrderedCollectionGet subclasses
python3 smalltalk.py subclasses CollectionList all categories
python3 smalltalk.py list-categoriesList classes in a category
python3 smalltalk.py classes-in-category "Collections-Sequenceable"Define a new class
python3 smalltalk.py define-class "Object subclass: #Counter instanceVariableNames: 'count' classVariableNames: '' poolDictionaries: '' category: 'MyApp'"Define a method
python3 smalltalk.py define-method Counter "increment
count := (count ifNil: [0]) + 1.
^ count"Delete a method
python3 smalltalk.py delete-method Counter incrementDelete a class
python3 smalltalk.py delete-class Counter
βοΈ Configuration
1. Set up Squeak with MCP server β see SQUEAK-SETUP.md 2. Configure Clawdbot β see CLAWDBOT-SETUP.md
π Tips & Best Practices
saveImage intentionally excluded for safety--dev --image PATHTERMINAL
clawhub install smalltalk