codecast 0.2.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- codecast-0.2.6/PKG-INFO +163 -0
- codecast-0.2.6/README.md +138 -0
- codecast-0.2.6/codecast.egg-info/PKG-INFO +163 -0
- codecast-0.2.6/codecast.egg-info/SOURCES.txt +35 -0
- codecast-0.2.6/codecast.egg-info/dependency_links.txt +1 -0
- codecast-0.2.6/codecast.egg-info/entry_points.txt +2 -0
- codecast-0.2.6/codecast.egg-info/requires.txt +6 -0
- codecast-0.2.6/codecast.egg-info/top_level.txt +1 -0
- codecast-0.2.6/head/__init__.py +5 -0
- codecast-0.2.6/head/__version__.py +1 -0
- codecast-0.2.6/head/bin/__init__.py +0 -0
- codecast-0.2.6/head/config.py +455 -0
- codecast-0.2.6/head/daemon_client.py +252 -0
- codecast-0.2.6/head/engine.py +1292 -0
- codecast-0.2.6/head/file_pool.py +357 -0
- codecast-0.2.6/head/main.py +224 -0
- codecast-0.2.6/head/message_formatter.py +316 -0
- codecast-0.2.6/head/name_generator.py +458 -0
- codecast-0.2.6/head/platform/__init__.py +19 -0
- codecast-0.2.6/head/platform/discord_adapter.py +1123 -0
- codecast-0.2.6/head/platform/format_utils.py +54 -0
- codecast-0.2.6/head/platform/protocol.py +106 -0
- codecast-0.2.6/head/platform/telegram_adapter.py +472 -0
- codecast-0.2.6/head/session_router.py +439 -0
- codecast-0.2.6/head/ssh_manager.py +668 -0
- codecast-0.2.6/pyproject.toml +66 -0
- codecast-0.2.6/setup.cfg +4 -0
- codecast-0.2.6/tests/test_bot_commands.py +1041 -0
- codecast-0.2.6/tests/test_daemon_client.py +441 -0
- codecast-0.2.6/tests/test_file_pool.py +420 -0
- codecast-0.2.6/tests/test_file_transfer.py +301 -0
- codecast-0.2.6/tests/test_message_formatter.py +694 -0
- codecast-0.2.6/tests/test_name_generator.py +138 -0
- codecast-0.2.6/tests/test_session_router.py +460 -0
- codecast-0.2.6/tests/test_ssh_upload.py +154 -0
- codecast-0.2.6/tests/test_telegram_adapter.py +814 -0
- codecast-0.2.6/tests/test_tool_batching.py +618 -0
codecast-0.2.6/PKG-INFO
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codecast
|
|
3
|
+
Version: 0.2.6
|
|
4
|
+
Summary: Bot-based system to interact with Claude CLI on remote machines
|
|
5
|
+
Author: Chivier Humber
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Chivier/codecast
|
|
8
|
+
Project-URL: Repository, https://github.com/Chivier/codecast
|
|
9
|
+
Project-URL: Issues, https://github.com/Chivier/codecast/issues
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Software Development
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: pyyaml>=6.0
|
|
20
|
+
Requires-Dist: ruamel.yaml>=0.18.0
|
|
21
|
+
Requires-Dist: asyncssh>=2.14.0
|
|
22
|
+
Requires-Dist: aiohttp>=3.9.0
|
|
23
|
+
Requires-Dist: discord.py>=2.3.0
|
|
24
|
+
Requires-Dist: python-telegram-bot>=20.0
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<img src="docs/assets/logo.png" alt="Codecast" width="200">
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
<h1 align="center">Codecast</h1>
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
Control Claude CLI on remote machines from Discord & Telegram
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<a href="https://pypi.org/project/codecast/"><img src="https://img.shields.io/pypi/v/codecast" alt="PyPI"></a>
|
|
38
|
+
<a href="https://github.com/Chivier/codecast/actions"><img src="https://github.com/Chivier/codecast/actions/workflows/lint.yml/badge.svg" alt="CI"></a>
|
|
39
|
+
<a href="https://github.com/Chivier/codecast/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Chivier/codecast" alt="License"></a>
|
|
40
|
+
<img src="https://img.shields.io/pypi/pyversions/codecast" alt="Python">
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
Send a message in Discord or Telegram. It reaches Claude CLI on your GPU server, your cloud VM, or any machine with SSH access — and streams the response back in real time.
|
|
46
|
+
|
|
47
|
+
## Why Codecast?
|
|
48
|
+
|
|
49
|
+
| Problem | Solution |
|
|
50
|
+
|---------|----------|
|
|
51
|
+
| Claude CLI only runs locally | Run it on any remote machine via SSH |
|
|
52
|
+
| Lose context when you close the terminal | Sessions persist — detach and resume anytime |
|
|
53
|
+
| Can't use Claude on mobile | Chat through Discord or Telegram from any device |
|
|
54
|
+
| Managing multiple dev machines is tedious | One bot, many machines — switch with a command |
|
|
55
|
+
|
|
56
|
+
## Architecture
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
You (Discord / Telegram)
|
|
60
|
+
│
|
|
61
|
+
▼
|
|
62
|
+
┌──────────────┐
|
|
63
|
+
│ Head Node │ ← Your laptop or a small always-on server
|
|
64
|
+
│ (Python) │ Runs the chat bot
|
|
65
|
+
└──────┬───────┘
|
|
66
|
+
│ SSH tunnel (encrypted)
|
|
67
|
+
▼
|
|
68
|
+
┌──────────────┐
|
|
69
|
+
│ Daemon │ ← Your GPU box / cloud VM / any Linux server
|
|
70
|
+
│ (Rust) │ Manages Claude CLI processes
|
|
71
|
+
└──────┬───────┘
|
|
72
|
+
│ stdin/stdout
|
|
73
|
+
▼
|
|
74
|
+
┌──────────────┐
|
|
75
|
+
│ Claude CLI │ ← Long-lived process, keeps full context
|
|
76
|
+
└──────────────┘
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Quick Start
|
|
80
|
+
|
|
81
|
+
**Prerequisites:** Python 3.11+, [Rust/cargo](https://rustup.rs/), SSH access to a remote machine with Claude CLI installed.
|
|
82
|
+
|
|
83
|
+
**Install:**
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install codecast
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Or one-line from source:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
curl -fsSL https://raw.githubusercontent.com/Chivier/codecast/main/scripts/install.sh | bash
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Configure:**
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
cp config.example.yaml ~/.codecast/config.yaml
|
|
99
|
+
$EDITOR ~/.codecast/config.yaml # add machines + bot token
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Run:**
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
codecast
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Then open Discord or Telegram and type `/start my-server ~/projects/myapp`.
|
|
109
|
+
|
|
110
|
+
## Key Features
|
|
111
|
+
|
|
112
|
+
- **Persistent sessions** — Claude CLI runs as a long-lived process; context survives across messages
|
|
113
|
+
- **SSH tunnels** — daemon binds to localhost only, never exposed to the internet
|
|
114
|
+
- **Detach & resume** — `/exit` keeps the session alive, `/resume` picks it back up
|
|
115
|
+
- **Multiple machines** — connect any number of servers, switch between them
|
|
116
|
+
- **Permission modes** — `auto` (full autonomy), `code` (auto-edit files), `plan` (read-only), `ask` (confirm everything)
|
|
117
|
+
- **Real-time streaming** — responses stream back via SSE as Claude types
|
|
118
|
+
- **Mobile-friendly** — works from any device with Discord or Telegram
|
|
119
|
+
|
|
120
|
+
## Commands
|
|
121
|
+
|
|
122
|
+
| Command | What it does |
|
|
123
|
+
|---------|-------------|
|
|
124
|
+
| `/start <machine> <path>` | Start a new Claude session |
|
|
125
|
+
| `/resume <name>` | Resume a detached session |
|
|
126
|
+
| `/new` | New session, same directory |
|
|
127
|
+
| `/clear` | Fresh context, same directory |
|
|
128
|
+
| `/exit` | Detach (process keeps running) |
|
|
129
|
+
| `/ls machine` | List machines |
|
|
130
|
+
| `/ls session` | List sessions |
|
|
131
|
+
| `/mode <auto\|code\|plan\|ask>` | Switch permission mode |
|
|
132
|
+
| `/status` | Current session info |
|
|
133
|
+
| `/health` | Daemon health check |
|
|
134
|
+
|
|
135
|
+
See [Commands Reference](./docs/commands-reference.md) for the full list.
|
|
136
|
+
|
|
137
|
+
## Documentation
|
|
138
|
+
|
|
139
|
+
| Guide | Description |
|
|
140
|
+
|-------|-------------|
|
|
141
|
+
| [Getting Started](./docs/getting-started.md) | Installation, first session walkthrough |
|
|
142
|
+
| [Adding a Discord Bot](./docs/adding-a-discord-bot.md) | Create a Discord Application step by step |
|
|
143
|
+
| [Adding a Telegram Bot](./docs/adding-a-telegram-bot.md) | Create a Telegram bot via BotFather |
|
|
144
|
+
| [Adding a Server](./docs/adding-a-server.md) | SSH config, jump hosts, password auth |
|
|
145
|
+
| [Commands Reference](./docs/commands-reference.md) | Every command with examples |
|
|
146
|
+
|
|
147
|
+
## Configuration
|
|
148
|
+
|
|
149
|
+
Config files are searched in order:
|
|
150
|
+
1. CLI argument: `codecast /path/to/config.yaml`
|
|
151
|
+
2. `~/.codecast/config.yaml`
|
|
152
|
+
3. `./config.yaml` (dev fallback)
|
|
153
|
+
|
|
154
|
+
## Requirements
|
|
155
|
+
|
|
156
|
+
- **Python 3.11+** — head node
|
|
157
|
+
- **Rust/cargo** — daemon binary is compiled during `pip install codecast` ([rustup.rs](https://rustup.rs/))
|
|
158
|
+
- **SSH access** — to remote machine(s) with Claude CLI installed
|
|
159
|
+
- **Bot token** — Discord and/or Telegram
|
|
160
|
+
|
|
161
|
+
## License
|
|
162
|
+
|
|
163
|
+
MIT
|
codecast-0.2.6/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/assets/logo.png" alt="Codecast" width="200">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Codecast</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Control Claude CLI on remote machines from Discord & Telegram
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://pypi.org/project/codecast/"><img src="https://img.shields.io/pypi/v/codecast" alt="PyPI"></a>
|
|
13
|
+
<a href="https://github.com/Chivier/codecast/actions"><img src="https://github.com/Chivier/codecast/actions/workflows/lint.yml/badge.svg" alt="CI"></a>
|
|
14
|
+
<a href="https://github.com/Chivier/codecast/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Chivier/codecast" alt="License"></a>
|
|
15
|
+
<img src="https://img.shields.io/pypi/pyversions/codecast" alt="Python">
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
Send a message in Discord or Telegram. It reaches Claude CLI on your GPU server, your cloud VM, or any machine with SSH access — and streams the response back in real time.
|
|
21
|
+
|
|
22
|
+
## Why Codecast?
|
|
23
|
+
|
|
24
|
+
| Problem | Solution |
|
|
25
|
+
|---------|----------|
|
|
26
|
+
| Claude CLI only runs locally | Run it on any remote machine via SSH |
|
|
27
|
+
| Lose context when you close the terminal | Sessions persist — detach and resume anytime |
|
|
28
|
+
| Can't use Claude on mobile | Chat through Discord or Telegram from any device |
|
|
29
|
+
| Managing multiple dev machines is tedious | One bot, many machines — switch with a command |
|
|
30
|
+
|
|
31
|
+
## Architecture
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
You (Discord / Telegram)
|
|
35
|
+
│
|
|
36
|
+
▼
|
|
37
|
+
┌──────────────┐
|
|
38
|
+
│ Head Node │ ← Your laptop or a small always-on server
|
|
39
|
+
│ (Python) │ Runs the chat bot
|
|
40
|
+
└──────┬───────┘
|
|
41
|
+
│ SSH tunnel (encrypted)
|
|
42
|
+
▼
|
|
43
|
+
┌──────────────┐
|
|
44
|
+
│ Daemon │ ← Your GPU box / cloud VM / any Linux server
|
|
45
|
+
│ (Rust) │ Manages Claude CLI processes
|
|
46
|
+
└──────┬───────┘
|
|
47
|
+
│ stdin/stdout
|
|
48
|
+
▼
|
|
49
|
+
┌──────────────┐
|
|
50
|
+
│ Claude CLI │ ← Long-lived process, keeps full context
|
|
51
|
+
└──────────────┘
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Quick Start
|
|
55
|
+
|
|
56
|
+
**Prerequisites:** Python 3.11+, [Rust/cargo](https://rustup.rs/), SSH access to a remote machine with Claude CLI installed.
|
|
57
|
+
|
|
58
|
+
**Install:**
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install codecast
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Or one-line from source:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
curl -fsSL https://raw.githubusercontent.com/Chivier/codecast/main/scripts/install.sh | bash
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Configure:**
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cp config.example.yaml ~/.codecast/config.yaml
|
|
74
|
+
$EDITOR ~/.codecast/config.yaml # add machines + bot token
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Run:**
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
codecast
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Then open Discord or Telegram and type `/start my-server ~/projects/myapp`.
|
|
84
|
+
|
|
85
|
+
## Key Features
|
|
86
|
+
|
|
87
|
+
- **Persistent sessions** — Claude CLI runs as a long-lived process; context survives across messages
|
|
88
|
+
- **SSH tunnels** — daemon binds to localhost only, never exposed to the internet
|
|
89
|
+
- **Detach & resume** — `/exit` keeps the session alive, `/resume` picks it back up
|
|
90
|
+
- **Multiple machines** — connect any number of servers, switch between them
|
|
91
|
+
- **Permission modes** — `auto` (full autonomy), `code` (auto-edit files), `plan` (read-only), `ask` (confirm everything)
|
|
92
|
+
- **Real-time streaming** — responses stream back via SSE as Claude types
|
|
93
|
+
- **Mobile-friendly** — works from any device with Discord or Telegram
|
|
94
|
+
|
|
95
|
+
## Commands
|
|
96
|
+
|
|
97
|
+
| Command | What it does |
|
|
98
|
+
|---------|-------------|
|
|
99
|
+
| `/start <machine> <path>` | Start a new Claude session |
|
|
100
|
+
| `/resume <name>` | Resume a detached session |
|
|
101
|
+
| `/new` | New session, same directory |
|
|
102
|
+
| `/clear` | Fresh context, same directory |
|
|
103
|
+
| `/exit` | Detach (process keeps running) |
|
|
104
|
+
| `/ls machine` | List machines |
|
|
105
|
+
| `/ls session` | List sessions |
|
|
106
|
+
| `/mode <auto\|code\|plan\|ask>` | Switch permission mode |
|
|
107
|
+
| `/status` | Current session info |
|
|
108
|
+
| `/health` | Daemon health check |
|
|
109
|
+
|
|
110
|
+
See [Commands Reference](./docs/commands-reference.md) for the full list.
|
|
111
|
+
|
|
112
|
+
## Documentation
|
|
113
|
+
|
|
114
|
+
| Guide | Description |
|
|
115
|
+
|-------|-------------|
|
|
116
|
+
| [Getting Started](./docs/getting-started.md) | Installation, first session walkthrough |
|
|
117
|
+
| [Adding a Discord Bot](./docs/adding-a-discord-bot.md) | Create a Discord Application step by step |
|
|
118
|
+
| [Adding a Telegram Bot](./docs/adding-a-telegram-bot.md) | Create a Telegram bot via BotFather |
|
|
119
|
+
| [Adding a Server](./docs/adding-a-server.md) | SSH config, jump hosts, password auth |
|
|
120
|
+
| [Commands Reference](./docs/commands-reference.md) | Every command with examples |
|
|
121
|
+
|
|
122
|
+
## Configuration
|
|
123
|
+
|
|
124
|
+
Config files are searched in order:
|
|
125
|
+
1. CLI argument: `codecast /path/to/config.yaml`
|
|
126
|
+
2. `~/.codecast/config.yaml`
|
|
127
|
+
3. `./config.yaml` (dev fallback)
|
|
128
|
+
|
|
129
|
+
## Requirements
|
|
130
|
+
|
|
131
|
+
- **Python 3.11+** — head node
|
|
132
|
+
- **Rust/cargo** — daemon binary is compiled during `pip install codecast` ([rustup.rs](https://rustup.rs/))
|
|
133
|
+
- **SSH access** — to remote machine(s) with Claude CLI installed
|
|
134
|
+
- **Bot token** — Discord and/or Telegram
|
|
135
|
+
|
|
136
|
+
## License
|
|
137
|
+
|
|
138
|
+
MIT
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codecast
|
|
3
|
+
Version: 0.2.6
|
|
4
|
+
Summary: Bot-based system to interact with Claude CLI on remote machines
|
|
5
|
+
Author: Chivier Humber
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Chivier/codecast
|
|
8
|
+
Project-URL: Repository, https://github.com/Chivier/codecast
|
|
9
|
+
Project-URL: Issues, https://github.com/Chivier/codecast/issues
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Software Development
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: pyyaml>=6.0
|
|
20
|
+
Requires-Dist: ruamel.yaml>=0.18.0
|
|
21
|
+
Requires-Dist: asyncssh>=2.14.0
|
|
22
|
+
Requires-Dist: aiohttp>=3.9.0
|
|
23
|
+
Requires-Dist: discord.py>=2.3.0
|
|
24
|
+
Requires-Dist: python-telegram-bot>=20.0
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<img src="docs/assets/logo.png" alt="Codecast" width="200">
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
<h1 align="center">Codecast</h1>
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
Control Claude CLI on remote machines from Discord & Telegram
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<a href="https://pypi.org/project/codecast/"><img src="https://img.shields.io/pypi/v/codecast" alt="PyPI"></a>
|
|
38
|
+
<a href="https://github.com/Chivier/codecast/actions"><img src="https://github.com/Chivier/codecast/actions/workflows/lint.yml/badge.svg" alt="CI"></a>
|
|
39
|
+
<a href="https://github.com/Chivier/codecast/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Chivier/codecast" alt="License"></a>
|
|
40
|
+
<img src="https://img.shields.io/pypi/pyversions/codecast" alt="Python">
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
Send a message in Discord or Telegram. It reaches Claude CLI on your GPU server, your cloud VM, or any machine with SSH access — and streams the response back in real time.
|
|
46
|
+
|
|
47
|
+
## Why Codecast?
|
|
48
|
+
|
|
49
|
+
| Problem | Solution |
|
|
50
|
+
|---------|----------|
|
|
51
|
+
| Claude CLI only runs locally | Run it on any remote machine via SSH |
|
|
52
|
+
| Lose context when you close the terminal | Sessions persist — detach and resume anytime |
|
|
53
|
+
| Can't use Claude on mobile | Chat through Discord or Telegram from any device |
|
|
54
|
+
| Managing multiple dev machines is tedious | One bot, many machines — switch with a command |
|
|
55
|
+
|
|
56
|
+
## Architecture
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
You (Discord / Telegram)
|
|
60
|
+
│
|
|
61
|
+
▼
|
|
62
|
+
┌──────────────┐
|
|
63
|
+
│ Head Node │ ← Your laptop or a small always-on server
|
|
64
|
+
│ (Python) │ Runs the chat bot
|
|
65
|
+
└──────┬───────┘
|
|
66
|
+
│ SSH tunnel (encrypted)
|
|
67
|
+
▼
|
|
68
|
+
┌──────────────┐
|
|
69
|
+
│ Daemon │ ← Your GPU box / cloud VM / any Linux server
|
|
70
|
+
│ (Rust) │ Manages Claude CLI processes
|
|
71
|
+
└──────┬───────┘
|
|
72
|
+
│ stdin/stdout
|
|
73
|
+
▼
|
|
74
|
+
┌──────────────┐
|
|
75
|
+
│ Claude CLI │ ← Long-lived process, keeps full context
|
|
76
|
+
└──────────────┘
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Quick Start
|
|
80
|
+
|
|
81
|
+
**Prerequisites:** Python 3.11+, [Rust/cargo](https://rustup.rs/), SSH access to a remote machine with Claude CLI installed.
|
|
82
|
+
|
|
83
|
+
**Install:**
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install codecast
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Or one-line from source:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
curl -fsSL https://raw.githubusercontent.com/Chivier/codecast/main/scripts/install.sh | bash
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Configure:**
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
cp config.example.yaml ~/.codecast/config.yaml
|
|
99
|
+
$EDITOR ~/.codecast/config.yaml # add machines + bot token
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Run:**
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
codecast
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Then open Discord or Telegram and type `/start my-server ~/projects/myapp`.
|
|
109
|
+
|
|
110
|
+
## Key Features
|
|
111
|
+
|
|
112
|
+
- **Persistent sessions** — Claude CLI runs as a long-lived process; context survives across messages
|
|
113
|
+
- **SSH tunnels** — daemon binds to localhost only, never exposed to the internet
|
|
114
|
+
- **Detach & resume** — `/exit` keeps the session alive, `/resume` picks it back up
|
|
115
|
+
- **Multiple machines** — connect any number of servers, switch between them
|
|
116
|
+
- **Permission modes** — `auto` (full autonomy), `code` (auto-edit files), `plan` (read-only), `ask` (confirm everything)
|
|
117
|
+
- **Real-time streaming** — responses stream back via SSE as Claude types
|
|
118
|
+
- **Mobile-friendly** — works from any device with Discord or Telegram
|
|
119
|
+
|
|
120
|
+
## Commands
|
|
121
|
+
|
|
122
|
+
| Command | What it does |
|
|
123
|
+
|---------|-------------|
|
|
124
|
+
| `/start <machine> <path>` | Start a new Claude session |
|
|
125
|
+
| `/resume <name>` | Resume a detached session |
|
|
126
|
+
| `/new` | New session, same directory |
|
|
127
|
+
| `/clear` | Fresh context, same directory |
|
|
128
|
+
| `/exit` | Detach (process keeps running) |
|
|
129
|
+
| `/ls machine` | List machines |
|
|
130
|
+
| `/ls session` | List sessions |
|
|
131
|
+
| `/mode <auto\|code\|plan\|ask>` | Switch permission mode |
|
|
132
|
+
| `/status` | Current session info |
|
|
133
|
+
| `/health` | Daemon health check |
|
|
134
|
+
|
|
135
|
+
See [Commands Reference](./docs/commands-reference.md) for the full list.
|
|
136
|
+
|
|
137
|
+
## Documentation
|
|
138
|
+
|
|
139
|
+
| Guide | Description |
|
|
140
|
+
|-------|-------------|
|
|
141
|
+
| [Getting Started](./docs/getting-started.md) | Installation, first session walkthrough |
|
|
142
|
+
| [Adding a Discord Bot](./docs/adding-a-discord-bot.md) | Create a Discord Application step by step |
|
|
143
|
+
| [Adding a Telegram Bot](./docs/adding-a-telegram-bot.md) | Create a Telegram bot via BotFather |
|
|
144
|
+
| [Adding a Server](./docs/adding-a-server.md) | SSH config, jump hosts, password auth |
|
|
145
|
+
| [Commands Reference](./docs/commands-reference.md) | Every command with examples |
|
|
146
|
+
|
|
147
|
+
## Configuration
|
|
148
|
+
|
|
149
|
+
Config files are searched in order:
|
|
150
|
+
1. CLI argument: `codecast /path/to/config.yaml`
|
|
151
|
+
2. `~/.codecast/config.yaml`
|
|
152
|
+
3. `./config.yaml` (dev fallback)
|
|
153
|
+
|
|
154
|
+
## Requirements
|
|
155
|
+
|
|
156
|
+
- **Python 3.11+** — head node
|
|
157
|
+
- **Rust/cargo** — daemon binary is compiled during `pip install codecast` ([rustup.rs](https://rustup.rs/))
|
|
158
|
+
- **SSH access** — to remote machine(s) with Claude CLI installed
|
|
159
|
+
- **Bot token** — Discord and/or Telegram
|
|
160
|
+
|
|
161
|
+
## License
|
|
162
|
+
|
|
163
|
+
MIT
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
codecast.egg-info/PKG-INFO
|
|
4
|
+
codecast.egg-info/SOURCES.txt
|
|
5
|
+
codecast.egg-info/dependency_links.txt
|
|
6
|
+
codecast.egg-info/entry_points.txt
|
|
7
|
+
codecast.egg-info/requires.txt
|
|
8
|
+
codecast.egg-info/top_level.txt
|
|
9
|
+
head/__init__.py
|
|
10
|
+
head/__version__.py
|
|
11
|
+
head/config.py
|
|
12
|
+
head/daemon_client.py
|
|
13
|
+
head/engine.py
|
|
14
|
+
head/file_pool.py
|
|
15
|
+
head/main.py
|
|
16
|
+
head/message_formatter.py
|
|
17
|
+
head/name_generator.py
|
|
18
|
+
head/session_router.py
|
|
19
|
+
head/ssh_manager.py
|
|
20
|
+
head/bin/__init__.py
|
|
21
|
+
head/platform/__init__.py
|
|
22
|
+
head/platform/discord_adapter.py
|
|
23
|
+
head/platform/format_utils.py
|
|
24
|
+
head/platform/protocol.py
|
|
25
|
+
head/platform/telegram_adapter.py
|
|
26
|
+
tests/test_bot_commands.py
|
|
27
|
+
tests/test_daemon_client.py
|
|
28
|
+
tests/test_file_pool.py
|
|
29
|
+
tests/test_file_transfer.py
|
|
30
|
+
tests/test_message_formatter.py
|
|
31
|
+
tests/test_name_generator.py
|
|
32
|
+
tests/test_session_router.py
|
|
33
|
+
tests/test_ssh_upload.py
|
|
34
|
+
tests/test_telegram_adapter.py
|
|
35
|
+
tests/test_tool_batching.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
head
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.1"
|
|
File without changes
|