https://github.com/gaskam/workspace
Workspace is a powerful application designed to install and manage all your repositories in your chosen destination.
https://github.com/gaskam/workspace
Last synced: 10 months ago
JSON representation
Workspace is a powerful application designed to install and manage all your repositories in your chosen destination.
- Host: GitHub
- URL: https://github.com/gaskam/workspace
- Owner: gaskam
- License: mit
- Created: 2024-11-20T16:12:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-03T17:40:59.000Z (10 months ago)
- Last Synced: 2025-04-12T20:51:37.187Z (10 months ago)
- Language: Zig
- Homepage:
- Size: 178 KB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-zig - gaskam/workspace - A powerful Zig-based tool to manage all your GitHub repositories with ease. (Tools / Utility)
README
Workspace
A powerful Zig-based tool to manage all your GitHub repositories with ease
## โจ Features
- ๐ **Fast & Efficient** - Built with Zig for maximum performance
- ๐ฆ **Bulk Operations** - Clone all repositories from any GitHub organization or user
- ๐ **Concurrent Processing** - Handle multiple repositories simultaneously
- ๐งน **Cleanup Tools** - Prune unwanted repositories automatically
- ๐ ๏ธ **Easy Setup** - Simple installation process for both Windows and Linux
## ๐ Table of Contents
- [Quick Start](#-quick-start)
- [Usage](#-usage)
- [Example](#example)
- [Development](#๏ธ๏ธ-development)
- [Prerequisites](#prerequisites)
- [Steps](#steps)
- [Contributing](#-contributing)
- [License](#license)
- [Star History](#star-history)
## ๐ Quick Start
โ
Choose your platform and run the installation command:
๐ง Linux
```bash
curl -fsSL https://raw.githubusercontent.com/gaskam/workspace/refs/heads/main/install.sh | bash
```
๐ช Windows PowerShell
```bash
irm raw.githubusercontent.com/gaskam/workspace/refs/heads/main/install.ps1 | iex
```
This script will:
- Install Workspace.
- Add it to your PATH.
- Ensure all required dependencies are installed.
## ๐ Usage
Workspace can be called with the following arguments:
For **cloning** repositories from a GitHub organization or user:
```bash
workspace clone [destination] [--flags]
```
Flags:
| Flag | Description |
|------|-------------|
| `--limit`, `-l` | Limit the number of repositories to clone |
| `--processes`, `-p` | Limit the number of concurrent processes -> Default is the number of logical CPUs - 1 |
| `--prune` | Delete repositories that do not belong to current user |
For showing **help**:
```bash
workspace help
```
For showing the **version**:
```bash
workspace version
```
For **updating** Workspace:
```bash
workspace update
```
For **uninstalling** Workspace:
```bash
workspace uninstall
```
### Example
Clone repositories from an organization
```bash
# Clone first 10 repos from ziglang
workspace clone ziglang ./workspace -l 10
# Clone all repos with 8 concurrent processes
workspace clone microsoft ./code -p 8
# Clone and clean up old repos
workspace clone gaskam ./projects --prune
```
> [!NOTE]
> Note that if you provide `--limit` and `--prune` flags, we'll delete
> the repositories that no longer exist once the limit is reached.
>
> This is useful for keeping your workspace clean and up-to-date.
> [!WARNING]
> If you use the `--processes` flag with a number higher than your
> number of CPU threads, you may experience performance issues.
>
> This can be useful if you want to override the default number of
> simultaneous processes, in order to go faster. It *will* be faster
> than the default value, but at the cost of a higher ressource usage.
## Benchmarks
This benchmark was run on a **GitHub codespaces** instance with **4 vCPUs** and **16GB of RAM**.
> [!NOTE] GitHub Codespaces is quite slow, since it clones with just one process.
We're using **hyperfine** to measure the time taken to clone each **repositories** from the specified organization.
Realized on **2024-12-03** with the **1.2.2** version of Workspace.
| Organization | Repositories Cloned | Time Taken [s] |
|--------------|---------------------|------------------|
| ziglang | 24 | 103.458 ยฑ 4.833 |
| gaskam | 11 | 3.454 ยฑ 0.185 |
## ๐ ๏ธ Development
For developers who want to contribute or build Workspace from source:
### Prerequisites
| Tool | Purpose | Installation |
|---------------|---------------------------------|-----------------------------------------------------|
| โก Zig | Building the application | [Download](https://ziglang.org/download/) |
| ๐ GitHub CLI | Interacting with GitHub | [Download](https://github.com/cli/cli#installation) |
| ๐ฆ Git | Git, forever and ever | [Download](https://git-scm.com/downloads) |
### Steps
1. Clone the repository:
```bash
git clone https://github.com/gaskam/workspace.git
cd workspace
```
2. Build the application:
```bash
zig build
```
3. Run the built binary:
```bash
./zig-out/bin/workspace -h
```
## ๐ค Contributing
Contributions are welcome! Feel free to:
* ๐ Report bugs
* ๐ก Suggest new features
* ๐ Improve documentation
* ๐ง Submit pull requests
## License
Workspace is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.
Made with โค๏ธ by Gaskam
## Star History