- Go 96.4%
- Just 3.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| justfile | ||
| README.md | ||
🚀 gitit
The cheeky little git helper for Forgejo.
Tired of clicking through web UIs to create a repository, copying the URL, and manually typing git init, git add ., git commit, git remote add origin, and git push -u origin main?
Yeah, us too.
gitit automates the boring parts of Forgejo repository management directly from your terminal. It's fast, looks gorgeous (thanks to Charm), and skips the small talk.
✨ Features
- 🎟️ Profiles: Securely store your Forgejo server URLs and access tokens.
- 🐣 New: Scaffold a local project, create the remote Forgejo repo, scribble a basic
README.md, and push your first commit—all seamlessly animated in a smooth progress view. - 🔗 Link: Already started writing code? Hook up your existing local directory to a shiny new Forgejo remote in seconds.
- 🔄 Sync: Interactively fetch, pull, and push your code without having to remember if you need to rebase or prune.
- 🌿 Branch: Quickly create or switch between local and remote branches without the mental gymnastics.
- 🧨 YOLO Mode: Add, commit, and yeet your code to
origin. Because sometimes the building is on fire and you just need to get out.
🛠️ Installation
You'll need Go installed on your machine. We use just for quick and optimized builds.
# Clone the repo
git clone https://forgejo.example.com/your-username/gitit.git
cd gitit
# Fetch dependencies
go mod tidy
# Build an optimized, tiny binary
just build
# Or if you don't have 'just', use standard Go:
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o gitit src/*.go
Drop the gitit binary somewhere in your $PATH and you're good to go.
🎮 Usage
1. Get your VIP Pass (Profile Setup)
Before you do anything, tell gitit who you are and where your Forgejo instance lives.
gitit profile
Note: Your token is stored securely in ~/.config/gitit/config.json with strict 0600 permissions. No peeking allowed.
2. Start a fresh project
Create a brand new repository from scratch and instantly push it to the server.
mkdir my-awesome-app
cd my-awesome-app
gitit new
3. Link an existing project
Got a local .git folder already but nowhere to send it? Forge the link.
gitit link
4. Sync up
Don't want to type git fetch --all --prune and git pull manually? gitit sync has your back with a nice checklist.
gitit sync
5. In Case of Fire...
No time for git status or careful staging? Engage YOLO mode.
gitit yolo
It will prompt you for a quick commit message, add all your files, and push them straight to the cloud. Because you've got places to be.
🏗️ Architecture
Under the hood, gitit is designed to be maintainable and extensible:
main.go- CLI routing and entrypoint.commands.go- The brain of the operation. Handles the interactive UI flows.task_runner.go- The stage manager. Runs task lists with beautiful, smoothbubbleteaprogress bar animations.forgejo.go- The diplomat. Handles all HTTP communication with the Forgejo API and smart token fallbacks.git.go- The muscle. Wraps localgitexecutable commands and parses their output streams for live progress text.config.go- The vault. Reads and writes your local configuration.ui.go- The wardrobe. Stores shared colors, styles, and the ASCII logo.
🤝 Contributing
Found a bug? Want to add support for another forge? Feel free to open an issue or submit a pull request. Just keep the UI fast, the code modular, and the vibes cheeky.