Skip to content
Draft
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
4 changes: 4 additions & 0 deletions Source/VSCodeExtension/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
out/
node_modules/
*.vsix
.vscode-test/
9 changes: 9 additions & 0 deletions Source/VSCodeExtension/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.vscode/**
.vscode-test/**
src/**
.gitignore
node_modules/**
tsconfig.json
**/*.map
**/*.ts
!out/**
58 changes: 58 additions & 0 deletions Source/VSCodeExtension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Narrator - Chronicle Explorer

A VS Code extension that integrates with [Cratis Chronicle](https://github.com/Cratis/Chronicle) to browse and explore event stores directly from VS Code.

## Features

- **Browse event stores**: Navigate event stores, namespaces, and observers in a dedicated sidebar panel.
- **Context switching**: Switch between multiple Chronicle server contexts defined in `~/.cratis/config.json`.
- **Auto-connect**: Automatically connects to the active context on startup.
- **Config file watching**: Reloads configuration automatically when `~/.cratis/config.json` changes.

## Configuration

The extension reads connection settings from the same CLI config file used by the Cratis CLI:

**`~/.cratis/config.json`**
```json
{
"activeContext": "default",
"contexts": {
"default": {
"server": "chronicle://localhost:35000",
"managementPort": 8080
}
}
}
```

You can also override the config path in VS Code settings:

```json
{
"narrator.configPath": "/path/to/custom/config.json"
}
```

## Commands

| Command | Description |
|---------|-------------|
| `Narrator: Refresh` | Reload the Chronicle Explorer tree |
| `Narrator: Connect to Chronicle` | Connect (prompts for server URL if not configured) |
| `Narrator: Set Active Context` | Switch between configured Chronicle contexts |
| `Narrator: Open Narrator Settings` | Open VS Code settings for the extension |

## Build

```bash
cd Source/VSCodeExtension
npm install
npm run compile
```

To package:
```bash
npm run vscode:prepublish
npx vsce package
```
Loading