Effect v4 native AI coding agent. The public npm CLI package is ti-agent, and it installs the ti binary.
- Core:
coreships the agent contract, domain models, plugin contracts, and the bundledti-core-toolsdefault tool plugin. - LLM:
llmexposes a provider-neutralLanguageModelservice, stream events, token estimation helpers, and the provider-neutralAgentRuntimeLayer. - Providers:
packages/providers(packageti-code-providers) includes OpenAI streaming, ChatGPT auth/model helpers, and a deferred Anthropic adapter. - Sessions:
packages/sessions(packageti-code-sessions) persists append-only sessions under.ti/sessionsand exposes aSessionManagerservice. - CLI:
ti-agentopens the interactive composer by default and provideslogin,logout,auth,models,chat,resume, andtoolcommands via thetibinary. - Plugins/Skills: first-class but minimal; static
PluginHostandSkillHostcontracts cover bundled tools, markdown skills, and a small Codex-styleSKILL.mdcompatibility path while optional domains such as diagrams stay outside the default core binary.
The active implementation tracker lives in docs/planning/open-epics-tracker.md.
pnpm install
pnpm build
pnpm test
pnpm lintIf just is installed, the root Justfile is the local command index:
just
just check
just dev
just dupesThe published CLI package is ti-agent; it installs the ti binary.
That npm path is useful for development and package-manager installs, but it
still requires a JavaScript runtime on the target machine.
The public npm package set is ti-agent, ti-code-core, ti-code-llm,
ti-code-providers, and ti-code-sessions. The repo-local
@effect/platform-quickjs and @effect/platform-llrt packages stay private
until/unless they are coordinated with the Effect project.
One-command install:
curl -fsSL https://raw.githubusercontent.com/agustif/ti/main/install.sh | shnpm install -g ti-agent
ti --version
ti authFor one-off runs without a global install:
pnpm dlx ti-agent auth
npx ti-agent auth
bunx ti-agent authPin a version when using the install script:
curl -fsSL https://raw.githubusercontent.com/agustif/ti/main/install.sh | TI_VERSION=0.1.8 shLocal development can run the same binary after building:
pnpm build
node apps/cli/dist/index.js authGitHub releases publish standalone binaries for users who should not need Node, Bun, Deno, or pnpm installed. Download the release asset that matches the target platform, make it executable, and run it directly:
curl -L -o ti https://github.com/agustif/ti/releases/latest/download/ti-quickjs-host-darwin-arm64
chmod +x ti
./ti probe
./ti login chatgpt
./ti chat --provider chatgpt hiThe release workflow builds these required platforms on tag pushes:
| Platform | Status |
|---|---|
darwin-arm64 |
Required |
darwin-x64 |
Required |
linux-arm64 |
Required |
linux-x64 |
Required |
windows-x64 |
Experimental until the native QuickJS host/linker path is ported |
Current darwin-arm64 local release artifact sizes:
| Runtime asset | Self-contained | Size | Current status |
|---|---|---|---|
ti-quickjs-host-darwin-arm64 |
Yes | 1.5 MB | Recommended smallest runtime. probe, models, chat --provider chatgpt, binary golden tests, and interactive smoke pass. Uses the custom QuickJS host with native libcurl-backed streaming HTTP. |
ti-quickjs-ng-darwin-arm64 |
Yes, with system curl for network POST fallback |
1.6 MB | probe, models, chat --provider chatgpt, binary golden tests, and interactive smoke pass. ChatGPT POST/SSE is buffered through a curl subprocess because stock QuickJS-ng only exposes std.urlGet for GET. |
ti-llrt-darwin-arm64 |
Yes | 10.2 MB | Fast and small compared with Node/Bun/Deno. probe and noninteractive golden tests pass. Default interactive mode is intentionally blocked because LLRT does not provide the needed interactive terminal surface. chat --provider chatgpt currently fails because LLRT's fetch response does not expose a readable body.getReader() stream. |
ti-bun-darwin-arm64 |
Yes | 60.7 MB | chat --provider chatgpt and binary/interactive smoke tests pass. Uses the Bun runtime and @effect/platform-bun, so it is much larger than QuickJS/LLRT. |
ti-bun-bytecode-darwin-arm64 |
Yes | 66.5 MB | Same functional surface as Bun, with Bun bytecode packaging. Larger than regular Bun in the current build. |
ti-node-sea-darwin-arm64 |
Yes | 127.0 MB | chat --provider chatgpt and binary/interactive smoke tests pass. This is the true self-contained Node comparison and includes the Node runtime cost. |
ti-deno-darwin-arm64 |
Yes | 130.2 MB | chat --provider chatgpt and binary/interactive smoke tests pass. Currently consumes the Node-compatible portable final bundle because there is no repo-owned @effect/platform-deno package yet. |
ti-node-js.mjs |
No | 294 kB | JavaScript bundle baseline only. Requires an installed Node runtime and is not a standalone binary. |
Release assets also include MANIFEST.json, SIZES.tsv, and
SHA256SUMS.txt so size and checksum comparisons do not depend on README
tables staying fresh.
In the table above, "binary golden tests" means the runtime can execute the same portable CLI scenarios and produce the same normalized output. "Interactive smoke" means the runtime can start the default interactive entrypoint and render the initial terminal surface; it is not claiming full long-running interactive parity for every terminal edge case yet.
- The shared agent loop is live for CLI/TUI chat, direct tool calls, Code Mode tool calls, and queued steering while a run is active. Provider-managed continuation state, approval interruptions, cancellation, and compaction are still evolving.
- LLRT does not yet have full CLI parity: no interactive terminal support, and ChatGPT streaming needs a readable fetch body adapter or a small host bridge.
- Stock QuickJS-ng works for ChatGPT now, but its POST/SSE path depends on a
curlsubprocess and buffers the response. The custom QuickJS host is the smaller fully integrated streaming path. - Windows runtime artifacts are built as an experimental matrix lane while the native QuickJS host C/linker path is made portable.
- The npm package install remains the Node-runtime distribution path; the no-Node/no-Bun story is the GitHub release binaries.
pi-effect/
├── packages/
│ ├── core/ # package: ti-code-core; domain models, agent contract, bundled tool plugin
│ ├── llm/ # package: ti-code-llm; LanguageModel service, stream events, agent runtime
│ ├── providers/ # package: ti-code-providers; OpenAI, ChatGPT auth/model helpers, Anthropic adapter
│ └── sessions/ # package: ti-code-sessions; append-only session storage and session manager
├── apps/
│ └── cli/ # Terminal CLI and interactive entry point
└── docs/ # ADRs, RFCs, guides, planning, and historical reviews
Agentservice withrun,runStream, and active-runsteerTools.Registryservice- Bundled default
ti-core-toolsplugin:read,write,edit,apply_patch,bash,py,code, andpreload_cli_tool - Shared message, tool, session, and error types
LanguageModelservicegenerateStream,generate, andestimateTokensStreamEventmodel and helpers for collecting content / usage- Default test layer for deterministic unit tests
- OpenAI Chat Completions SSE provider
- ChatGPT auth storage and model discovery helpers
- Deferred Anthropic adapter for the first vertical slice
- Append-only JSONL session persistence
- Session metadata derived from messages
SessionManagerlayer for create / append / get / list
Main commands:
ti
ti login chatgpt
ti logout chatgpt
ti auth
ti models chatgpt
ti chat [--provider <openai|chatgpt>] [--session <id>] [--model <model>] <prompt>
ti resume --last
ti tool <read|write|edit|apply_patch|bash|py|code> '<json-args>'# Show the repo-local command index
just
# Build all packages
pnpm build
just build
# Run all tests
pnpm test
just test
# Lint the workspace
pnpm lint
just lint
# Detect copy/paste drift in source, tests, and repo scripts
pnpm dupes
pnpm dupes:report
just dupes
just dupes-report
# Run the local pre-release gate
just release-check
# Auto-fix lintable issues and verify the workspace
pnpm format
pnpm format:check
just format
just format-checkThe Justfile is intentionally a thin wrapper over pnpm/turbo scripts, so it is a
discoverable local command index rather than a second build system. Its
duplication recipes use the same tuned clone detector as pnpm dupes; the
threshold is a growth-phase guardrail, not a claim that every current clone
should be collapsed immediately. just release-check runs lint, typecheck,
tests, build, the runtime-final bundle build, and npm package dry-runs before
tagging or publishing.
- Runtime: Effect v4 beta (
effect@4.0.0-beta.70) - Language: TypeScript 5.9+ in strict mode
- Package manager: pnpm 11.2.2+
- Build system: Turborepo
- Testing: Vitest with
@effect/vitest - Linting: Rslint plus repo guard scripts for Effect-native boundaries and type assertions
- AGENTS.md - agent operating context and repo rules
- Effect reference docs: https://effect.website/docs and https://effect.website/docs/additional-resources/api-reference/
- docs/planning/open-epics-tracker.md - current work tracker
- docs/planning/effect-v4-vertical-slice.md - shipped vertical slice summary
- docs/architecture/plugin-boundary.md - current small-core vs optional plugin/skill boundary
- docs/research/plugin-system-incumbent-report.md - plugin, skill, tool, and hook report and plan
- docs/guides/development.md - development workflow and conventions
- docs/guides/npm-publishing.md - npm namespace and publish process
- docs/guides/user-guide.md - usage guide
- The
Agentruntime is shared by the CLI interactive path and the runtime probe. It replays local session messages today; OpenAIprevious_response_idcontinuation and compaction remain planned provider-state work. docs/reports/anddocs/review/contain historical snapshots retained for reference.- Optional domains such as Mermaid/SVG/terminal-image rendering stay outside default core; if they return, they should live in a small plugin/skill area rather than the main binary.
- Agent budgets are policy-driven rather than globally hard-capped; any tighter stop condition belongs to an orchestrator or subagent policy.
packages/core,packages/llm,packages/providers, andpackages/sessionsare the current source folders; the package names remainti-code-*.- There is no
webapp in the current workspace.