A CLI Collaborative Knowledge Base Management System
Project description
Santai CLI
A CLI for managing Santai knowledge-base projects — with a terminal UI, web dashboard, and AI chat.
Prerequisites
Installation
git clone https://github.com/santai-inc/santai-cli.git
cd santai-cli
# Global install (recommended)
uv tool install --from . santai-cli
# Or development install
uv sync
uv run santai --help
Picking up local changes
uv tool install copies the package into an isolated venv, so edits or branch switches in your clone won't affect the global santai until you reinstall. For active development, use an editable install so the global santai tracks your working tree:
uv tool install --editable --from . santai-cli --force
Otherwise, re-run the install after each change:
uv tool install --from . santai-cli --force
The --force flag is required — without it, uv treats an already-installed package as a no-op.
To track a different branch in a separate directory, use a git worktree and point the editable install at that path:
git worktree add ../santai-cli-other other-branch
uv tool install --editable --from ../santai-cli-other santai-cli --force
Quick Start
santai init my-project
cd my-project
santai ui
Commands
santai init [NAME]
Initialize a new Santai project with the standard directory structure, git repo, and pre-commit hooks.
santai init my-project
santai init .
santai copy SOURCE DESTINATION
Copy an entire project to a new location with a fresh git history.
santai copy . ../forked-kb
santai cherry-pick SOURCE DESTINATION FILES...
Selectively copy specific files or folders from one project into another.
santai cherry-pick ./kb-large ./kb-small notes/idea.md
santai cherry-pick ./research ./writing wiki/ resources/outline.md
santai cherry-pick . ../other-kb notes/ --dry-run
| Option | Description |
|---|---|
--overwrite |
Overwrite existing files without prompting |
--skip |
Silently skip files that already exist |
--dry-run |
Preview what would be copied |
santai merge SOURCE1 SOURCE2 DESTINATION
Merge two projects into a new combined project. The primary project's files take precedence on conflicts.
santai merge ./primary-kb ./secondary-kb ./combined-kb
santai chat
Interactive AI chat session. Requires an API key in .env (see .env.example).
santai chat
santai chat --agent research
santai chat --model claude-sonnet-4-20250514
santai ui
Launch the terminal UI dashboard.
santai ui
santai ui --theme catppuccin
santai web
Launch the web dashboard in your browser.
santai web
santai web --port 3000
santai push / santai pull
Sync projects with Santai Hub (requires santai login).
santai push # Upload current project
santai pull my-project # Download a project
santai login / santai logout / santai whoami
Authenticate with Santai Hub.
santai login # Browser-based auth flow
santai whoami # Show current user
santai logout # Clear credentials
For detailed usage, options, and examples for all commands, see the full documentation.
Project Structure
A Santai project contains these directories:
| Directory | Purpose |
|---|---|
resources/ |
Reference materials (markdown, PDFs, images, documents) |
codebases/ |
Code repositories and references |
history/ |
Dated markdown entries documenting major changes |
notes/ |
General notes and scratch space |
wiki/ |
Context for grounding AI agents |
Development
uv sync --group dev
uv run santai --help
ruff format .
ruff check --fix .
# Serve documentation locally
uv run mkdocs serve
Source Layout
src/santai_cli/
├── cli.py # Typer app, command registration
├── commands/
│ ├── init.py # santai init
│ ├── copy.py # santai copy
│ ├── cherry_pick.py # santai cherry-pick
│ ├── merge.py # santai merge
│ ├── chat.py # santai chat
│ ├── auth.py # santai login/logout/whoami
│ ├── push.py # santai push
│ ├── pull.py # santai pull
│ ├── ui.py # santai ui
│ └── web.py # santai web
├── core/
│ ├── project.py # Project detection, data models, file graph
│ ├── config.py # Environment/config loading, API key validation
│ └── chat.py # Chat engine (streaming, provider abstraction)
├── tui/
│ └── app.py # Textual TUI application
└── web/
├── app.py # FastAPI web application
└── templates/
└── index.html # Web dashboard (Jinja2 + D3.js)
License
See the repository for license information.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file santai_cli-0.1.0.tar.gz.
File metadata
- Download URL: santai_cli-0.1.0.tar.gz
- Upload date:
- Size: 136.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
500ade08d2522ac3a708023325b747d9ad160c9140c37f1168e18035242dd2d2
|
|
| MD5 |
2c65cd9bdaf6a8899d483eb289de61bc
|
|
| BLAKE2b-256 |
99c35703daf6d174d9e224ce907df3d8f37a2fd185cf09496d8fafff5eb2e41c
|
File details
Details for the file santai_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: santai_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 150.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b07904b2a49b2ff7046e2a893a6255f14cfb8ce5af99aaf5ffcbc3052536081
|
|
| MD5 |
779c6d6dbcb60118c6e17e91fd052d42
|
|
| BLAKE2b-256 |
ae62850b1ce66efe411f7e34b6e3c74c3b24d787fef4560948259664f588aa1f
|