{"owner":"jrnl-org","repo":"jrnl","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"skills":{"CLAUDE.md":"# CLAUDE.md\n\nIMPORTANT: ALWAYS prefer contributing to the `main` branch with a PR.\n\n## Project Overview\n\njrnl is a command-line journal application written in Python. It supports plain text and encrypted (AES) journals, multiple journal types, and various export formats. The main branch for development is `main`\n\n## Development Setup\n\n```bash\npipx install poetry\npoetry install\npoetry shell  # activate virtualenv\n```\n\n## Common Commands\n\n```bash\n# Run full lint + test suite\npoetry run poe test\n\n# Run tests only (no linting)\npoetry run poe test-run\n\n# Run a single test file\npoetry run pytest tests/unit/test_config_file.py\n\n# Run a single BDD scenario by name (all BDD tests are in test_features.py)\npoetry run pytest tests/bdd/test_features.py -k \"test_scenario_name\"\n\n# Run a single test by name\npoetry run pytest -k \"test_name\" -x\n\n# Linting only\npoetry run poe lint\n\n# Auto-format code\npoetry run poe format\n\n# Serve docs locally at localhost:8000\npoetry run poe docs-run\n```\n\nTests run in parallel by default (`-n=auto` via pytest-xdist). To disable for debugging: `poetry run pytest -n0 -x`.\n\n## Architecture\n\n### Control Flow\n\nEntry point: `jrnl/main.py:run()` → `jrnl/controller.py:run()`\n\nThe controller has a two-phase command model:\n1. **Preconfig commands** (no config needed): `--help`, `--version`, `--diagnostic`\n2. **Postconfig commands** (need config): `--encrypt`, `--decrypt`, `--import`, `--list`\n3. Then either **append mode** (writing entries) or **search mode** (querying/filtering)\n4. Search results can have actions applied: `--edit`, `--delete`, `--change-time`\n\nCLI argument parsing is in `jrnl/args.py` (argparse-based).\n\n### Journal Types (`jrnl/journals/`)\n\n- `Journal` — base class, single-file storage, supports encryption\n- `FolderJournal` — entries stored as individual files in year/month/day structure\n- `DayOneJournal` — reads macOS Day One `.doentry` plist files\n\nFactory: `open_journal()` in `jrnl/journals/__init__.py` selects type from config.\n\n### Encryption (`jrnl/encryption/`)\n\n- `BaseEncryption` (abstract) → `NoEncryption`, `BasePasswordEncryption`\n- `BasePasswordEncryption` → `Jrnlv1Encryption` (legacy), `Jrnlv2Encryption` (current)\n- `determine_encryption_method()` factory maps config values to classes\n\n### Plugins (`jrnl/plugins/`)\n\nExporters: Text, Markdown, JSON, YAML, XML, Fancy, Tags, Dates, Calendar Heatmap. One importer: JRNL (native format). Plugin lookup via `get_exporter(format)` / `get_importer(format)`.\n\n### Git Integration (`jrnl/git.py`)\n\nAuto-commit, auto-pull, and auto-push are configurable per journal. `git_auto_commit()` initializes repos, stages changes, and commits. `git_pull()` uses fetch + fast-forward.\n\n### Config (`jrnl/config.py`)\n\nYAML-based config with per-journal overrides. Journals can be a string (path) or dict (path + overrides). CLI args override config via `apply_overrides()`.\n\n## Testing\n\n- **BDD tests**: `tests/bdd/features/*.feature` files using pytest-bdd. Step implementations in `tests/lib/` (`given_steps.py`, `when_steps.py`, `then_steps.py`, `fixtures.py`).\n- **Unit tests**: `tests/unit/test_*.py`\n- OS-specific markers: `@skip_win`, `@skip_posix`, `@on_win`, `@on_posix`\n- CI tests across Python 3.11–3.14 on Linux, macOS, and Windows\n\n## Never Touch Real User Config/Journals\n\n`jrnl.config.save_config()` (and anything that calls it, e.g. `install.upgrade_config()`) writes to the real `~/.config/jrnl/jrnl.yaml` by default when no `alt_config_path` is given. Do not run ad-hoc reproduction snippets (`python -c \"...\"`, scratch scripts) against functions in this codebase that touch config/journal paths — they can silently overwrite the user's actual jrnl config or journal files. Always reproduce bugs through the existing test infrastructure instead:\n\n- BDD: add/run a scenario in `tests/bdd/features/*.feature` against a fixture config in `tests/data/configs/`\n- Unit: use `tmp_path` / existing fixtures in `tests/unit/`, never a bare path that resolves to `get_config_path()`\n\nIf a one-off script is unavoidable, pass an explicit `alt_config_path` pointed at a file under the scratchpad/tmp directory, never leave it to default.\n\n## Code Style\n\n- Formatter: black (line length 88)\n- Linter: ruff (target Python 3.11)\n- Import sorting: ruff with isort rules, force single-line imports\n- Build system: poetry-core\n"},"files":{"CLAUDE.md":"# CLAUDE.md\n\nIMPORTANT: ALWAYS prefer contributing to the `main` branch with a PR.\n\n## Project Overview\n\njrnl is a command-line journal application written in Python. It supports plain text and encrypted (AES) journals, multiple journal types, and various export formats. The main branch for development is `main`\n\n## Development Setup\n\n```bash\npipx install poetry\npoetry install\npoetry shell  # activate virtualenv\n```\n\n## Common Commands\n\n```bash\n# Run full lint + test suite\npoetry run poe test\n\n# Run tests only (no linting)\npoetry run poe test-run\n\n# Run a single test file\npoetry run pytest tests/unit/test_config_file.py\n\n# Run a single BDD scenario by name (all BDD tests are in test_features.py)\npoetry run pytest tests/bdd/test_features.py -k \"test_scenario_name\"\n\n# Run a single test by name\npoetry run pytest -k \"test_name\" -x\n\n# Linting only\npoetry run poe lint\n\n# Auto-format code\npoetry run poe format\n\n# Serve docs locally at localhost:8000\npoetry run poe docs-run\n```\n\nTests run in parallel by default (`-n=auto` via pytest-xdist). To disable for debugging: `poetry run pytest -n0 -x`.\n\n## Architecture\n\n### Control Flow\n\nEntry point: `jrnl/main.py:run()` → `jrnl/controller.py:run()`\n\nThe controller has a two-phase command model:\n1. **Preconfig commands** (no config needed): `--help`, `--version`, `--diagnostic`\n2. **Postconfig commands** (need config): `--encrypt`, `--decrypt`, `--import`, `--list`\n3. Then either **append mode** (writing entries) or **search mode** (querying/filtering)\n4. Search results can have actions applied: `--edit`, `--delete`, `--change-time`\n\nCLI argument parsing is in `jrnl/args.py` (argparse-based).\n\n### Journal Types (`jrnl/journals/`)\n\n- `Journal` — base class, single-file storage, supports encryption\n- `FolderJournal` — entries stored as individual files in year/month/day structure\n- `DayOneJournal` — reads macOS Day One `.doentry` plist files\n\nFactory: `open_journal()` in `jrnl/journals/__init__.py` selects type from config.\n\n### Encryption (`jrnl/encryption/`)\n\n- `BaseEncryption` (abstract) → `NoEncryption`, `BasePasswordEncryption`\n- `BasePasswordEncryption` → `Jrnlv1Encryption` (legacy), `Jrnlv2Encryption` (current)\n- `determine_encryption_method()` factory maps config values to classes\n\n### Plugins (`jrnl/plugins/`)\n\nExporters: Text, Markdown, JSON, YAML, XML, Fancy, Tags, Dates, Calendar Heatmap. One importer: JRNL (native format). Plugin lookup via `get_exporter(format)` / `get_importer(format)`.\n\n### Git Integration (`jrnl/git.py`)\n\nAuto-commit, auto-pull, and auto-push are configurable per journal. `git_auto_commit()` initializes repos, stages changes, and commits. `git_pull()` uses fetch + fast-forward.\n\n### Config (`jrnl/config.py`)\n\nYAML-based config with per-journal overrides. Journals can be a string (path) or dict (path + overrides). CLI args override config via `apply_overrides()`.\n\n## Testing\n\n- **BDD tests**: `tests/bdd/features/*.feature` files using pytest-bdd. Step implementations in `tests/lib/` (`given_steps.py`, `when_steps.py`, `then_steps.py`, `fixtures.py`).\n- **Unit tests**: `tests/unit/test_*.py`\n- OS-specific markers: `@skip_win`, `@skip_posix`, `@on_win`, `@on_posix`\n- CI tests across Python 3.11–3.14 on Linux, macOS, and Windows\n\n## Never Touch Real User Config/Journals\n\n`jrnl.config.save_config()` (and anything that calls it, e.g. `install.upgrade_config()`) writes to the real `~/.config/jrnl/jrnl.yaml` by default when no `alt_config_path` is given. Do not run ad-hoc reproduction snippets (`python -c \"...\"`, scratch scripts) against functions in this codebase that touch config/journal paths — they can silently overwrite the user's actual jrnl config or journal files. Always reproduce bugs through the existing test infrastructure instead:\n\n- BDD: add/run a scenario in `tests/bdd/features/*.feature` against a fixture config in `tests/data/configs/`\n- Unit: use `tmp_path` / existing fixtures in `tests/unit/`, never a bare path that resolves to `get_config_path()`\n\nIf a one-off script is unavoidable, pass an explicit `alt_config_path` pointed at a file under the scratchpad/tmp directory, never leave it to default.\n\n## Code Style\n\n- Formatter: black (line length 88)\n- Linter: ruff (target Python 3.11)\n- Import sorting: ruff with isort rules, force single-line imports\n- Build system: poetry-core\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# CLAUDE.md\n\nIMPORTANT: ALWAYS prefer contributing to the `main` branch with a PR.\n\n## Project Overview\n\njrnl is a command-line journal application written in Python. It supports plain text and encrypted (AES) journals, multiple journal types, and various export formats. The main branch for development is `main`\n\n## Development Setup\n\n```bash\npipx install poetry\npoetry install\npoetry shell  # activate virtualenv\n```\n\n## Common Commands\n\n```bash\n# Run full lint + test suite\npoetry run poe test\n\n# Run tests only (no linting)\npoetry run poe test-run\n\n# Run a single test file\npoetry run pytest tests/unit/test_config_file.py\n\n# Run a single BDD scenario by name (all BDD tests are in test_features.py)\npoetry run pytest tests/bdd/test_features.py -k \"test_scenario_name\"\n\n# Run a single test by name\npoetry run pytest -k \"test_name\" -x\n\n# Linting only\npoetry run poe lint\n\n# Auto-format code\npoetry run poe format\n\n# Serve docs locally at localhost:8000\npoetry run poe docs-run\n```\n\nTests run in parallel by default (`-n=auto` via pytest-xdist). To disable for debugging: `poetry run pytest -n0 -x`.\n\n## Architecture\n\n### Control Flow\n\nEntry point: `jrnl/main.py:run()` → `jrnl/controller.py:run()`\n\nThe controller has a two-phase command model:\n1. **Preconfig commands** (no config needed): `--help`, `--version`, `--diagnostic`\n2. **Postconfig commands** (need config): `--encrypt`, `--decrypt`, `--import`, `--list`\n3. Then either **append mode** (writing entries) or **search mode** (querying/filtering)\n4. Search results can have actions applied: `--edit`, `--delete`, `--change-time`\n\nCLI argument parsing is in `jrnl/args.py` (argparse-based).\n\n### Journal Types (`jrnl/journals/`)\n\n- `Journal` — base class, single-file storage, supports encryption\n- `FolderJournal` — entries stored as individual files in year/month/day structure\n- `DayOneJournal` — reads macOS Day One `.doentry` plist files\n\nFactory: `open_journal()` in `jrnl/journals/__init__.py` selects type from config.\n\n### Encryption (`jrnl/encryption/`)\n\n- `BaseEncryption` (abstract) → `NoEncryption`, `BasePasswordEncryption`\n- `BasePasswordEncryption` → `Jrnlv1Encryption` (legacy), `Jrnlv2Encryption` (current)\n- `determine_encryption_method()` factory maps config values to classes\n\n### Plugins (`jrnl/plugins/`)\n\nExporters: Text, Markdown, JSON, YAML, XML, Fancy, Tags, Dates, Calendar Heatmap. One importer: JRNL (native format). Plugin lookup via `get_exporter(format)` / `get_importer(format)`.\n\n### Git Integration (`jrnl/git.py`)\n\nAuto-commit, auto-pull, and auto-push are configurable per journal. `git_auto_commit()` initializes repos, stages changes, and commits. `git_pull()` uses fetch + fast-forward.\n\n### Config (`jrnl/config.py`)\n\nYAML-based config with per-journal overrides. Journals can be a string (path) or dict (path + overrides). CLI args override config via `apply_overrides()`.\n\n## Testing\n\n- **BDD tests**: `tests/bdd/features/*.feature` files using pytest-bdd. Step implementations in `tests/lib/` (`given_steps.py`, `when_steps.py`, `then_steps.py`, `fixtures.py`).\n- **Unit tests**: `tests/unit/test_*.py`\n- OS-specific markers: `@skip_win`, `@skip_posix`, `@on_win`, `@on_posix`\n- CI tests across Python 3.11–3.14 on Linux, macOS, and Windows\n\n## Never Touch Real User Config/Journals\n\n`jrnl.config.save_config()` (and anything that calls it, e.g. `install.upgrade_config()`) writes to the real `~/.config/jrnl/jrnl.yaml` by default when no `alt_config_path` is given. Do not run ad-hoc reproduction snippets (`python -c \"...\"`, scratch scripts) against functions in this codebase that touch config/journal paths — they can silently overwrite the user's actual jrnl config or journal files. Always reproduce bugs through the existing test infrastructure instead:\n\n- BDD: add/run a scenario in `tests/bdd/features/*.feature` against a fixture config in `tests/data/configs/`\n- Unit: use `tmp_path` / existing fixtures in `tests/unit/`, never a bare path that resolves to `get_config_path()`\n\nIf a one-off script is unavoidable, pass an explicit `alt_config_path` pointed at a file under the scratchpad/tmp directory, never leave it to default.\n\n## Code Style\n\n- Formatter: black (line length 88)\n- Linter: ruff (target Python 3.11)\n- Import sorting: ruff with isort rules, force single-line imports\n- Build system: poetry-core\n","category":"root","tokens":1083}]}