galaxyproject / galaxyproject/loom
Orbit: publish analysis directory to GitHub from chat
- Dominant language
- TypeScript
- Stars
- 14
- Forks
- 12
- Avg merge
- 6d 5h
- Merged PRs (30d)
- 17
Description
## Problem
Orbit auto-initializes a git repo in each analysis directory (`git.ts`), but there is no way to push it to GitHub without leaving the app and using a terminal.
## Proposed solution
Add a `github_publish_analysis` tool (or `/publish` slash command) that:
1. Checks if a remote named `origin` already exists — if so, just `git push`.
2. If no remote: calls the GitHub API to create a new repo under the authenticated user/org, sets the remote, and pushes.
3. Reports the new repo URL in chat and writes it to `notebook.md` under a `## Repository` heading.
### Auth path (ordered by preference)
1. **`gh` CLI** — if `gh` is on `$PATH` and authenticated (`gh auth status`), delegate to `gh repo create --source=. --push`. This is the preferred path: OAuth-scoped, auto-refreshing, no extra credentials to store.
2. **Fallback instruction** — if `gh` is not available or not authenticated, surface a one-line prompt in chat: `gh auth login`, then re-run. No PAT storage in Preferences for now — keeps the UI lean and avoids holding another long-lived secret. A PAT fallback field can be added to Preferences if users ask for it.
### UX sketch
```
User: /publish
Agent: Publishing analysis to GitHub…
✓ Created github.com/nekrut/my-analysis (private)
✓ Pushed main branch
Repo URL added to notebook.
```
## Scope
- Loom brain: register `github_publish_analysis` tool in `extensions/loom/tools.ts`
- System prompt: brief guidance in `context.ts` (when to offer publishing)
- Orbit: no renderer changes needed — result surfaces in chat as normal tool output
- Preferences: no changes for now; add PAT field only if demand warrants it
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.