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
392 changes: 122 additions & 270 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 9 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
[package]
name = "gh-pilot"
version = "0.1.0"
edition = "2021"
description = "Terminal session manager for AI coding agents (gh extension)"
edition = "2024"
description = "Terminal session manager for AI coding agents"
license = "MIT"

[[bin]]
name = "gh-pilot"
path = "src/main.rs"

[dependencies]
ratatui = "0.30"
crossterm = "0.29"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
chrono = { version = "0.4", features = ["serde"] }
dirs = "6"
rusqlite = { version = "0.39", features = ["bundled"] }
anyhow = "1"
portable-pty = "0.9"
vt100 = "0.16"
shell-words = "1.1"
anyhow = "1.0.102"
clap = { version = "4.6.1", features = ["derive"] }
crossterm = "0.29.0"
ratatui = "0.30.0"
rusqlite = { version = "0.39.0", features = ["bundled"] }
serde_json = "1.0.145"
tokio = { version = "1.48.0", features = ["process", "rt-multi-thread", "sync"] }
36 changes: 7 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# gh-pilot

`gh pilot` is a GitHub CLI extension for managing GitHub Copilot CLI
sessions from a terminal UI.

It reads Copilot's local session files, shows recent sessions and remote agent
tasks, and lets you open or start Copilot sessions without leaving the UI.
sessions from a tmux-backed terminal UI.

## Installation

Expand All @@ -20,29 +17,10 @@ Run the following command:
gh pilot
```

## Usage

Interact with sessions using arrow keys or j/k momvement. You can also view all keybindings with <kbd>?</kbd>.

When launching a copilot session, it will open the CLI in a new tmux session. To leave the session, use <kbd>Ctrl+b</kbd> (your tmux leader key) and then <kbd>d</kbd> to detach. You can also `/quit` and it will return you to the main session list.

## Requirements

- [GitHub CLI](https://cli.github.com/)
- GitHub Copilot CLI available as `copilot` (for example, via `gh copilot`)
- `tmux`, used for embedded Copilot terminals
- Rust and Cargo, only if building from source

Remote agent tasks require an authenticated GitHub CLI with `gh agent-task list`
support.

## Data sources

`gh-pilot` reads Copilot data from:

- `~/.copilot/session-state/<id>/workspace.yaml` for local session metadata
- `~/.copilot/session-state/<id>/events.jsonl` for live session status
- `~/.copilot/session-store.db` for session summaries and conversation history
- `gh agent-task list --json ...` for remote agent tasks
## Session cache

Local sessions are shown when they have been active within the last seven days.
`gh-pilot` stores the last known local and remote session list in SQLite so the
tree can be restored between restarts while live tmux and remote data refresh in
the background. The database is stored at
`$XDG_CONFIG_HOME/gh-pilot/sessions.sqlite3`, or
`~/.config/gh-pilot/sessions.sqlite3` when `XDG_CONFIG_HOME` is not set.
Loading