Kobold
Kobold is a Git-based package manager for libraries and projects. It clones repositories into a local cache, creates Git worktrees for specific branches or commits, and symlinks them into your project directories. Deduplication is automatic - the same repo is only stored once regardless of how many projects reference it.
Kobold provides both a Ruby API for programmatic use and a CLI for standalone command-line use.
CLI Commands
init — Create a new .kobold config file in the current directory.
kobold init
kobold init --repo raysan5/raylib --branch master
kobold init --repo raysan5/raylib --source https://gitlab.com --branch master
invoke — Process a .kobold file: clone repos, create worktrees, and symlink them into the project.
kobold invoke
kobold invoke --config path/to/project/
fetch — Fetch updates for registered repositories.
kobold fetch
kobold fetch raysan5/raylib
register — Register a repository in the database cache. Source defaults to https://github.com.
kobold register raysan5/raylib
kobold register raysan5/raylib --source https://gitlab.com
unregister — Remove a repository from the database registry.
kobold unregister raysan5/raylib
checkout — Create a worktree for a repo and optionally symlink it.
kobold checkout raysan5/raylib --branch master --dir external/raylib
branch — Create a new branch in a cached repo with a worktree.
kobold branch raysan5/raylib --name my-feature --from main --dir /tmp/workspace
list — List registered repos, worktrees, or branches.
kobold list repos
kobold list worktrees raysan5/raylib
kobold list branches raysan5/raylib
add — Add a dependency to an existing .kobold file. Source defaults to https://github.com.
kobold add --repo raysan5/raylib --branch master --dir external/
kobold add --repo raysan5/raylib --source https://gitlab.com --branch master
remove — Remove a dependency from a .kobold file.
kobold remove raylib
kobold remove raylib --cleanup
update — Update dependency commit SHAs to the latest on their branch.
kobold update raylib
kobold update
clean — Remove stale worktrees and optionally purge unreferenced repos.
kobold clean
kobold clean --purge --config .
db — Manage databases (isolated cache directories).
kobold db create my-session
kobold db delete my-session
kobold db list
config — View or change global settings like the default source URL.
kobold config get-source
kobold config set-source https://gitlab.com
version — Print version info.
kobold version
Use --database NAME before any command to operate on a specific database (default: default).
kobold --database orchestrator-session-1 invoke
Building and Installing Locally
Clone the repository and install dependencies:
git clone https://github.com/CatsAtTheRodeo/Kobold.git
cd Kobold
bundle install
Build the gem:
gem build Kobold.gemspec
Install the built gem:
gem install Kobold-0.4.0.gem
The kobold executable will be available on your PATH after installation.
License
The gem is available as open source under the terms of the MIT License.