replit-tools 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/README.md +134 -46
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,46 +1,52 @@
1
- # replit-claude-persist
1
+ # DATA Tools
2
2
 
3
- **Persist Claude Code sessions, authentication, and history across Replit container restarts.**
3
+ **One command to set up Claude Code and Codex CLI on Replit with full persistence.**
4
4
 
5
- When Replit containers restart, everything outside `/home/runner/workspace/` is wiped - including your Claude conversations, auth tokens, and installed binaries. This tool fixes that.
5
+ When Replit containers restart, everything outside `/home/runner/workspace/` is wiped - including installed CLIs, conversations, auth tokens, and command history. DATA Tools fixes all of that.
6
6
 
7
- ## Features
7
+ ## Quick Start
8
8
 
9
- - **Session Persistence** - Conversations survive container restarts
10
- - **Interactive Session Picker** - Choose which session to resume on shell start
11
- - **Multi-Terminal Support** - Each terminal tracks its own session
12
- - **Auth Persistence** - Keep your Claude authentication working
13
- - **Binary Caching** - Claude binary persists (faster startup)
14
- - **Bash History** - Command history survives restarts too
9
+ ```bash
10
+ npx replit-tools
11
+ ```
15
12
 
16
- ## Installation
13
+ That's it. The installer will:
17
14
 
18
- ### Option 1: npx (easiest)
15
+ 1. **Install Claude Code** (if not already installed)
16
+ 2. **Install OpenAI Codex CLI** (if not already installed)
17
+ 3. **Detect existing config** and preserve your data
18
+ 4. **Set up persistence** so everything survives restarts
19
+ 5. **Launch the session picker** so you can start working immediately
19
20
 
20
- ```bash
21
- npx replit-claude-persist
22
- ```
21
+ ## What Gets Installed
23
22
 
24
- ### Option 2: curl
23
+ | Tool | Source | Purpose |
24
+ |------|--------|---------|
25
+ | **Claude Code** | `curl https://claude.ai/install.sh` | Anthropic's CLI for Claude |
26
+ | **Codex CLI** | `npm i -g @openai/codex` | OpenAI's coding assistant |
25
27
 
26
- ```bash
27
- curl -fsSL https://raw.githubusercontent.com/stevemoraco/DATAtools/main/install.sh | bash
28
- ```
28
+ Both are installed only if not already present. Existing installations are preserved.
29
29
 
30
- ### Option 3: Manual
30
+ ## What Gets Persisted
31
31
 
32
- ```bash
33
- npm install -g replit-claude-persist
34
- replit-claude-persist
35
- ```
32
+ | Data | Location | Survives Restart? |
33
+ |------|----------|-------------------|
34
+ | Claude conversations | `.claude-persistent/` | Yes |
35
+ | Claude credentials | `.claude-persistent/` | Yes |
36
+ | Claude binary | `.local/share/claude/versions/` | Yes |
37
+ | Codex data | `.codex-persistent/` | Yes |
38
+ | Bash history | `.persistent-home/` | Yes |
39
+ | Per-terminal sessions | `.claude-sessions/` | Yes |
36
40
 
37
- ## What You'll See
41
+ ## The Session Picker
38
42
 
39
- After installation, opening a new shell shows:
43
+ After installation (and on every new shell), you'll see:
40
44
 
41
45
  ```
46
+ ✅ Claude Code already installed (1.0.17)
47
+ ✅ Codex CLI already installed
48
+
42
49
  ✅ Claude authentication: valid (23h remaining)
43
- ✅ Claude Code ready: 2.0.71 (Claude Code)
44
50
 
45
51
  ╭─────────────────────────────────────────────────────────╮
46
52
  │ Claude Session Manager │
@@ -56,7 +62,9 @@ After installation, opening a new shell shows:
56
62
  Choice [c/r/n/s]: _
57
63
  ```
58
64
 
59
- Press `r` to see detailed session info:
65
+ ### Session Details
66
+
67
+ Press `r` to see full session metadata:
60
68
 
61
69
  ```
62
70
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -69,30 +77,85 @@ Press `r` to see detailed session info:
69
77
  Latest: "Thanks, that worked!"
70
78
  ```
71
79
 
80
+ Each session shows:
81
+ - Full UUID
82
+ - Message count and file size
83
+ - Time since last activity
84
+ - Start and last activity timestamps
85
+ - First and latest prompts (truncated)
86
+
87
+ ## Multi-Terminal Support
88
+
89
+ Each terminal tracks its own session independently:
90
+
91
+ ```
92
+ Terminal pts/0 → Session abc123... (your migration work)
93
+ Terminal pts/1 → Session def456... (your docs work)
94
+ Terminal pts/2 → Session ghi789... (your debugging)
95
+ ```
96
+
97
+ Press `c` to continue YOUR terminal's last session. Other terminals are unaffected.
98
+
72
99
  ## How It Works
73
100
 
74
- The tool creates symlinks from ephemeral locations to persistent workspace storage:
101
+ The installer creates symlinks from ephemeral locations to persistent workspace storage:
102
+
103
+ ```
104
+ ~/.claude → /workspace/.claude-persistent/
105
+ ~/.codex → /workspace/.codex-persistent/
106
+ ~/.local/share/claude → /workspace/.local/share/claude/
107
+ ~/.local/bin/claude → /workspace/.local/share/claude/versions/X.X.X
108
+ ```
109
+
110
+ Three layers ensure setup runs on every restart:
111
+ 1. `.replit` onBoot hook (runs at container boot)
112
+ 2. `.config/bashrc` (runs on every shell start)
113
+ 3. Scripts in `workspace/scripts/` (called by above)
114
+
115
+ ## Smart Detection
116
+
117
+ The installer checks for:
118
+
119
+ - **Existing persistent config** - Uses your existing `.claude-persistent/` if present
120
+ - **Replit Secrets** - Detects `ANTHROPIC_API_KEY` and `OPENAI_API_KEY`
121
+ - **Existing installations** - Won't reinstall Claude or Codex if already present
122
+ - **Existing data in ~/.claude** - Moves it to persistent storage instead of overwriting
75
123
 
124
+ ## Installation Options
125
+
126
+ ### Option 1: npx (recommended)
127
+
128
+ ```bash
129
+ npx replit-tools
76
130
  ```
77
- ~/.claude → /workspace/.claude-persistent/
78
- ~/.codex → /workspace/.codex-persistent/
79
- ~/.local/bin/ → /workspace/.local/share/claude/versions/
131
+
132
+ ### Option 2: curl
133
+
134
+ ```bash
135
+ curl -fsSL https://raw.githubusercontent.com/stevemoraco/DATAtools/main/install.sh | bash
80
136
  ```
81
137
 
82
- On every shell start, `.config/bashrc` ensures symlinks exist and shows the session picker.
138
+ ### Option 3: Global install
139
+
140
+ ```bash
141
+ npm install -g replit-tools
142
+ replit-tools
143
+ ```
83
144
 
84
145
  ## Commands
85
146
 
147
+ After installation, these aliases are available:
148
+
86
149
  | Command | Description |
87
150
  |---------|-------------|
88
- | `cr` | Continue last session |
89
- | `claude-menu` | Show session picker again |
90
- | `claude-new` | Start fresh session |
91
- | `claude-pick` | Claude's built-in picker |
151
+ | `cr` | Continue last Claude session |
152
+ | `claude-resume` | Same as `cr` |
153
+ | `claude-pick` | Claude's built-in session picker |
154
+ | `claude-menu` | Show the session manager menu again |
92
155
 
93
156
  ## Configuration
94
157
 
95
- ### Disable the menu
158
+ ### Disable the session picker menu
96
159
 
97
160
  ```bash
98
161
  export CLAUDE_NO_PROMPT=true
@@ -100,32 +163,39 @@ export CLAUDE_NO_PROMPT=true
100
163
 
101
164
  Add to `.config/bashrc` to make permanent.
102
165
 
103
- ### Fix auth permanently
166
+ ### Fix authentication permanently
104
167
 
105
168
  ```bash
106
169
  claude setup-token
107
170
  ```
108
171
 
109
- Creates a long-lived token that doesn't expire.
172
+ Creates a long-lived API token that doesn't expire (OAuth tokens expire every ~24h).
110
173
 
111
174
  ## Files Created
112
175
 
113
176
  ```
114
177
  workspace/
115
- ├── .claude-persistent/ # Conversations, credentials
178
+ ├── .claude-persistent/ # Claude conversations & credentials
116
179
  ├── .codex-persistent/ # Codex CLI data
117
180
  ├── .claude-sessions/ # Per-terminal session tracking
118
181
  ├── .local/share/claude/ # Claude binary versions
119
182
  ├── .persistent-home/ # Bash history
120
183
  ├── .config/bashrc # Shell startup config
121
- └── scripts/
122
- ├── setup-claude-code.sh
123
- └── claude-session-manager.sh
184
+ ├── scripts/
185
+ ├── setup-claude-code.sh
186
+ └── claude-session-manager.sh
187
+ └── .gitignore # Updated to ignore credential dirs
124
188
  ```
125
189
 
126
190
  ## Troubleshooting
127
191
 
128
- ### Menu not appearing
192
+ ### Claude or Codex not found after restart
193
+
194
+ ```bash
195
+ source /home/runner/workspace/scripts/setup-claude-code.sh
196
+ ```
197
+
198
+ ### Session picker not appearing
129
199
 
130
200
  ```bash
131
201
  source /home/runner/workspace/.config/bashrc
@@ -142,9 +212,27 @@ claude setup-token
142
212
  ### Symlinks broken
143
213
 
144
214
  ```bash
145
- source /home/runner/workspace/scripts/setup-claude-code.sh
215
+ npx replit-tools
146
216
  ```
147
217
 
218
+ Running the installer again is safe - it preserves existing data.
219
+
220
+ ## Security
221
+
222
+ The installer adds these to `.gitignore`:
223
+ - `.claude-persistent/` (contains credentials)
224
+ - `.codex-persistent/` (contains credentials)
225
+
226
+ Your API keys and conversation history won't be committed to git.
227
+
228
+ ## Why "DATA Tools"?
229
+
230
+ **D**eveloper **A**ssistant **T**ool **A**utomation - everything you need to run AI coding assistants on Replit, persisted and ready to go.
231
+
232
+ ## Repository
233
+
234
+ GitHub: [stevemoraco/DATAtools](https://github.com/stevemoraco/DATAtools)
235
+
148
236
  ## License
149
237
 
150
238
  MIT
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "replit-tools",
3
- "version": "1.0.2",
4
- "description": "Persist Claude Code sessions, auth, and history across Replit container restarts",
3
+ "version": "1.0.3",
4
+ "description": "DATA Tools - One command to set up Claude Code and Codex CLI on Replit with full persistence",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "replit-tools": "./index.js"