DevBase is a high-performance CLI project manager built with Go, featuring optimistic UI updates, concurrent directory scanning, and seamless VS Code integration.
- ⚡ Optimistic UI Updates - Instant visual feedback with automatic rollback on errors
- 🔍 Intelligent Project Discovery - Automatically finds Go, Node.js, and Git repositories
- 📊 SQLite Database - WAL mode enabled for maximum performance with optimized connection pooling
- 🔄 Git Integration - Shallow cloning for fast project restoration and GitHub repository cloning
- ⚙️ Concurrent Scanning - Worker pool pattern (10 goroutines) for lightning-fast directory traversal
- 💻 VS Code Integration - One-key project opening with automatic last-opened timestamp tracking
- 🎨 Beautiful TUI - Built with Bubble Tea for a modern terminal experience
- ☁️ Cloud Sync - GitHub OAuth authentication with Gist backup/restore functionality
- 🔐 Secure Authentication - OAuth Device Flow (no manual token creation needed)
- 📁 Multi-Root Support - Manage multiple root directories and switch between them seamlessly
- 🗂️ Project Archiving - Archive projects to free up disk space, restore with one command
- 🌐 Browser Integration - Open GitHub repositories directly from the TUI
▶️ Quick Run - Execute projects in development mode with automatic terminal launching- 🔍 Real-time Search - Filter and search projects instantly with built-in fuzzy search
- 🏷️ Smart Tagging - Organize projects with custom tags
- 🔒 Confirmation Dialogs - Safe delete operations with "DELETE" confirmation
- 🎯 Selective Cloud Restore - Choose specific projects to restore from cloud backups
Option 1: Windows Installer (Easiest - Auto-adds to PATH)
- Download
devbase-windows-installer.exefrom latest release - Run the installer
- Restart your terminal
- Done! Use
devbasecommand from anywhere
Option 2: PowerShell Script
iwr -useb https://raw.githubusercontent.com/maleesha-pramud/devbase/main/install.ps1 | iexcurl -fsSL https://raw.githubusercontent.com/maleesha-pramud/devbase/main/install.sh | bashgo install github.com/maleesha-pramud/devbase/cmd/devbase@latest- Download the latest release for your platform from GitHub Releases
- Extract the archive:
Linux/macOS:
tar -xzf devbase-*.tar.gz
sudo mv devbase /usr/local/bin/Windows:
- Extract
devbase-windows-amd64.zip - Move
devbase.exeto a folder in your PATH (e.g.,C:\Program Files\DevBase\) - Add the folder to your System PATH
git clone https://github.com/maleesha-pramud/devbase
cd devbase
go build -o devbase ./cmd/devbase
# Move binary to your PATHNote: DevBase stores its database file (devbase.db) in your home directory (~/devbase.db on Unix-like systems, %USERPROFILE%\devbase.db on Windows). This allows you to run the devbase command from any directory.
sudo rm /usr/local/bin/devbase # Remove binary
rm ~/devbase.db # Remove database (optional)Windows:
- Installer: Run the uninstaller from "Add or Remove Programs" or
devbase-windows-installer.exe(uninstall option) - Manual:
Remove-Item -Path "$env:LOCALAPPDATA\Programs\DevBase" -Recurse -Force # Remove binary Remove-Item -Path "$env:USERPROFILE\devbase.db" # Remove database (optional) # If installed via installer, PATH is auto-removed. Otherwise manually remove from PATH.
rm $(which devbase) # Linux/macOS
rm ~/devbase.db # Remove database (optional)devbasedevbase --help # Show help information
devbase --version # Show version
devbase scan # Scan directories (interactive mode)| Key | Action |
|---|---|
Enter |
Open project in VS Code |
o |
Open GitHub repository in browser |
x |
Run project in development mode (opens new terminal) |
s |
Scan for new projects in current root folder |
g |
Clone a GitHub repository |
t |
Authenticate with GitHub OAuth (for cloud sync) |
u |
Sync projects to GitHub Gist (upload) |
l |
Select and load projects from cloud |
f |
Manage root folders (add/remove/switch) |
c |
Clear all projects (requires confirmation) |
d |
Archive project (deletes directory, requires typing "DELETE") |
r |
Restore archived project (clones from repo) |
/ |
Filter/search projects (fuzzy search) |
ESC |
Cancel confirmation dialogs |
q or Ctrl+C |
Quit |
| Key | Action |
|---|---|
Enter |
Set selected folder as active |
a |
Add new root folder |
d |
Delete root folder and all its projects |
s |
Scan selected root folder for projects |
ESC |
Return to main view |
| Key | Action |
|---|---|
Space |
Toggle project selection |
Enter |
Load selected projects as archived |
ESC |
Cancel and return to main view |
models/- Data structures with GORM tagsProject- Project metadata with path, repo URL, status, tagsRootFolder- Root directory management with active folder trackingConfig- Application configuration key-value store
db/- Database layer with optimized SQLite configuration- WAL mode, connection pooling, prepared statement caching
- CRUD operations for projects, root folders, and config
- Automatic filtering by active root folder
engine/- File system operations, Git integration, and scanning- Concurrent directory scanner with worker pool pattern
- Archive/restore operations with directory management
- Git cloning with shallow clone optimization
- GitHub OAuth and Gist sync functionality
ui/- Bubble Tea TUI with optimistic updates- Multiple view states (main list, setup, cloud select, root folder management)
- Real-time project filtering and search
- Confirmation dialogs for destructive operations
- Status messages and error handling
cmd/devbase/- Main application entry point with CLI argument parsing
- GORM - ORM with SQLite driver (modernc.org/sqlite - pure Go, no CGO)
- Bubble Tea - Terminal UI framework with model-view-update pattern
- Lipgloss - Terminal styling and layout
- go-git - Git operations in pure Go
- SQLite WAL Mode - Write-Ahead Logging for better concurrency
- GitHub OAuth - Device flow authentication for secure cloud sync
-
SQLite Configuration
- WAL (Write-Ahead Logging) mode enabled
PRAGMA synchronous = NORMALfor faster writesPRAGMA busy_timeout = 5000to prevent locking- Prepared statement caching
- Max 1 open connection (prevents SQLite locking)
- Connection pool optimization with max idle connections
-
Directory Scanning
- 10 concurrent worker goroutines with buffered channels
- Ignores heavy directories:
node_modules,dist,build,vendor,.git - Non-blocking project discovery with immediate feedback
- Deduplication to prevent duplicate project entries
-
Git Operations
- Shallow cloning with
Depth: 1(downloads only latest commit) - Saves bandwidth and disk space
- Fast repository restoration
- Automatic remote URL extraction from
.git/config
- Shallow cloning with
-
UI Updates
- Optimistic updates for instant feedback
- Background operations with automatic rollback on error
- Non-blocking VS Code and browser launching
- Efficient list rendering with Bubble Tea's virtual scrolling
-
Database Queries
- Composite indexes on
root_folder_idandpath - Automatic filtering by active root folder
- LastOpened timestamp for smart sorting
- Efficient project lookups by ID and path
- Composite indexes on
- VS Code - Must be installed with
codecommand in PATH - Git - Required for restore functionality (cloning repositories)
- GitHub Account - Optional, required only for cloud sync features
DevBase supports two authentication methods for GitHub integration:
Benefits:
- ✅ Secure browser-based authentication
- ✅ No manual token creation needed
- ✅ Automatic token management
- ✅ User-friendly experience
Setup:
- Press
tin the main view - Select "OAuth Device Flow" (press ENTER)
- DevBase will display a verification code
- Visit the GitHub URL shown and enter the code
- Authorization completes automatically
For users who prefer manual setup:
- Press
tin the main view - Select "Personal Access Token" (press P)
- Visit https://github.com/settings/tokens
- Create a new token with only
gistscope - Paste the token in DevBase
Note: OAuth requires a registered GitHub OAuth App. If OAuth fails, DevBase automatically falls back to manual token entry.
-
Upload Projects (
ukey): Backs up all projects to a private GitHub Gist- Separate Gists per root folder
- Automatic Gist ID tracking
- JSON format for easy portability
-
Select & Load (
lkey): Choose specific projects from cloud to restore as archived- Multi-select with Space bar
- Preview project names before loading
- Loads as archived status (restore with
rwhen needed)
-
Automatic Sync: Gist ID is saved per root folder - no configuration needed
-
Per-Root-Folder Backup: Each root folder has its own Gist backup
- ✅ Secure: No tokens to store or manage
- ✅ User-Friendly: Simple browser-based authorization
- ✅ Automatic: Handles token refresh behind the scenes
- ✅ Safe: Only requests
gistscope (read/write access to Gists)
If code command is not available:
- Open VS Code
- Press
Ctrl+Shift+P(Command Palette) - Type: "Shell Command: Install 'code' command in PATH"
- Select and run
DevBase stores all project data in devbase.db (SQLite) in your home directory (~/devbase.db on Unix-like systems, %USERPROFILE%\devbase.db on Windows).
- ID - Unique identifier (primary key)
- Name - Project name (derived from directory)
- Path - Full file system path (composite unique with RootFolderID)
- RepoURL - Git repository URL (auto-detected)
- Status -
activeorarchived - LastOpened - Timestamp (used for sorting)
- Tags - String array for categorization
- RootFolderID - Foreign key to RootFolder (composite unique with Path)
- CreatedAt / UpdatedAt - Automatic timestamps
- ID - Unique identifier (primary key)
- Name - User-friendly name for the root folder
- Path - Absolute path to the root folder (unique)
- IsActive - Currently active root folder (boolean)
- GistID - Gist ID for cloud backup of this root folder
- CreatedAt / UpdatedAt - Automatic timestamps
- Projects - One-to-many relationship with Project table
- ID - Unique identifier (primary key)
- Key - Configuration key (unique, e.g., "github_token")
- Value - Configuration value
Archive Operation (Press 'd'):
- User confirmation required (type "DELETE")
- UI immediately shows
[Archived]status - Background:
engine.ArchiveProject()deletes directory and updates DB - Success: No change needed (already displayed)
- Failure: UI reverts to original state, error displayed
Restore Operation (Press 'r'):
- UI immediately shows
[Processing...] - Background:
engine.RestoreProject()clones repo and updates DB - Success: Status changes to
[Active] - Failure: UI reverts to original state, error displayed
- Press
sto initiate scan in current active root folder - Worker pool (10 goroutines) activated
- Main thread walks directory tree, sends paths to workers via buffered channel
- Workers check for project markers:
package.json,go.mod,.git - Results collected and deduplicated by path
- New projects added to database with current root folder ID
- UI automatically reloads with updated list
- Press
fto enter root folder management view - Add new root folders with
akey - Switch active root folder by selecting and pressing Enter
- Projects are automatically filtered by active root folder
- Each root folder has its own cloud backup (Gist)
- Scan operation only scans the selected root folder
- Delete root folder removes all associated projects
Upload (u key):
- Retrieves all projects from current active root folder
- Serializes project data to JSON format
- Creates or updates a GitHub Gist (private)
- Stores Gist ID in root folder for future syncs
Selective Load (l key):
- Fetches project list from GitHub Gist
- Displays projects with multi-select interface
- User selects desired projects with Space bar
- Loads selected projects as archived status
- User can restore projects individually with
rkey
VS Code won't open:
- Ensure VS Code is installed
- Verify
codecommand is in PATH:code --version - Run "Shell Command: Install 'code' command in PATH" from VS Code Command Palette
Scan is slow:
- Large directories with many subdirectories take time
- Heavy folders (node_modules, dist, build, vendor, .git) are automatically skipped
- Consider scanning smaller root folders
Database locked:
- Only one DevBase instance should run at a time
- WAL mode minimizes locking issues
- Check if another terminal has DevBase running
GitHub OAuth fails:
- Verify internet connection
- Check if firewall is blocking GitHub
- Try Personal Access Token method instead (press
t→p) - Ensure you have a GitHub account
Clone repository fails:
- Verify the repository URL is correct
- Check if you have network access to GitHub
- Ensure you have Git installed
- For private repos, use GitHub authentication first
Projects not showing after scan:
- Ensure projects have recognized markers (
package.json,go.mod, or.git) - Check if you're viewing the correct root folder
- Try switching root folders with
fkey
Cloud sync not working:
- Authenticate with GitHub first (press
t) - Ensure you granted
gistscope permission - Check internet connection
- Verify GitHub is accessible
DevBase/
├── assets/
│ └── devbase_preview.gif # Application preview
├── cmd/
│ └── devbase/
│ └── main.go # Application entry point
├── db/
│ ├── db.go # Database operations and SQLite config
│ └── db_test.go # Database tests
├── engine/
│ ├── ops.go # Archive/restore/clone operations
│ ├── scanner.go # Concurrent directory scanner
│ ├── oauth.go # GitHub OAuth device flow
│ └── gist_sync.go # GitHub Gist sync operations
├── models/
│ └── project.go # Data models (Project, RootFolder, Config)
├── ui/
│ ├── main_view.go # Bubble Tea TUI with optimistic updates
│ └── main_view.go.bak # Backup file
├── devbase.db # SQLite database (in home directory)
├── go.mod # Go module dependencies
├── README.md # This file
├── TODO.md # Development roadmap
└── DevBase.exe # Production executable (Windows)
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - See LICENSE file for details
- Bubble Tea - Terminal UI framework
- Lipgloss - Terminal styling
- Bubbles - TUI components
- GORM - ORM library
- go-git - Git implementation in Go
- modernc.org/sqlite - Pure Go SQLite driver
DevBase v1.8.3 - Built with ❤️ in Go
