Tusho is a Linux-first file catalog system made of two parts:
The project is designed to be understandable to beginners without giving up engineering discipline. Variable names are intentionally descriptive, source files are heavily documented, the repository ships with strict CI, and the documentation stack includes both API reference generation and a separate serveable wiki layer.
./scripts/setup_linux.sh, then ./scripts/build.sh --run-tests..
|-- CMakeLists.txt # C++ build entry point
|-- include/ # Public C++ headers with Doxygen comments
|-- src/ # C++ crawler implementation
|-- tests/ # C++ unit and integration tests
|-- web/ # PHP web application, XML config, and PHP tests
|-- scripts/ # Linux helper scripts for building and quality checks
|-- docs/ # GitHub Pages documentation source
|-- wiki/ # DokuWiki-based beginner wiki setup
|-- .github/workflows/ # CI, security, docs, and release checks
`-- composer.json # PHP dependency and quality tooling definition
For each discovered file system entry, Tusho stores:
If you want the simplest possible local workflow, use these five commands in order:
./scripts/setup_linux.sh
mkdir -p /tmp/tusho-demo && touch /tmp/tusho-demo/example.txt
./scripts/build.sh --run-tests
./scripts/run_crawler.sh --database-path /tmp/tusho-demo/catalog.sqlite3 --crawl-root /tmp/tusho-demo --log-file-path /tmp/tusho-demo/crawler.jsonl --rebuild-database
./scripts/run_web_application.sh --database-path /tmp/tusho-demo/catalog.sqlite3
Then open http://127.0.0.1:8080/index.php.
./scripts/setup_linux.sh
This script installs the Linux packages needed for:
composer.lock./scripts/build.sh --run-tests
mkdir -p /tmp/tusho-demo
touch /tmp/tusho-demo/example.txt
mkdir -p /tmp/tusho-demo/folder
./scripts/run_crawler.sh \
--database-path /tmp/tusho-demo/catalog.sqlite3 \
--crawl-root /tmp/tusho-demo \
--log-file-path /tmp/tusho-demo/crawler.jsonl \
--rebuild-database
./scripts/run_web_application.sh --database-path /tmp/tusho-demo/catalog.sqlite3
This script generates a local XML configuration file for you automatically, so you do not need to edit the tracked config file by hand for a local demo.
./scripts/test.sh
This script runs:
If you use the raw PHP server command, make sure the web application points at your local database first. The helper script does that for you automatically, but the raw command path expects either:
web/config/application_configuration.xml, orTUSHO_WEB_CONFIGURATION_PATH environment variable that points at a local XML configcmake -S . -B build -G Ninja -DTUSHO_BUILD_TESTS=ON
cmake --build build
ctest --test-dir build --output-on-failure
composer install
composer run lint:php
composer run analyse:php
composer run test:php
php -S 127.0.0.1:8080 -t web/public
The PHP web application uses web/config/application_configuration.xml. That file is validated against web/config/application_configuration.xsd before the application serves requests.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<applicationConfiguration>
<siteTitle>Tusho File Catalog</siteTitle>
<databasePath>/var/lib/tusho/catalog.sqlite3</databasePath>
<webLogFilePath>/var/log/tusho/web-application.log</webLogFilePath>
<defaultPageSize>50</defaultPageSize>
</applicationConfiguration>
jq, systemd journal forwarding, Fluent Bit, Vector, Loki pipelines, and many hosted log products.Example crawler log entry:
{"timestamp":"2026-03-18T12:00:00Z","severity":"information","message":"The crawler completed the recursive scan.","scan_run_identifier":"1","accessible_entry_count":"120","inaccessible_entry_count":"3"}
The repository is set up to enforce:
clang-formatclang-tidycppcheckUseful helper scripts:
./scripts/setup_linux.sh installs the beginner-friendly Linux prerequisites../scripts/build.sh configures and builds the Linux crawler../scripts/build.sh --run-tests builds and then runs the C++ test suite../scripts/run_crawler.sh launches the built crawler executable../scripts/run_web_application.sh --database-path /tmp/tusho-demo/catalog.sqlite3 starts the PHP interface with a generated local XML config../scripts/test.sh runs the local build, C++ tests, PHP quality checks, and PHPUnit.docs/wiki/This repository now contains a working project skeleton with real crawler, web, test, and documentation code. Because this development environment does not currently have a Linux C++ compiler or PHP runtime installed, the Linux-targeted build and runtime verification are enforced primarily in GitHub Actions and should also be run on an Ubuntu machine locally.