Small web UI for browsing a universal-ctags index stored in FerretDB.
It has three pieces:
index/readsctags.jsonand stores tagsimport/reads source files and stores code linesweb/serves search and file views on:8080
The UI is simple:
/token?token=mainsearches tags/show?file=/path/to/file.go&linecount=33shows a file
Start everything:
docker compose up -dOpen:
http://localhost:8080/
The database data is stored under data/postgres.
If you want a clean database:
docker compose down
rm -rf data/postgres
docker compose up -dmake buildThat builds:
index/ctags-indeximport/ctags-importweb/ctags-web
Generate the ctags JSON:
./scripts/run_ctags.sh .Load tags:
./index/ctags-index "mongodb://test:test@localhost:27017/" ctags.jsonLoad source lines:
./import/ctags-import "mongodb://test:test@localhost:27017/" ctags code .Run the web server locally:
./web/ctags-web "mongodb://test:test@localhost:27017/" ctags ctagsIf Docker is already running, you can also do the import inside the web container:
docker compose exec web sh -lc 'ctags --recurse=yes --fields=* --output-format=json -f /tmp/ctags.json /app &&
/app/index "mongodb://test:test@ferretdb:27017/" /tmp/ctags.json &&
/app/import "mongodb://test:test@ferretdb:27017/" ctags code /app &&
rm -f /tmp/ctags.json'