Skip to content

Commit 3dc820a

Browse files
committed
Come hack uder concrete knowledge
1 parent fe800c7 commit 3dc820a

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/thesavant42/layerslayer)
44

55

6+
TL;DR -
7+
1. venv, pip requirements, yada yada
8+
2. Start the API first (in a .venv) `python main.py -A`
9+
3. in a seperate terminal launch the TUI: `python /app/tui/app.py`
10+
4. ctrl+q to quit, or upper left corner menu.
11+
12+
13+
614
**Layerslayer** is a CLI tool for browsing, inspecting, and selectively downloading Docker image layers via the Docker Registry HTTP API v2.
715
Instead of pulling entire images, you can "peek" inside each layer to reconstruct an inferred filesystem, view manifest file build steps, and choose exactly which blobs to save.
816

plans/USERSTORY.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,42 @@ Where will fslog output be displayed?
134134

135135
- Once I've found the repository image I want to investigate (**for this example: drichnerdisney/ollama:v1**) and I've `/peeked` and seen the `/fslog` in the previous step, I've identified files that I want to save.
136136

137-
- The LSNG API offers two options to download a file:
137+
- The LSNG API offers two options to download a file:
138138
- 1. saving as bytes as a typical download,
139139
- 2. or streamed as plain text to be viewed in the panel as a richlog widget
140140

141+
### Implementation Summary
142+
143+
- [x] Task: File selection triggers action modal (View as Text / Save/Download)
144+
- [x] Task: View as Text uses `/carve?as_text=true` and displays in TextViewerModal
145+
- [x] Task: Save/Download shows SaveFileModal with unique filename (includes layer number)
146+
- [x] Task: Download uses Textual's `deliver_binary()` for cross-platform saving
147+
148+
**COMPLETED**
149+
150+
### User Flow
151+
152+
1. Select a **file** (not directory) in the FS Simulator table
153+
2. **FileActionModal** appears with options:
154+
- "View as Text" - fetches content and displays in scrollable modal
155+
- "Save/Download" - opens filename prompt
156+
- "Cancel" - returns to FS browser
157+
3. For **View as Text**: Content displayed in TextViewerModal (press Escape or Q to close)
158+
4. For **Save/Download**:
159+
- SaveFileModal pre-fills filename with `{name}_L{layer}.{ext}` to prevent clobbering
160+
- User can edit filename before saving
161+
- File saves to system Downloads folder (or browser download in web mode)
162+
163+
### Key Details
164+
165+
- Layer number is extracted from either:
166+
- The LAYER column in merged view (e.g., "L15")
167+
- The current `fs_layer` in single-layer view
168+
- Symlinks are handled by extracting the actual filename before " -> "
169+
- Errors display in status bar and as notifications
170+
171+
---
172+
141173
1. Streams the file to the browser in the REST API, with raw bytes and setting the content type as appropriate.
142174
- http://localhost:8000/carve?image=drichnerdisney/ollama:v1&path=/root/.ollama/id_ed25519&layer=36`
143175
2. For plain text, if I just want to view the contents and dont care if I save it, I can just call it like tjis, setting `as_text=true`

0 commit comments

Comments
 (0)