Interactive Mode¶
YAICLI provides an interactive mode where you can have ongoing conversations with AI models.
Run ai --chat <title>
to start interactive session.
ai --chat "What's the meaning of life"
ââ ââ âââââ ââ ââââââ ââ ââ
ââ ââ ââ ââ ââ ââ ââ ââ
ââââ âââââââ ââ ââ ââ ââ
ââ ââ ââ ââ ââ ââ ââ
ââ ââ ââ ââ ââââââ âââââââ ââ
Welcome to YAICLI!
Current: Persistent Session: What's the meaning of life
Press TAB to switch mode
/help|? : Show help message
/clear : Clear chat history
/his : Show chat history
/list : List saved chats
/save <title> : Save current chat
/load <index> : Load a saved chat
/del <index> : Delete a saved chat
!<command> : Execute shell command directly (e.g., !ls -al)
/exit|Ctrl+D|Ctrl+C: Exit
/mode chat|exec : Switch mode (Case insensitive)
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
đŹ >
Or use ai --chat
to start a temporary session.
ai --chat
ââ ââ âââââ ââ ââââââ ââ ââ
ââ ââ ââ ââ ââ ââ ââ ââ
ââââ âââââââ ââ ââ ââ ââ
ââ ââ ââ ââ ââ ââ ââ
ââ ââ ââ ââ ââââââ âââââââ ââ
Welcome to YAICLI!
Current: Temporary Session (use /save to make persistent)
Press TAB to switch mode
/help|? : Show help message
/clear : Clear chat history
/his : Show chat history
/list : List saved chats
/save <title> : Save current chat
/load <index> : Load a saved chat
/del <index> : Delete a saved chat
!<command> : Execute shell command directly (e.g., !ls -al)
/exit|Ctrl+D|Ctrl+C: Exit
/mode chat|exec : Switch mode (Case insensitive)
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
đŹ >
Commands¶
/help|?
- Show help message/clear
- Clear conversation history/his
- Show command history/list
- List saved chats/save <title>
- Save current chat with title/load <index>
- Load a saved chat/del <index>
- Delete a saved chat/exit
- Exit the application/mode chat|exec
- Switch modes
Keyboard Shortcuts¶
Tab
- Toggle between Chat/Execute modesCtrl+C
orCtrl+D
- ExitCtrl+R
- Search historyâ/â
- Navigate through history
Chat Mode (đŹ)¶
In Chat Mode, you can have natural conversations with the AI while maintaining context: - Full conversation history is maintained - Markdown and code formatting is supported - Reasoning display for complex queries is available
$ ai --chat
...
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
đŹ > Tell me about the solar system
A:
Solar System Overview
⢠Central Star: The Sun (99% of system mass, nuclear fusion).
⢠Planets: 8 total.
⢠Terrestrial (rocky): Mercury, Venus, Earth, Mars.
⢠Gas Giants: Jupiter, Saturn.
⢠Ice Giants: Uranus, Neptune.
⢠Moons: Over 200 (e.g., Earth: 1, Jupiter: 95).
⢠Smaller Bodies:
⢠Asteroids (between Mars/Venus), comets ( icy, distant), * dwarf planets* (Pluto, Ceres).
⢠Oort Cloud: spherical shell of icy objects ~1â100,000夊ćĺŽä˝ (AU) from Sun).
⢠Heliosphere: Solar wind boundary protecting Earth from cosmic radiation.
Key Fact: Earth is the only confirmed habitable planet.
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Execute Mode (đ)¶
Execute Mode allows you to generate shell commands from natural language descriptions: - Generate shell commands from descriptions - Review commands before execution - Edit commands before running - Safe execution with confirmation
đ > Find all PDF files in my Downloads folder
Assistant:
find ~/Downloads -type f -name "*.pdf"
ââ Suggest Command âââââââââââââââââââââââŽ
â find ~/Downloads -type f -name "*.pdf" â
â°âââââââââââââââââââââââââââââââââââââââââŻ
Execute command? [e]dit, [y]es, [n]o (y):
Executing...
/Users/username/Downloads/document1.pdf
/Users/username/Downloads/report.pdf
...
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Saved Chat¶
Your chats will save in CHAT_HISTORY_DIR
key in ~/.config/yaicli/config.ini
.
You can use ai --template
to see default CHAT_HISTORY_DIR
value, it's a temp fold created by Python, will save in config.ini
when you first run ai
.