A safe, simple, extensible, and fast agent harness
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove individual `ein-tui` and `ein-server` binaries

Use the `ein` metapackage binaries to prevent the name collision
warnings when building with `--workspace`

+6 -62
+2 -2
CLAUDE.md
··· 42 42 43 43 ```bash 44 44 # Terminal 1 — start the server (no env vars needed) 45 - cargo run -p ein-server 45 + cargo run --bin ein-server 46 46 47 47 # Terminal 2 — start the TUI (connects to localhost:50051 by default) 48 - cargo run -p ein-tui 48 + cargo run --bin ein-tui 49 49 50 50 # Optional: connect to a non-default server address 51 51 cargo run -p ein-tui -- http://my-server:50051
+4 -4
README.md
··· 128 128 Start the server in one terminal: 129 129 130 130 ```bash 131 - cargo run -p ein-server 131 + cargo run --bin ein-server 132 132 ``` 133 133 134 134 Start the TUI client in another: 135 135 136 136 ```bash 137 - cargo run -p ein-tui 137 + cargo run --bin ein-tui 138 138 ``` 139 139 140 140 The TUI connects to `localhost:50051` by default. To connect to a different address: 141 141 142 142 ```bash 143 - cargo run -p ein-tui -- http://my-server:50051 143 + cargo run --bin ein-tui -- http://my-server:50051 144 144 ``` 145 145 146 146 To enable debug logging to `~/.ein/tui.log`: 147 147 148 148 ```bash 149 - cargo run -p ein-tui -- --debug 149 + cargo run --bin ein-tui -- --debug 150 150 ``` 151 151 152 152 On first connection a **session picker** modal appears. Use `↑`/`↓` to navigate, `Enter` to select:
-3
crates/ein-server/Cargo.toml
··· 11 11 name = "ein_server" 12 12 path = "src/lib.rs" 13 13 14 - [[bin]] 15 - name = "ein-server" 16 - path = "src/main.rs" 17 14 18 15 [dependencies] 19 16 anyhow = { workspace = true }
-40
crates/ein-server/src/main.rs
··· 1 - // SPDX-License-Identifier: Apache-2.0 2 - // Copyright 2026 Mason Stallmo 3 - 4 - //! Ein server binary. 5 - //! 6 - //! Starts a gRPC server that exposes the `Agent` service defined in 7 - //! `ein-proto`. Clients (e.g. `ein-tui`) open a bidirectional streaming 8 - //! session, stream user prompts in, and receive a sequence of `AgentEvent` 9 - //! messages back as the agent thinks, invokes tools, and produces output. 10 - //! 11 - //! # Configuration 12 - //! 13 - //! | Variable | Description | Default | 14 - //! |----------|-------------------------------------|---------| 15 - //! | `--port` | TCP port the gRPC server listens on | `50051` | 16 - //! 17 - //! API credentials (`api_key`, `base_url`) are supplied by the client via 18 - //! `SessionConfig` at connection time, read from `~/.ein/config.json`. 19 - //! 20 - //! # Plugin loading 21 - //! 22 - //! In debug builds, WASM plugins are loaded from `./target/wasm32-wasip2/debug/`. 23 - //! In release builds tool plugins are loaded from `~/.ein/plugins/tools/` and 24 - //! model client plugins from `~/.ein/plugins/model_clients/`. 25 - //! Run `./scripts/build_install_plugins.sh` to compile and install them. 26 - 27 - use clap::Parser; 28 - 29 - #[derive(Parser)] 30 - #[command(author, version, about)] 31 - struct Args { 32 - /// TCP port for the gRPC server to listen on. 33 - #[arg(long, default_value = "50051")] 34 - port: u16, 35 - } 36 - 37 - #[tokio::main] 38 - async fn main() -> anyhow::Result<()> { 39 - ein_server::run(Args::parse().port).await 40 - }
-3
crates/ein-tui/Cargo.toml
··· 11 11 name = "ein_tui" 12 12 path = "src/lib.rs" 13 13 14 - [[bin]] 15 - name = "ein-tui" 16 - path = "src/main.rs" 17 14 18 15 [dependencies] 19 16 anyhow = { workspace = true }
-10
crates/ein-tui/src/main.rs
··· 1 - // SPDX-License-Identifier: Apache-2.0 2 - // Copyright 2026 Mason Stallmo 3 - 4 - use clap::Parser; 5 - use ein_tui::Args; 6 - 7 - #[tokio::main] 8 - async fn main() -> anyhow::Result<()> { 9 - ein_tui::run(Args::parse()).await 10 - }