A CLI and API for interacting with Claude
Project description
unoffical claude-cli 0.7.0
Install
No offical package yet
Python 3.10+
API Documentation
# Clone the repository
git clone https://github.com/TheTank10/claude-cli
cd claude-cli
# Install with pip
pip install -e .
# Verify installation
claude test
Usage
Account Management
Add your first account:
claude add-account
You'll be prompted for:
- Account name (anything you want)
- Claude cookies (paste from browser)
List all accounts:
claude accounts
Shows all saved accounts with -> indicating the active one.
Switch between accounts:
claude switch-account
Update expired cookies:
claude update-account
Remove an account:
claude remove-account
Getting Your Cookies
- Log into claude.ai in your browser
- Open Developer Tools (F12)
- Click on network
- Refresh the page and click on a fetch request such as "count_all"
- Check the request headers and copy
Cookies
Chatting with Claude
List conversations:
claude conversations
Allows you to switch to previous conversations you've had with claude.
Create new conversation:
claude new # Claude chooses a name for this conversation
claude new --name "My Project"
Send a message:
claude chat prompt # Streams to output with markdown using the rich library
claude chat "prompt" --raw # Streams to output without markdown
claude chat "prompt" > response.md # Streams response to a file
# Sending attachments/files
claude chat "explain @main.py"
claude chat "explain @src/cli/chat.py and @src/__init__.py"
claude chat "explain @c:\Users\User\OneDrive\Desktop\code\claude-cli\src\cli\chat.py"
** REPL mode:**
# Works just like claude chat except its interactive
claude repl
claude repl --raw
Note: To make uploading files easier add @ then drag and drop the file into your terminal.
Most terminals will support this.
Configure settings:
claude settings
Toggle web search, extended thinking, and artifacts.
Rename conversation:
claude name # Shows the name of the conversation
claude name New Name
Sync conversation:
claude sync
Updates local state with latest messages from web.
⚠️ Important: If you talk to claude on your browser and come back later to the cli and don't sync the conversations it will remove the history up to the last chat claude sent through the cli
Delete current conversation:
claude delete
Get chat history:
claude history # Last 30 messages with rich markdowns
claude history 5 # Last x messages
claude history --raw # No rich markdowns
claude history > output.md # Redirect to file
Search current conversation:
claude search query # Shows interactively
claude search "query" > results.txt # Redirects all results to a file
claude search "query" -o folder # Creates a folder with text files representing results
Currently this tool only searches for text found in: text, files, coding artifacts
should probably make it search more things later on
Export conversation/s:
claude export # Interactive
claude export this/all/choose js/md directory_name # Dont enter dir name with 'this'
claude --help for a list of commands
TODO
High Priority
- Add conversation history viewer
- Support file uploads (Some file types might not work. Some need to be passed through the convert_document endpoint which is not yet implemented.)
- Add conversation search/filter
- Export conversations to markdown/json
- Python API
- REPL mode
Mid Priority
- Styles
- Automatic session gathering maybe with a web driver?
- Clearing chat history
- Incognito mode
- Batch operations (clear all, delete all)
Low priorty
- claude retry
- Show when claude is thinking/seraching/coding
- Prompt input redirection
This tool is completely unofficial and has no affilation to anthropic
All contributions are welcome
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unofficial_claude_cli-0.7.0.tar.gz.
File metadata
- Download URL: unofficial_claude_cli-0.7.0.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fff7180593fa619080812b705c2e359a1c5fff22c4f98115af35590bd37619c8
|
|
| MD5 |
02939f2f904b3784032b33af803e90a7
|
|
| BLAKE2b-256 |
e78d7ba411e4c553a25b2f6fb962195613d8a3da0d1f5141015f45214e5caddd
|
File details
Details for the file unofficial_claude_cli-0.7.0-py3-none-any.whl.
File metadata
- Download URL: unofficial_claude_cli-0.7.0-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7facc6ac524bf2c333d703af900fe3950066a29c0ce46126a7226c5332b6e0e1
|
|
| MD5 |
059254dc6d2f454fe0ef659d20084b2e
|
|
| BLAKE2b-256 |
516b7bc5d666089578938c932a0c36795033cd852e65c401b5414184a089740a
|