diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index eae5c81..ba5d2b7 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -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: │ │ -│ │ Shell: /bin/bash │ │ -│ │ Platform: linux │ │ -│ │ ================================================== │ │ +│ │ │ session abc-123-def-456 │ │ +│ │ │ start 2024-01-15 10:30:45 │ │ +│ │ │ │ │ +│ │ $ │ │ +│ │ │ │ │ │ │ │ -│ │ ================================================== │ │ -│ │ 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) │ +│ │ └─────────────────────────────────────────────────────────────────┘ ``` diff --git a/README.md b/README.md index 98d9719..89e45fc 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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 diff --git a/REQUIREMENTS.md b/REQUIREMENTS.md index 6e8a26c..13b88e2 100644 --- a/REQUIREMENTS.md +++ b/REQUIREMENTS.md @@ -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 @@ -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 ```