{"id":50836558,"url":"https://github.com/drafael/chat4j","last_synced_at":"2026-06-14T04:01:11.151Z","repository":{"id":364637948,"uuid":"973400449","full_name":"drafael/chat4j","owner":"drafael","description":"Lightweight desktop AI chat client","archived":false,"fork":false,"pushed_at":"2026-06-13T20:05:05.000Z","size":4624,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-13T22:08:33.469Z","etag":null,"topics":["ai","ai-assistant","ai-chat-app","ai-chat-application","ai-chat-client","ai-chat-interface","chat-app","chat-application","chromium-embedded-framework","flatlaf","java","jcef","webview-app","webview2"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drafael.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-26T22:51:16.000Z","updated_at":"2026-06-13T20:05:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/drafael/chat4j","commit_stats":null,"previous_names":["drafael/chat4j"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/drafael/chat4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drafael%2Fchat4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drafael%2Fchat4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drafael%2Fchat4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drafael%2Fchat4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drafael","download_url":"https://codeload.github.com/drafael/chat4j/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drafael%2Fchat4j/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34308622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-assistant","ai-chat-app","ai-chat-application","ai-chat-client","ai-chat-interface","chat-app","chat-application","chromium-embedded-framework","flatlaf","java","jcef","webview-app","webview2"],"created_at":"2026-06-14T04:01:10.608Z","updated_at":"2026-06-14T04:01:11.143Z","avatar_url":"https://github.com/drafael.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chat4J\n\n[![CI](https://github.com/drafael/chat4j/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/drafael/chat4j/actions/workflows/ci.yml)\n[![Security Audit](https://github.com/drafael/chat4j/actions/workflows/security.yml/badge.svg?branch=main)](https://github.com/drafael/chat4j/actions/workflows/security.yml)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)\n![Java](https://img.shields.io/badge/Java-21-orange?logo=openjdk)\n![Maven](https://img.shields.io/badge/build-Maven-C71A36?logo=apachemaven)\n![Platforms](https://img.shields.io/badge/platform-macOS%20%7C%20Windows%20%7C%20Linux-lightgrey)\n\nLightweight desktop AI chat client built with **Java 21**, **Swing**, and **Maven**.\nPolished with [FlatLaf](https://github.com/JFormDesigner/FlatLaf) and bundled [IntelliJ themes](https://github.com/JFormDesigner/FlatLaf/tree/main/flatlaf-intellij-themes).\nChat transcripts can use native system WebViews via [SwingWebView](https://github.com/webliteca/swingwebview), Chromium through [jcefmaven](https://github.com/jcefmaven/jcefmaven) / [JCEF](https://github.com/chromiumembedded/java-cef), or a Swing fallback.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/chat4j-themes-preview.png\" alt=\"Chat4J desktop UI with light, dark, and teal themes\" width=\"900\"\u003e\n\u003c/p\u003e\n\n## Quick start\n\n```bash\nmvn clean compile\nmvn exec:java\n```\n\n## Build \u0026 test\n\n```bash\nmvn clean package\nmvn test\n```\n\nRun packaged jar:\n\n```bash\njava --enable-preview -jar target/chat4j-\u003cversion\u003e.jar\n```\n\n## Dependency and security audits\n\n```bash\n# Generate JaCoCo coverage report and enforce core non-UI coverage gates\nmvn -Pcoverage verify\n\n# Generate CycloneDX SBOM files in target/bom.xml and target/bom.json\nmvn -Psbom verify\n\n# Run OWASP Dependency-Check; fails on CVSS 7+\nmvn -Pdependency-audit verify\n\n# Check available dependency/plugin updates\nmvn versions:display-dependency-updates versions:display-plugin-updates\n```\n\nDependabot is configured in `.github/dependabot.yml` for Maven and GitHub Actions updates. The scheduled Security Audit workflow runs OWASP Dependency-Check weekly and uploads HTML/JSON reports.\n\n## What it does\n\n- Desktop chat UI (Swing + FlatLaf)\n- Multi-provider model selection\n- Streaming assistant responses\n- Local history/settings persistence (H2 + Flyway)\n- Agent Mode with local workspace tools\n\n## Supported providers\n\n### API-key providers (env vars)\n\n- `ANTHROPIC_API_KEY`\n- `GEMINI_API_KEY` (alias: `GOOGLEAI_API_KEY`)\n- `OPENAI_API_KEY`\n- `PERPLEXITY_API_KEY`\n- `OPENROUTER_API_KEY`\n- `GROQ_API_KEY`\n- `DEEPSEEK_API_KEY`\n- `MISTRAL_API_KEY`\n- `XAI_API_KEY`\n\n### Setting environment variables\n\nReplace `sk-...` with your real API key. Restart Chat4J after changing environment variables.\n\n#### macOS / Linux (bash or zsh)\n\nFor the current terminal session:\n\n```bash\nexport OPENAI_API_KEY=\"sk-...\"\nmvn exec:java\n```\n\nTo make it persistent, add the export line to your shell profile:\n\n```bash\n# zsh, default on modern macOS\necho 'export OPENAI_API_KEY=\"sk-...\"' \u003e\u003e ~/.zshrc\n\n# bash\necho 'export OPENAI_API_KEY=\"sk-...\"' \u003e\u003e ~/.bashrc\n```\n\nReload the profile or open a new terminal:\n\n```bash\nsource ~/.zshrc   # or: source ~/.bashrc\n```\n\nOn macOS, apps launched from Finder/Dock may not inherit terminal variables. Chat4J tries to load your login shell environment, but if keys are still missing, either launch Chat4J from Terminal or set the variable for GUI apps:\n\n```bash\nlaunchctl setenv OPENAI_API_KEY \"sk-...\"\n```\n\n#### Windows PowerShell\n\nFor the current PowerShell session:\n\n```powershell\n$env:OPENAI_API_KEY = \"sk-...\"\nmvn exec:java\n```\n\nTo make it persistent for your Windows user account:\n\n```powershell\nsetx OPENAI_API_KEY \"sk-...\"\n```\n\nClose and reopen PowerShell, Command Prompt, or Chat4J after running `setx`.\n\n#### Windows Command Prompt\n\nFor the current Command Prompt session:\n\n```cmd\nset OPENAI_API_KEY=sk-...\nmvn exec:java\n```\n\nTo make it persistent:\n\n```cmd\nsetx OPENAI_API_KEY \"sk-...\"\n```\n\n### OAuth providers\n\n- **OpenAI Codex**\n- **GitHub Copilot**\n\n### Local providers\n\n- **LM Studio** — OpenAI-compatible server at `http://localhost:1234/v1` (no API key required)\n- **Ollama** — OpenAI-compatible endpoint at `http://localhost:11434/v1` (no API key required)\n\n## Documentation\n\n- [docs/README.md](docs/README.md) — full documentation index\n\n## Packaging\n\nNative installers are built with `jpackage` via Maven profiles.\nEach profile must run on the target OS (cross-packaging is not supported).\n\nUse OS-specific profiles:\n\n```bash\n# macOS (.dmg)\nmvn -Pjpackage-mac verify\n\n# Windows (.msi) — requires WiX Toolset 3.x\nmvn -Pjpackage-win verify\n\n# Linux (.deb) — requires dpkg\nmvn -Pjpackage-linux verify\n```\n\nOutput artifacts are written to `target/dist/`.\n\n## Release automation\n\nGitHub Actions builds unsigned release artifacts for version tags and manual reruns:\n\n```bash\ngit tag v26.6.13\ngit push origin v26.6.13\n```\n\nThe release workflow publishes the shaded jar, macOS `.dmg`, Windows `.msi`, Linux `.deb`, SBOM files, and SHA-256 checksums.\n\n## License\n\nApache License 2.0 — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrafael%2Fchat4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrafael%2Fchat4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrafael%2Fchat4j/lists"}