Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,20 +205,30 @@ By default, all isolation environments automatically exit after command completi
│ │ Execution │ │ stdout/stderr│ │ Temp Log File │ │
│ └─────────────┘ └──────────────┘ └───────────────────┘ │
│ │
Log File Format:
Console Output Format (Status Spine):
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ === Start Command Log === │ │
│ │ Timestamp: 2024-01-15 10:30:45 │ │
│ │ Command: <command> │ │
│ │ Shell: /bin/bash │ │
│ │ Platform: linux │ │
│ │ ================================================== │ │
│ │ │ session abc-123-def-456 │ │
│ │ │ start 2024-01-15 10:30:45 │ │
│ │ │ │ │
│ │ $ <command> │ │
│ │ │ │
│ │ <command output> │ │
│ │ ================================================== │ │
│ │ Finished: 2024-01-15 10:30:46 │ │
│ │ Exit Code: 0 │ │
│ │ │ │
│ │ ✓ (or ✗ for failure) │ │
│ │ │ finish 2024-01-15 10:30:46 │ │
│ │ │ duration 1.234s │ │
│ │ │ exit 0 │ │
│ │ │ │ │
│ │ │ log /tmp/start-command-123.log │ │
│ │ │ session abc-123-def-456 │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
│ Format key: │
│ - │ prefix → tool metadata │
│ - $ prefix → executed command │
│ - No prefix → program output (stdout/stderr) │
│ - ✓ / ✗ → result marker (success/failure) │
│ │
└─────────────────────────────────────────────────────────────────┘
```

Expand Down
64 changes: 43 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,27 @@ Variables like `$packageName`, `$version`, `$repository` are captured and used i

### Automatic Logging

All command output is automatically saved to your system's temporary directory with timestamps:
All command output is automatically saved to your system's temporary directory. Output uses a "status spine" format with clear visual distinction:

```
[2024-01-15 10:30:45.123] Starting: npm test
│ session abc-123-def-456-ghi
│ start 2024-01-15 10:30:45
$ npm test

... command output ...
[2024-01-15 10:30:52.456] Finished
Exit code: 0
Log saved: /tmp/start-command-1705312245123-abc123.log

│ finish 2024-01-15 10:30:52
│ duration 7.456s
│ exit 0
│ log /tmp/start-command-1705312245123-abc123.log
│ session abc-123-def-456-ghi
```

The `│` prefix indicates tool metadata, `$` shows the executed command, and `✓`/`✗` indicates success/failure.

### Exit Code Display

The exit code is always prominently displayed after command completion, making it clear whether the command succeeded or failed.
Expand All @@ -123,11 +134,20 @@ When a command fails (non-zero exit code) and it's a globally installed NPM pack
- Link to uploaded log

```
[2024-01-15 10:30:45.123] Starting: some-npm-tool --broken-arg
│ session abc-123-def-456-ghi
│ start 2024-01-15 10:30:45
$ some-npm-tool --broken-arg

... error output ...
[2024-01-15 10:30:46.789] Finished
Exit code: 1
Log saved: /tmp/start-command-1705312246789-def456.log

│ finish 2024-01-15 10:30:46
│ duration 1.789s
│ exit 1
│ log /tmp/start-command-1705312246789-def456.log
│ session abc-123-def-456-ghi

Detected repository: https://github.com/owner/some-npm-tool
Log uploaded: https://gist.github.com/user/abc123
Expand Down Expand Up @@ -315,25 +335,27 @@ You can create your own substitution patterns by placing a `substitutions.lino`

## Log File Format

Log files are saved as `start-command-{timestamp}-{random}.log` and contain:
Log files are saved as `start-command-{timestamp}-{random}.log` and contain the command output along with metadata. The console output uses a "status spine" format:

```
=== Start Command Log ===
Timestamp: 2024-01-15 10:30:45.123
Command: bun test
Shell: /bin/bash
Platform: linux
Bun Version: 1.2.0
Working Directory: /home/user/project
==================================================
│ session abc-123-def-456-ghi
│ start 2024-01-15 10:30:45
$ bun test

... command output ...

==================================================
Finished: 2024-01-15 10:30:52.456
Exit Code: 0
│ finish 2024-01-15 10:30:52
│ duration 7.456s
│ exit 0
│ log /tmp/start-command-1705312245123-abc123.log
│ session abc-123-def-456-ghi
```

The log file itself contains the raw command output and execution metadata.

## License

MIT
61 changes: 49 additions & 12 deletions REQUIREMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,24 +242,51 @@ Note: `--auto-remove-docker-container` is only valid with `--isolated docker` an

## Output Format

The output uses a "status spine" format that is width-independent, lossless, and works uniformly in TTY, tmux, SSH, CI, and log files.

Format conventions:
- `│` prefix → tool metadata
- `$` prefix → executed command
- No prefix → program output (stdout/stderr)
- `✓` / `✗` → result marker (success/failure)

### Success Case

```
[2024-01-15 10:30:45] Starting: ls -la
│ session abc-123-def-456-ghi
│ start 2024-01-15 10:30:45
$ ls -la

... command output ...
[2024-01-15 10:30:45] Finished
Exit code: 0
Log saved: /tmp/start-command-1705312245-abc123.log

│ finish 2024-01-15 10:30:45
│ duration 0.123s
│ exit 0
│ log /tmp/start-command-1705312245-abc123.log
│ session abc-123-def-456-ghi
```

### Failure Case (With Auto-Reporting)

```
[2024-01-15 10:30:45] Starting: failing-npm-command --arg
│ session abc-123-def-456-ghi
│ start 2024-01-15 10:30:45
$ failing-npm-command --arg

... command output/error ...
[2024-01-15 10:30:46] Finished
Exit code: 1
Log saved: /tmp/start-command-1705312246-def456.log

│ finish 2024-01-15 10:30:46
│ duration 1.234s
│ exit 1
│ log /tmp/start-command-1705312246-def456.log
│ session abc-123-def-456-ghi

Detected repository: https://github.com/owner/repo
Log uploaded: https://gist.github.com/...
Issue created: https://github.com/owner/repo/issues/123
Expand All @@ -268,11 +295,21 @@ Issue created: https://github.com/owner/repo/issues/123
### Failure Case (Without Auto-Reporting)

```
[2024-01-15 10:30:45] Starting: unknown-command
│ session abc-123-def-456-ghi
│ start 2024-01-15 10:30:45
$ unknown-command

... command output/error ...
[2024-01-15 10:30:45] Finished
Exit code: 127
Log saved: /tmp/start-command-1705312245-ghi789.log

│ finish 2024-01-15 10:30:45
│ duration 0.050s
│ exit 127
│ log /tmp/start-command-1705312245-ghi789.log
│ session abc-123-def-456-ghi

Repository not detected - automatic issue creation skipped
```

Expand Down