Skip to content

Add try repo to publish experiments to GitHub#122

Open
elalemanyo wants to merge 1 commit into
tobi:mainfrom
elalemanyo:feature/publish-try-as-github-repo
Open

Add try repo to publish experiments to GitHub#122
elalemanyo wants to merge 1 commit into
tobi:mainfrom
elalemanyo:feature/publish-try-as-github-repo

Conversation

@elalemanyo

@elalemanyo elalemanyo commented Jun 25, 2026

Copy link
Copy Markdown

Experiments deserve a home. Sometimes, later, they deserve a git repo too 🙂

shot2026-06-25 at 14 27 09@2x

This adds try repo, a small workflow for publishing a plain try directory to a fresh GitHub repository using the GitHub CLI. It keeps the lightweight “organized chaos” flow intact: start with a dated experiment folder, and if it grows up, give it a remote without manually doing the git init / first commit / gh repo create dance.

What changed

  • Add try repo [path-or-name] [repo-name] [--private|--public]
  • Add try exec repo ... for shell-wrapper/manual script usage
  • Add Ctrl-U in the TUI to publish the selected try
  • Default repo name strips the leading YYYY-MM-DD- prefix
  • Default visibility is private, with --public and TUI toggle support
  • Refuse directories that already contain .git to avoid touching existing history
  • Remove the temporary local .git after a successful gh repo create --push
  • Leave .git in place if any git/gh step fails, so the user can inspect and retry

Example

try repo 2025-08-17-my-app
# creates a private GitHub repo named my-app

try repo 2025-08-17-my-app better-name --public
# creates a public GitHub repo named better-name

Why

try is great at giving messy experiments a real place to live. This adds the next step for experiments that become worth sharing, backing up, or continuing somewhere else.

It does not replace graduate/local project workflows. It only publishes a plain try folder to GitHub.

Tests

  • Added repo command coverage in spec/tests/test_38_repo.sh
  • Covered CLI script generation, default private repos, public repos, custom names, relative path resolution, existing .git refusal, TUI publishing, TUI visibility toggle, and cancellation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant