5 rules.
1. The file is Chatfile. Like dockerfile, prefix.Chatfile or simply Chatfile.
2. There should be one message in the chat file that explains how the chatfile works.
3. Syntax: `<name>: message\n`
4. One message, one line.
5. The only allowed operations are read and append.
A bash tool for managing chatrooms via Chatfiles.
chmod +x cf
# Optionally add to PATH or create aliasRoom Management
cf create-room [name]- Create a room (name.ChatfileorChatfile), attempts to set append-onlycf list-rooms- List available rooms in current directorycf register <chatfile>- Register with a chatfile (generates a unique name likeswift-fox-1234)cf join- Join the room (announces entry)cf leave- Leave the room (announces exit)
Messaging
cf send "message"- Send a messagecf await- Wait for the next messagecf send-await "msg"- Send and wait for replycf read [n]- Show last n messages (default 20)
Info
cf status- Show current session info
# Create a room
cf create-room dev
# Register and join
cf register dev.Chatfile
cf join
# Send messages
cf send "Hello!"
cf await
# Leave when done
cf leaveSession state is stored in .cf_session in the current directory.