conversation command group (also accessible as session) manages conversation history, allowing you to list, resume, export, and manipulate past AI conversations.
Usage
Subcommands
list
List all conversation history.Output in machine-readable format.
new
Create a new conversation.dump
Export a conversation as JSON or HTML.Conversation ID to export.
Export as HTML instead of JSON.
compact
Compact a conversation to reduce token usage by removing redundant context.Conversation ID to compact.
retry
Retry the last command without modifying context.Conversation ID to retry.
resume
Resume a conversation in interactive mode.Conversation ID to resume.
show
Show the last assistant message from a conversation.Conversation ID.
Print raw markdown without rendering.
info
Show conversation details.Conversation ID.
stats
Show conversation statistics.Conversation ID.
Output in machine-readable format.
clone
Clone a conversation with a new ID.Conversation ID to clone.
Output in machine-readable format.
delete
Delete a conversation permanently.Conversation ID to delete.
Examples
List All Conversations
Resume a Conversation
Export as JSON
Export as HTML
Show Last Message
View Statistics
Clone a Conversation
Compact a Conversation
Reduce token usage by removing redundant context:Delete a Conversation
Alternative Commands
You can usesession as an alias:
list command:
Machine-Readable Output
Many conversation commands support--porcelain for scripting:
Storage Location
Conversations are stored in:Related Commands
forge --cid <ID>- Resume a conversationforge info --cid <ID>- Show info for a specific conversationforge- Start a new conversation
Notes
- Conversation IDs are UUIDs (e.g.,
550e8400-e29b-41d4-a716-446655440000) - Use
compactto reduce token usage in long conversations - Exported HTML includes syntax highlighting and formatting
clonecreates an independent copy with a new IDretryis useful when the AI response was incomplete or incorrect