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
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on:
push:
branches: [main]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- run: bun run typecheck
- run: bun test
- name: Smoke-test compiled binary
run: |
bun build src/main.tsx --compile --target=bun-linux-x64 --outfile dist/plexicus
./dist/plexicus --version
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
push:
tags: ['v*']

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- run: bun run typecheck
- run: bun test
- name: Build binaries
run: |
mkdir -p dist
bun build src/main.tsx --compile --target=bun-darwin-arm64 --outfile dist/plexicus-darwin-arm64
bun build src/main.tsx --compile --target=bun-darwin-x64 --outfile dist/plexicus-darwin-x64
bun build src/main.tsx --compile --target=bun-linux-x64 --outfile dist/plexicus-linux-x64
- name: Checksums
run: cd dist && sha256sum plexicus-* > SHA256SUMS
- name: Create release
run: |
gh release create "$GITHUB_REF_NAME" \
dist/plexicus-darwin-arm64 dist/plexicus-darwin-x64 dist/plexicus-linux-x64 dist/SHA256SUMS \
--title "$GITHUB_REF_NAME" --generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 22 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Thank you for your interest in contributing. This guide covers everything you ne
- [Running tests](#running-tests)
- [Code style](#code-style)
- [Pull request checklist](#pull-request-checklist)
- [Releases](#releases)
- [Reporting issues](#reporting-issues)

---
Expand All @@ -19,8 +20,8 @@ Thank you for your interest in contributing. This guide covers everything you ne
**Prerequisites**: [Bun](https://bun.sh) ≥ 1.1

```bash
git clone https://github.com/plexicus/cli
cd cli
git clone https://github.com/plexicus/tui
cd tui
bun install
```

Expand Down Expand Up @@ -140,9 +141,27 @@ Before opening a PR, confirm:

---

## Releases

Releases are fully automated via GitHub Actions ([`.github/workflows/release.yml`](.github/workflows/release.yml)). To publish a new version:

1. Bump `version` in `package.json` on `main` (via PR, following the [checklist](#pull-request-checklist)).
2. Tag and push:

```bash
git tag v0.2.0
git push origin v0.2.0
```

3. The `Release` workflow runs typecheck and tests, builds standalone binaries for macOS (arm64, x64) and Linux (x64) with `bun build --compile`, generates `SHA256SUMS`, and publishes a GitHub release with auto-generated notes.

The tag must match the `package.json` version (`v` + semver). CI ([`.github/workflows/ci.yml`](.github/workflows/ci.yml)) also smoke-tests the compiled binary on every PR so release builds don't break silently.

---

## Reporting issues

Open an issue at [github.com/plexicus/cli/issues](https://github.com/plexicus/cli/issues). Include:
Open an issue at [github.com/plexicus/tui/issues](https://github.com/plexicus/tui/issues). Include:

- plexicus version (`plexicus --version`)
- OS and terminal emulator
Expand Down
79 changes: 6 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![GitHub release](https://img.shields.io/github/v/release/plexicus/tui?label=release)](https://github.com/plexicus/tui/releases/latest)
[![Bun](https://img.shields.io/badge/runtime-Bun-f9f1e1?logo=bun&logoColor=black)](https://bun.sh)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
[![Tests](https://img.shields.io/badge/tests-66%20passing-brightgreen)](https://github.com/plexicus/tui/actions)
[![CI](https://github.com/plexicus/tui/actions/workflows/ci.yml/badge.svg)](https://github.com/plexicus/tui/actions/workflows/ci.yml)

<p align="center">
<img src="media/demo.gif" alt="Plexicus TUI demo — browse findings, view detail, remediate" width="780" />
Expand All @@ -26,12 +26,10 @@
- [Findings panel](#findings-panel)
- [Repos panel](#repos-panel)
- [SCM integration](#scm-integration)
- [AI chat sidebar](#ai-chat-sidebar)
- [Detail pane](#detail-pane)
- [Real-time status modal](#real-time-status-modal)
- [Keyboard reference](#keyboard-reference)
- [REPL commands](#repl-commands)
- [AI chat setup](#ai-chat-setup)
- [Configuration](#configuration)
- [Command reference](#command-reference)
- [Contributing](#contributing)
Expand All @@ -46,10 +44,9 @@
- **SCM integration** — connect GitHub, GitLab, Bitbucket Cloud, and Gitea directly from the TUI; OAuth providers open your browser automatically with no token copy-pasting
- **Real-time status modal** — live WebSocket progress bar and log stream while repos are scanned or AI remediations are generated
- **Filter modal** — interactive multi-dimensional filter: severity, repository, status, type, CVSS range, priority, language, category, CWE IDs, false positives
- **AI chat sidebar** — ask questions about your findings using Claude or OpenAI; context-aware, streams live
- **Remediation workflow** — request AI-generated remediations, review diffs, and open pull requests from the TUI
- **Fuzzy search** — instantly filter findings by name, CVE ID, or repository
- **REPL command bar** — `:ask`, `:filter`, `:theme` without touching a config file
- **REPL command bar** — `:filter`, `:scan`, `:theme` without touching a config file
- **Vim navigation** — `j`/`k`, `gg`/`G`, `Enter`, `Esc` — no mouse required
- **Themes** — `plexicus` (default), `dark`, `light` — switch live with `:theme <name>`
- **Zero-dependency install** — single static binary, no Node.js or Bun runtime needed on the target machine
Expand Down Expand Up @@ -171,20 +168,6 @@ Press `a` in the Repos panel to open the SCM connect flow:

**Headless / SSH sessions**: if the browser cannot be opened, the TUI displays the authorization URL prominently so you can click it in your terminal emulator. The polling flow continues normally once you complete auth on your local machine.

### AI chat sidebar

Press `c` to toggle the chat sidebar. Ask anything about your findings:

```
You: What's the risk of CVE-2024-1234 in my environment?
AI: CVE-2024-1234 is a SQL injection vulnerability rated CVSS 9.8 (Critical).
In your backend service it affects the user authentication endpoint...
```

The sidebar streams responses live. Press `Esc` to close it.

You can also pre-fill the chat from the REPL: `:ask what is the safest way to fix this?`

### Detail pane

Press `Enter` on any finding to open the detail pane:
Expand Down Expand Up @@ -235,7 +218,6 @@ The modal auto-closes two seconds after the job finishes. Press `Esc` to dismiss
| `/` | Open fuzzy search (findings panel only) |
| `F` | Open filter modal |
| `:` | Open REPL command bar |
| `c` | Toggle AI chat sidebar |
| `?` | Show keybindings help |
| `Ctrl+C` | Exit (press `Esc` first if you are in REPL mode) |

Expand Down Expand Up @@ -297,27 +279,10 @@ The modal auto-closes two seconds after the job finishes. Press `Esc` to dismiss
| `Enter` | Select result |
| `Esc` | Cancel |

### Chat mode (`c` to enter)

| Key | Action |
|-----|--------|
| `Esc` | Close sidebar, return to navigation |

---

## REPL commands

Open the REPL with `:` and type a command. Press `Esc` to return to navigation without running anything.

### `:ask <question>` (alias: `:a`)

Opens the AI chat sidebar and sends the question immediately.

```
:ask what is the impact of CVE-2024-1234?
:a how should I prioritize these findings?
```

### `F` — Filter modal (recommended)

Press `F` in navigation mode to open the interactive filter modal. Navigate with `↑`/`↓`, toggle checkboxes with `Space`, press `Enter` to apply, `r` to reset, `Esc` to cancel.
Expand Down Expand Up @@ -370,52 +335,25 @@ Switches the UI colour theme live.
Set a configuration value without leaving the TUI.

```
:config set llm.provider claude
:config set llm.api_key sk-ant-...
:config set theme light
:config set serverUrl https://api.example.com
```

This is equivalent to running `plexicus config set <key> <value>` from your shell. Key aliases apply: `llm.api_key` → stored as `llm.apiKey`, `llm.base_url` → stored as `llm.baseUrl`.

---

## AI chat setup

The AI chat sidebar uses your own API key. Configure a provider once:

```bash
# Use Claude (Anthropic)
plexicus config set llm.provider claude
plexicus config set llm.api_key sk-ant-...

# Use OpenAI (or any OpenAI-compatible endpoint)
plexicus config set llm.provider openai
plexicus config set llm.api_key sk-...
plexicus config set llm.model gpt-4o # optional, overrides default
plexicus config set llm.base_url https://... # optional, for custom endpoints
```

Your API key is stored in `~/.config/plexicus/config.json` with `0600` permissions (owner read/write only).
This is equivalent to running `plexicus config set <key> <value>` from your shell.

---

## Configuration

All configuration is stored in `~/.config/plexicus/config.json`. Modify it with `plexicus config set` or edit the file directly.

Keys passed to `plexicus config set` use snake_case aliases (`llm.api_key`, `llm.base_url`). They are normalized to camelCase when written to the JSON file (`llm.apiKey`, `llm.baseUrl`).

| Key (command line / `config set`) | Key (JSON file) | Description | Default |
|--------------------------|-----------------|-------------|---------|
| `serverUrl` | `serverUrl` | Plexicus REST API base URL | `https://api.app.plexicus.ai` |
| `webUrl` | `webUrl` | Web frontend URL — used for browser-based login (`plexicus login`) and OAuth flows | derived from `serverUrl` |
| `wsUrl` | `wsUrl` | WebSocket URL for real-time status events | derived from `serverUrl` |
| `token` | `token` | Authentication token | — |
| `theme` | `theme` | UI colour theme (`plexicus` \| `dark` \| `light`) | `plexicus` |
| `llm.provider` | `llm.provider` | LLM provider (`claude` \| `openai`) | — |
| `llm.api_key` | `llm.apiKey` | API key for the LLM provider | — |
| `llm.model` | `llm.model` | Model name (optional override) | Provider default |
| `llm.base_url` | `llm.baseUrl` | Custom base URL (OpenAI-compatible endpoints) | — |

> **Self-hosted note**: `webUrl` and `wsUrl` must be set explicitly when your instance uses IP:port addresses. See [Self-hosted setup](#self-hosted-setup).

Expand All @@ -425,11 +363,7 @@ Example `~/.config/plexicus/config.json`:
{
"serverUrl": "https://api.app.plexicus.ai",
"token": "plx_...",
"theme": "plexicus",
"llm": {
"provider": "claude",
"apiKey": "sk-ant-..."
}
"theme": "plexicus"
}
```

Expand Down Expand Up @@ -470,10 +404,9 @@ Opens the TUI directly on the Repos panel.
plexicus config set <key> <value>

Examples:
plexicus config set llm.provider claude
plexicus config set llm.api_key sk-ant-...
plexicus config set theme light
plexicus config set serverUrl https://api.example.com
plexicus config set webUrl https://app.example.com
```

### Environment variables
Expand Down
9 changes: 8 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@types/react": "18",
"@types/react-dom": "18",
"ink-testing-library": "^4.0.0",
"react-devtools-core": "^7.0.1",
"typescript": "^6.0.3"
},
"dependencies": {
Expand Down
Loading