Skip to content

Latest commit

 

History

1,810 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jait logo

Jait

Local-first AI coding agent workspace with terminal, filesystem, browser control, screen sharing, and task automation — no cloud backend required.

This is from now on a passion project of mine. I really like to build and make building easier. Feel free to critisize my approaches (issues are very welcome and help me a lot) in any way possible I really want to make this usable because it really makes me have fun at building stuff again 😁

Just a quick notice this is really new and breaks on many occasions. Lets fix it and make it work thogether! or at least let me know what fails 🙏

Jait runs as a lightweight gateway on your machine (or a server) and serves a web UI to any browser. Think of it as your own self-hosted AI dev environment: connect your API key, open the UI, and start building.

Typecheck Latest release Discord MIT License Website


Install

Option A — npm (recommended)

npm install -g @jait/gateway

That's it. Now run it:

jait start

The gateway starts on http://localhost:8000 — open it in your browser.

On first launch you'll create a local account (stored in SQLite, never leaves your machine) and paste an API key.

Option B — Desktop app

Download the latest installer from GitHub Releases:

Platform File
Windows Jait-*-x64-setup.exe or portable .exe
macOS Jait-*-arm64.dmg / Jait-*-x64.dmg
Linux Jait-*-x64.AppImage or .deb

The desktop app bundles the gateway + web UI in one window. No separate install needed.

Option C — From source

git clone https://github.com/Widev-e-U/Jait
cd Jait
bun install --frozen-lockfile
cp .env.example .env        # edit with your API key
bun run dev

Configuration

Jait uses environment variables for configuration. You can set them in:

  1. ~/.jait/.env (created automatically, persists across updates)
  2. A .env file next to the binary
  3. Shell environment variables

Minimal setup

The only thing you need is an LLM provider. Set one of these:

# OpenAI (or any OpenAI-compatible API)
OPENAI_API_KEY=sk-...

# Or use Ollama for fully local inference (no API key needed)
# LLM_PROVIDER=ollama
# OLLAMA_MODEL=llama3

Common options

PORT=8000                  # HTTP port (default: 8000)
HOST=0.0.0.0               # Bind address (default: 0.0.0.0)
JWT_SECRET=change-me        # Auth secret (auto-generated if not set)

Global agent instructions

Jait also reads ~/.jait/SOUL.md when building provider system prompts. Use it for durable user-level instructions that should apply across projects and providers, such as tool-routing preferences. Set JAIT_SOUL_PATH=/path/to/file.md or JAIT_GLOBAL_INSTRUCTIONS_PATH=/path/to/file.md to use a different file. The file is token-bounded and ignored when missing or empty.

All provider options

See .env.example for the full list, including:

  • OpenAI / Ollama — primary LLM
  • Brave, Perplexity, xAI Grok, Gemini, Moonshot — web search
  • Faster Whisper — local speech-to-text

Run in the background

Any platform (Windows, macOS, Linux)

npm install -g @jait/gateway

jait start                  # start in background
jait status                 # check health
jait stop                   # stop

Logs are written to ~/.jait/gateway.log.

Linux server (systemd)

For auto-start on boot, use the systemd integration:

npm install -g @jait/gateway

# Optional: pre-configure your API key
mkdir -p ~/.jait
echo 'OPENAI_API_KEY=sk-...' > ~/.jait/.env

# Install as a systemd user service (auto-starts on boot)
jait daemon install
jait daemon start

Now open http://your-server:8000 from any browser on your network.

Other daemon commands:

jait daemon status      # health check
jait daemon logs        # tail logs
jait daemon restart     # restart after config change
jait daemon stop        # stop
jait daemon uninstall   # remove service

Update on the server

jait update

This installs the latest gateway and automatically restarts gateways managed by jait start or jait daemon. To install a specific release, run jait update 0.1.705. You can also trigger the update from the web UI: Settings → Check for updates → Apply.


CLI reference

jait                       Start the gateway (default port 8000)
jait start                 Start the gateway in the background
jait stop                  Stop the background gateway
jait status                Check if the gateway is running
jait update [version]      Update the gateway (default: latest)
jait reset                 Wipe all data (~/.jait) — double confirmation
jait --port 9000           Custom port
jait --host 127.0.0.1      Bind to localhost only
jait --env /path/to/.env   Explicit env file
jait --version             Show version
jait --help                Show help

jait daemon install        Install systemd user service (Linux only)
jait daemon start|stop|restart|status|logs|uninstall

The start, stop, and status commands work on all platforms (Windows, macOS, Linux). The daemon commands use systemd and are Linux-only.


What can Jait do?

Capability Description
Chat Conversational AI with streaming, message queuing, and session history
Terminal Full PTY terminal access — the agent can run commands with your approval
Filesystem Read, write, and diff files in your workspace with backup & restore
Browser Playwright-controlled browser for web research and testing
Preview Live-preview web apps inside the workspace (proxied localhost ports)
Screen share Share your screen with the AI for visual context
Automation Manager mode: delegate tasks to background agent threads
Jobs Schedule recurring tasks (cron-style)
Multi-device Open the same session on multiple browsers — state syncs in real-time
Consent controls Approve/reject sensitive actions before they run

Project structure

packages/
  gateway/    Fastify server, tools, surfaces, scheduler, memory, SQLite DB
  shared/     Shared schemas, constants, and domain types
  api-client/ Typed API client for apps
  screen-share/ Screen-share service primitives
apps/
  web/        Vite + React frontend (bundled into gateway on publish)
  desktop/    Electron wrapper
  mobile/     Capacitor mobile client

Development

bun install --frozen-lockfile
bun run dev          # start all packages in dev mode
bun run build        # production build
bun run typecheck    # strict TypeScript checks
bun run test         # run Vitest tests
bun run lint         # oxlint
bun run healthcheck  # release guard, typecheck, build, test, lint

Running tests

bun run test                        # unit & integration
bun run test:e2e                    # Playwright E2E (requires running gateway)

Windows VM sandbox

Jait can spin up a full Windows VM (Windows 11) inside a container using dockurr/windows for browser testing on Windows. The VM is accelerated with KVM and exposes both an RDP endpoint (port 3389) and a web viewer (port 8006).

Requirements: a Linux host with KVM (/dev/kvm), at least 8 GB free RAM and ~32 GB free disk.

Build the image

docker build -t jait/windows-sandbox:latest -f docker/Dockerfile.windows-sandbox docker

Standalone testing (docker compose)

docker compose -f docker/docker-compose.windows-sandbox.yml up -d
  • Web viewer: http://localhost:8006
  • RDP: localhost:3389 (user Docker, password admin)
  • The Windows disk image persists in docker/windows-sandbox-storage/; delete that folder to reset the VM.

From the gateway

SandboxManager.startWindowsSandbox() starts a sandboxed VM and returns the RDP/web-viewer ports plus a browserId. The VM disk is stored under $JAIT_WINDOWS_SANDBOX_STORAGE (default: the OS temp dir) and is removed with stopWindowsSandbox(name, { removeStorage: true }).


Contributing

See CONTRIBUTING.md for guidelines. In short:

  • Use Conventional Commits (feat:, fix:, chore:)
  • Run bun run typecheck && bun run test before opening a PR
  • Keep PRs focused and small

Security

See SECURITY.md for reporting vulnerabilities.

License

MIT

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages