Chat with LLMs from your terminal!
Note
This is a side project I built mostly for my own productivity, but no longer maintain.
- 🧠 Anthropic + OpenAI Models — Chat with Opus, GPT4 and any every other Anthropic or OpenAI models!
- 👾 Code Execution — Copy and run code 1
- ⚙️ Configurations — Quickly switch between models (mid-chat!) and manage multiple configurations
- 📂 File Input — Dump files into prompts!
- 💬 Chat Manager — Create, save 2 and load chats!
!
Command Palette — Do useful things with a variety of built-in commands!- ✍️ Auto-completion — Auto-complete commands with tab (and navigate history with ↑ / ↓)
pip install intelliterm
Tip
Make sure you've set your ANTHROPIC_API_KEY
and OPENAI_API_KEY
environment variables in ~/.zshrc
or ~/.bashrc
:
export ANTHROPIC_API_KEY='YOUR-ANTHROPIC-KEY'
export OPENAI_API_KEY='YOUR-OPENAI-KEY'
Basic usage:
ai
# or with a prompt
ai write a python program that prints a random chess position using emojis
Input a file:
ai -f file.py # -f or --file
# or via pipes
cat file.py | ai
git diff | ai
Important
Piping a git diff is a special case for which Intelliterm one-shot generates a commit message in conventional format, summarizing the diff (for better UX).
Short | Long | Description |
---|---|---|
-f |
--file |
Pass a file as prompt |
-m |
--mini --oneshot |
Complete prompt without entering the Intelliterm CLI ("one-shot" usage) |
-c |
--copy |
Auto-copy entire response to clipboard |
-cc |
--copy-code |
Auto-copy code block to clipboard |
-h |
--help |
Show help message (this one) |
-v |
--version |
Show Intelliterm version |
Note
You must be in a chat to use Command Palette (start a chat via ai
or ai <prompt>
)
Intelliterm comes with a set of handy commands, triggered by entering !
followed by:
Command Aliases | Command Options | Command Description | |
---|---|---|---|
General |
!help !h
|
Show available commands | |
!quit !q or Ctrl + c |
Quit Intelliterm | ||
!shell !os
|
Run basic shell commands within Intellitermusage: |
||
Configuration |
!cfg !use !config !switch
|
edit reset
|
Manage Intelliterm configurations
|
Chat |
!new !n
|
Start new chat / clear context | |
!file !f
|
Input a file as promptusage: |
||
!info !i
|
Show information about current chat | ||
!save !s
|
Save chat (to: <DOCUMENTS_DIR>/intelliterm/chats
|
||
!load !l
|
Load chat | ||
Response |
!copy !c
|
code
|
Copy last response to clipboard
Note: to auto-copy every new response: |
!run !r
|
Run code block in last responseNote: currently supports: |
Pull requests, suggestions and issue reports are very welcome 👽
Footnotes
-
Running generated code currently supported for Python, JavaScript and TypeScript code snippets. ↩
-
Intelliterm uses platformdirs to determine the file paths where configurations and chats are saved to and loaded from.
CONFIG_DIR
andDOCUMENTS_DIR
directory locations will thus vary based on your OS (Intelliterm displays them when saving/loading things). ↩