Pseekoo diagnostics toolkit for ELK, Bugsink/Sentry, and issue handoff workflows.
Project description
ojiichan
Pseekoo diagnostics toolkit for projects that report to ELK and Bugsink/Sentry.
It provides both:
- a Python library (
ojiichan) for structured ELK events and Sentry/Bugsink setup; - a CLI (
ojiichan) for health checks, recent logs, and test event emission.
It standardizes the same observability workflow across Python services.
Install
uv add ojiichan
# with Locke/Vaultwarden credential support:
uv add "ojiichan[vault]"
# or for development:
uv sync
Configuration and credentials
Ojiichan resolves explicit environment variables first, then Locke/Vaultwarden secrets when installed with the vault extra. The checked-in locke.json documents the expected Vaultwarden paths; no sample env file with secret-shaped values is needed.
Default vault folder: ojiichan.
Override it with OJIICHAN_VAULT_FOLDER when needed.
Non-secret options can still be set as env vars, for example ELASTICSEARCH_PORT, ELASTICSEARCH_USE_SSL, ELASTICSEARCH_VERIFY_CERTS, ELASTICSEARCH_TIMEOUT, and BUGSINK_TIMEOUT.
CLI
ojiichan health --hours 6
ojiichan logs --hours 2 --topic matrix --failures-only
ojiichan emit matrix_exchange_failed --topic auth --level error --failure \
--data '{"operation":"matrix_exchange","room_id":"!abc"}'
Library
from ojiichan import ElkClient, init_sentry
init_sentry(service="stoz3n-chat-agent", environment="development")
elk = ElkClient(service="stoz3n-chat-agent")
elk.log_event(
"matrix_exchange_start",
{"operation": "matrix_exchange", "user_id": "@user:example.org"},
topic="auth",
)
For exception paths:
try:
...
except Exception as exc:
elk.log_event(
"matrix_exchange_failed",
{"operation": "matrix_exchange", "error": str(exc)},
level="error",
topic="auth",
failure=True,
)
raise
MCP server
Ojiichan also ships a local stdio MCP server so coding agents can query diagnostics and run repeatable test/build checks without hardcoding shell snippets.
Run it manually:
uv run ojiichan-mcp
Example MCP client config:
{
"mcpServers": {
"ojiichan": {
"command": "uv",
"args": [
"run",
"--with",
"ojiichan[vault]",
"ojiichan-mcp"
]
}
}
}
Exposed tools:
elk_healthelk_logsemit_elk_eventbugsink_healthbugsink_issuescreate_bead_from_issuexcode_buildxcode_test
For Xcode projects, an agent can call xcode_test with a local project_path, scheme, and destination.
Release
Publishing is handled by GitLab CI in the public pseekoo/ojiichan repository:
- pushes to the default branch publish a PEP 440 dev build to the GitLab PyPI registry;
- tags matching
vX.Y.Zpublish the release to the GitLab PyPI registry and to pypi.org; - tagged releases require
PYPI_API_TOKENin GitLab CI variables.
To release the current version:
git tag v0.1.0
git push origin main --tags
Notes
- Bugsink ingestion uses the normal Sentry SDK via
SENTRY_DSN. - Bugsink issue reads use the canonical read API at
/api/canonical/0/issues/and requireBUGSINK_API_TOKEN. - Beads integration is intentionally optional;
ojiichan.beadsshells out only whenbead/beadsis installed. - The public distribution and import package are both
ojiichan; the GitLab repository can live under thepseekoogroup without changing Python names.
Project details
Release history Release notifications | RSS feed
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 ojiichan-0.1.0.tar.gz.
File metadata
- Download URL: ojiichan-0.1.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9aeacd70c2f6bb3b49cb4091d58f819c65bdbb4eeb582c27a0b1be80ad06f634
|
|
| MD5 |
b4dedb232ee2d7f8cf30d4976a4f095c
|
|
| BLAKE2b-256 |
0f2f0c02d3fb7884d9a08efdfa7937c9adaf80c1e246e7ce8b9d843cca80167e
|
File details
Details for the file ojiichan-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ojiichan-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6b94ff02c4f9891e28d9db0ee6d00a1a2638b1b0565178351ea9cfc2e2df1f6
|
|
| MD5 |
90261a4550e01214c80badd4dc7ccfd3
|
|
| BLAKE2b-256 |
85ef434e12bdd1ee497c492642069c9e338c34ad9168e8b73bd6adb4288355a3
|