DocsCodeviewGetting started

Getting started

Install codeview with Docker, a package manager, a binary, or from source, and serve your first folder.

codeview has one command, serve, and it is the default, so codeview and codeview serve do the same thing. It needs git on the PATH and a folder of repositories.

Docker

The image reads repositories from /repos and listens on port 8080. Mount your folder as read-only.

docker run -d --name codeview -p 8080:8080 -v /srv/git:/repos:ro ghcr.io/toaweme/codeview

Images are tagged with the release version and latest, for linux/amd64 and linux/arm64. The image sets CODEVIEW_DIR=/repos and CODEVIEW_HOST=0.0.0.0, so only the mode needs setting, and only when you want every repository shown.

Homebrew and Scoop

# homebrew (macos)
brew install toaweme/tap/codeview

# scoop (windows)
scoop bucket add toaweme https://github.com/toaweme/scoop-bucket
scoop install toaweme/codeview

Binary

Download an archive for your OS and arch from the releases page.

wget -qO- https://github.com/toaweme/codeview/releases/download/vX.Y.Z/codeview_X.Y.Z_linux_x64.tar.gz | tar xz
./codeview serve --dir /srv/git

From source

Building from source needs Go, Node, and Task. task build builds the UI, then bin/codeview with it embedded.

git clone https://github.com/toaweme/codeview.git
cd codeview
task build
bin/codeview serve --dir /srv/git

First run

Point --dir at the folder holding your repositories. Without it, codeview serves the current directory.

codeview serve --dir /srv/git

It listens on http://127.0.0.1:8080 by default. Pass --host and --port to change that.

Public and all mode

Only public repositories are shown by default, the ones holding a git-daemon-export-ok file in their git directory. That is the same marker git daemon uses, so a folder already exported over the git protocol needs no extra setup.

touch /srv/git/cli.git/git-daemon-export-ok

--mode all shows every repository, which is what you want for a folder of your own checkouts.

codeview serve --dir ~/code --mode all

Warning

There is no auth. Keep an all mode instance behind a VPN, a LAN, or an auth proxy.