Skip to content

leochiu-a/echo

Repository files navigation

Echo (Electron Refactor)

Echo is now refactored into an Electron architecture with explicit main / preload / renderer boundaries.

What is implemented

  • Global shortcut registration (Command+K by default)
  • Overlay window near cursor with remembered window position
  • Dashboard window with Home / History / Commands / Settings
  • Codex runtime via persistent codex app-server JSON-RPC session
  • Streaming output, cancel flow, timeout/reset handling
  • Slash command normalization and prompt interpolation ({{input}})
  • History retention policy and token summary
  • Whisper voice input (set OpenAI API key in Settings, or via OPENAI_API_KEY)
  • Secure preload bridge (contextIsolation: true, nodeIntegration: false)

Project structure

  • src/main: system integration and Electron services
  • src/preload: IPC whitelist API exposed to renderer
  • src/renderer: overlay + dashboard UI
  • src/shared: shared domain logic and IPC contracts
  • Tests/unit: unit tests for core domain rules

Development

pnpm install
pnpm run dev

Open Dashboard -> Settings -> API Key to set your OpenAI API key. You can also use env fallback:

export OPENAI_API_KEY="sk-..."

Voice shortcuts:

  • Command + K: open/close input overlay
  • Command + Shift + K: start/stop voice dictation that inserts text into the focused field

Build

pnpm run build

Package

# current OS default target
pnpm run dist

# platform-specific targets
pnpm run dist:mac
pnpm run dist:win
pnpm run dist:linux

Packaged artifacts are generated under release/.

Storybook

pnpm run storybook

Build static Storybook site:

pnpm run build-storybook

Test

pnpm test

Lint

pnpm run lint
pnpm run lint:fix

Format

pnpm run format:check
pnpm run format

Pre-commit checks

husky runs lint-staged on staged files during git commit.

pnpm run lint-staged

About

Echo is an AI assistant for Mac that understands your context, helps you write better, and acts instantly.

Resources

License

Stars

Watchers

Forks

Contributors