Terminal-first AI coding agent built on Pi, with subagents, adaptive workflows, web research, recovery tools, and 32 built-in skills.
See the code
The AI coding agent built to finish.
Documentation · Get started · Get model access on token.in · Report an issue
Selesai is a terminal-first AI coding agent that takes software tasks from prompt to verified result. It is a maintained, extension-first fork of the Pi coding agent, with subagents, adaptive workflows, live research, recovery tools, a richer TUI, and 32 built-in skills shipped together in one install.
Use your preferred model provider, connect a local or OpenAI-compatible endpoint, or get a ready-to-use token from token.in. Selesai keeps Pi's small, hackable core while reducing the setup and extension work needed before an agent can be productive.
| Ready out of the box | One package bundles coordinated extensions, tools, themes, and 32 skills across 9 meaningful categories. |
| Delegates and parallelizes | Focused subagents can research, review, build, or run independent workstreams with foreground, background, parallel, and chained execution. |
| Adapts to the task | The workflow chooses the smallest useful path—from a direct edit to reconnaissance, implementation, review, fixes, and validation. |
| Researches with current sources | Built-in web research, public GitHub code search, and interactive questions help the agent resolve uncertainty before it acts. |
| Recovers without losing momentum | Rewind, undo, handoff, session trees, checkpoints, context reminders, and cross-session coordination keep long tasks manageable. |
| Makes token usage visible | Live throughput, usage, cost reconciliation, compact output, and handoff tooling help use model context deliberately. |
Install the latest published package:
npm install -g @selesai/code
selesai
Run once without a global install:
npx @selesai/code
Or install the latest main branch directly from GitHub:
npm install -g github:SelesaiInTech/selesai-code
Start with a task:
selesai "Explain this repository and tell me how to run its checks"
Run a non-interactive request:
selesai -p "Review the current git diff without editing files"
Selesai stores user state in ~/.selesai/agent/ and project-local settings and resources in ./.selesai/.
📖 Read the full getting-started guide →
Selesai works with multiple model providers and custom endpoints. If you want model access without setting up a separate provider account first, create a token on token.in, the Selesai model-access platform.
On the first interactive launch, Selesai can open the token.in dashboard and guide you through connecting the token. You can manage more than one account later from the TUI:
| Command | What it does |
|---|---|
/tokenin add | Add a token.in account. The first account becomes active automatically. |
/tokenin switch | Switch the active account. |
/tokenin remove | Remove a saved, non-active account. |
/tokenin usage | Show spend, budget, remaining quota, and reset time. |
Saved accounts support automatic failover for authentication, rate-limit, and quota failures. Credentials stay in Selesai's local auth storage; never commit auth.json, tokenin-auth.json, or a token to source control.
Skills ship inside @selesai/code and are discovered when Selesai starts. Invoke a skill inline with $skill-name, or use the matching /skill:name command in the TUI.
design-taste-frontend / design-taste-frontend-v1 — anti-slop frontend design; v2 is the default and v1 remains available for legacy workflows.high-end-visual-design — agency-grade visual design standards.minimalist-ui / industrial-brutalist-ui — focused aesthetic systems for two distinct interface directions.gpt-taste — UX/UI and GSAP motion engineering.redesign-existing-projects — upgrade the visual quality of an existing site or app.stitch-design-taste — create design-system documentation for Google Stitch.web-design-guidelines — review UI quality, compliance, and accessibility.brandkit — brand identity boards, logo systems, and visual worlds.image-to-code — generate a design direction and implement it as code.planning-and-task-breakdown — turn a spec into ordered, implementable tasks with acceptance criteria.incremental-implementation — land work in thin, verifiable slices with per-increment checks.pi-subagents — delegation patterns for parallel, asynchronous, and chained work.ponytail — the smallest solution that actually works.ponytail-review — review a diff for unnecessary complexity.ponytail-audit — audit a whole repository for bloat.ponytail-debt — turn ponytail: comments into a debt ledger.ponytail-gain — maintain an impact scoreboard.ponytail-help — ponytail reference card.improve-codebase — inspect and improve architecture, maintainability, and overall codebase quality.code-review-and-quality — five-axis review, severity labels, and change sizing before merge.code-simplification — remove accumulated complexity without changing behavior.unlazy — acceptance gates, depth trees, and finish-the-job enforcement.handoff / handoff-text — compact a long conversation into a continuation document.selesai-handoff — hand work to a fresh background agent.grill-me — stress-test requirements and design decisions through a focused interview.batch-grill-me — ask the same hard questions in parallel rounds.agent-browser — browser and Electron automation, scraping, and QA workflows.planning-and-task-breakdown, incremental-implementation, code-review-and-quality, and code-simplification are adapted from addyosmani/agent-skills (MIT). Their shared reference material ships in src/skills/references/, with the upstream license alongside it.
pi-subagents is adapted to the Selesai runtime and includes focused agent roles such as architect, builder, commentator, explorer, recapper, and researcher. Agent definitions can control models, tools, skills, output formats, budgets, fallbacks, and worktree isolation.
The parent agent stays responsible for decisions while delegated agents contribute bounded work. Delegates can report progress, request clarification from their supervisor, be steered or interrupted, and return structured artifacts or transcripts.
Ask the architect to challenge this plan before we implement it.
Run parallel commentator agents for correctness, tests, and unnecessary complexity.
Have the builder implement this plan, then review the result.
The interactive terminal uses fullscreen TUI mode by default, keeping the editor, status line, and widgets fixed while the conversation scrolls in its own viewport. The bundled workspace also adds:
/zentui;Switch to inline terminal output at any time with --tui-mode regular or the TUI mode entry in /settings.
Selesai carries the extensions that define its experience in src/extensions/, adapts them to the Selesai host, tests them with the application, and ships them with each release. This makes the core stack visible and reviewable in one repository and avoids requiring a long list of unrelated extension installs.
Bundling reduces setup and extension supply-chain exposure; it does not remove dependency or model risk. Review extension and dependency changes as you would for any local coding agent.
Selesai retains Pi's core capabilities:
Selesai is a local agent and runs with the permissions of the user who starts it. Project trust controls loading of project resources; it is not a sandbox. Use a container, VM, or other operating-system isolation for untrusted or unattended work.
| Action | Command |
|---|---|
| Start the interactive TUI | selesai |
| Start with a task | selesai "Implement the requested change and run the relevant tests" |
| Print a response and exit | selesai -p "Summarize this repository" |
| Continue the latest session | selesai -c |
| Browse saved sessions | selesai -r |
| Run without saving a session | selesai --no-session |
| Choose a provider and model | selesai --provider <provider> --model <model> |
| List available models | selesai --list-models |
| Update Selesai | selesai update --self |
Inside the TUI, type / for command completion. Common commands include /model, /settings, /resume, /tree, /fork, /compact, /tokenin, /export, /reload, and /hotkeys.
The documentation is available in both English and Bahasa Indonesia at selesaiintech.github.io/selesai-code.
| Section | What it covers |
|---|---|
| Get started | Install, first run, configuration locations, and credentials. |
| Why Selesai | Evidence-backed comparison with the Pi baseline. |
| Capabilities | Bundled tools, workflows, recovery features, and workspace improvements. |
| Customization | Extension-level settings and behavior. |
| Settings | Global and project configuration. |
| Evidence | Source evidence behind material capability claims. |
| Changelog | Release history and behavior changes. |
| Bahasa Indonesia | Indonesian documentation home. |
The repository also contains the Pi-compatible CLI, provider, model, extension, SDK, setting, session, and security references under docs/.
src/
core/ agent runtime, sessions, tools, packages, and extension loading
modes/ interactive TUI, print, JSON, and RPC modes
extensions/ bundled Selesai extensions and tests
skills/ 32 built-in skills
themes/ terminal themes
defaults/ first-run settings and model catalogue
doc-web/ bilingual documentation website
docs/ Pi-compatible technical references
examples/ extension and SDK examples
test/ cross-cutting tests
Clone the repository and install dependencies:
git clone https://github.com/SelesaiInTech/selesai-code.git
cd selesai-code
npm install
Build and verify the CLI:
npm run build
node dist/cli.js --help
node dist/cli.js --version
npm test
Run from source during development:
npm run dev
Changes to bundled extensions belong in src/extensions/; the build copies them to dist/extensions/ for the published package. Built-in skills live in src/skills/ and are copied to dist/skills/.
cd doc-web
npm install
npm run dev
Run npm run verify inside doc-web/ before publishing documentation changes.
Issues and pull requests are welcome.
npm run build and the relevant tests locally.~/.selesai/agent/ and .selesai/) aligned across code, tests, and documentation.When changing a bundled extension, prefer the existing Selesai runtime and installed dependencies before adding another package. Preserve upstream attribution for adapted code and call out security-sensitive behavior clearly in the pull request.
Selesai is built on the excellent Pi coding agent and includes adapted, in-tree components from the broader Pi and open-source agent ecosystem. Component-level attribution and license notices remain with their respective source files and packages.
Built and maintained by SelesaiInTech.
TypeScript
94.8%
JavaScript
2.7%
MDX
1.9%
Terminal-first AI coding agent built on Pi, with subagents, adaptive workflows, web research, recovery tools, and 32 built-in skills.
See the code
The AI coding agent built to finish.
Documentation · Get started · Get model access on token.in · Report an issue
Selesai is a terminal-first AI coding agent that takes software tasks from prompt to verified result. It is a maintained, extension-first fork of the Pi coding agent, with subagents, adaptive workflows, live research, recovery tools, a richer TUI, and 32 built-in skills shipped together in one install.
Use your preferred model provider, connect a local or OpenAI-compatible endpoint, or get a ready-to-use token from token.in. Selesai keeps Pi's small, hackable core while reducing the setup and extension work needed before an agent can be productive.
| Ready out of the box | One package bundles coordinated extensions, tools, themes, and 32 skills across 9 meaningful categories. |
| Delegates and parallelizes | Focused subagents can research, review, build, or run independent workstreams with foreground, background, parallel, and chained execution. |
| Adapts to the task | The workflow chooses the smallest useful path—from a direct edit to reconnaissance, implementation, review, fixes, and validation. |
| Researches with current sources | Built-in web research, public GitHub code search, and interactive questions help the agent resolve uncertainty before it acts. |
| Recovers without losing momentum | Rewind, undo, handoff, session trees, checkpoints, context reminders, and cross-session coordination keep long tasks manageable. |
| Makes token usage visible | Live throughput, usage, cost reconciliation, compact output, and handoff tooling help use model context deliberately. |
Install the latest published package:
npm install -g @selesai/code
selesai
Run once without a global install:
npx @selesai/code
Or install the latest main branch directly from GitHub:
npm install -g github:SelesaiInTech/selesai-code
Start with a task:
selesai "Explain this repository and tell me how to run its checks"
Run a non-interactive request:
selesai -p "Review the current git diff without editing files"
Selesai stores user state in ~/.selesai/agent/ and project-local settings and resources in ./.selesai/.
📖 Read the full getting-started guide →
Selesai works with multiple model providers and custom endpoints. If you want model access without setting up a separate provider account first, create a token on token.in, the Selesai model-access platform.
On the first interactive launch, Selesai can open the token.in dashboard and guide you through connecting the token. You can manage more than one account later from the TUI:
| Command | What it does |
|---|---|
/tokenin add | Add a token.in account. The first account becomes active automatically. |
/tokenin switch | Switch the active account. |
/tokenin remove | Remove a saved, non-active account. |
/tokenin usage | Show spend, budget, remaining quota, and reset time. |
Saved accounts support automatic failover for authentication, rate-limit, and quota failures. Credentials stay in Selesai's local auth storage; never commit auth.json, tokenin-auth.json, or a token to source control.
Skills ship inside @selesai/code and are discovered when Selesai starts. Invoke a skill inline with $skill-name, or use the matching /skill:name command in the TUI.
design-taste-frontend / design-taste-frontend-v1 — anti-slop frontend design; v2 is the default and v1 remains available for legacy workflows.high-end-visual-design — agency-grade visual design standards.minimalist-ui / industrial-brutalist-ui — focused aesthetic systems for two distinct interface directions.gpt-taste — UX/UI and GSAP motion engineering.redesign-existing-projects — upgrade the visual quality of an existing site or app.stitch-design-taste — create design-system documentation for Google Stitch.web-design-guidelines — review UI quality, compliance, and accessibility.brandkit — brand identity boards, logo systems, and visual worlds.image-to-code — generate a design direction and implement it as code.planning-and-task-breakdown — turn a spec into ordered, implementable tasks with acceptance criteria.incremental-implementation — land work in thin, verifiable slices with per-increment checks.pi-subagents — delegation patterns for parallel, asynchronous, and chained work.ponytail — the smallest solution that actually works.ponytail-review — review a diff for unnecessary complexity.ponytail-audit — audit a whole repository for bloat.ponytail-debt — turn ponytail: comments into a debt ledger.ponytail-gain — maintain an impact scoreboard.ponytail-help — ponytail reference card.improve-codebase — inspect and improve architecture, maintainability, and overall codebase quality.code-review-and-quality — five-axis review, severity labels, and change sizing before merge.code-simplification — remove accumulated complexity without changing behavior.unlazy — acceptance gates, depth trees, and finish-the-job enforcement.handoff / handoff-text — compact a long conversation into a continuation document.selesai-handoff — hand work to a fresh background agent.grill-me — stress-test requirements and design decisions through a focused interview.batch-grill-me — ask the same hard questions in parallel rounds.agent-browser — browser and Electron automation, scraping, and QA workflows.planning-and-task-breakdown, incremental-implementation, code-review-and-quality, and code-simplification are adapted from addyosmani/agent-skills (MIT). Their shared reference material ships in src/skills/references/, with the upstream license alongside it.
pi-subagents is adapted to the Selesai runtime and includes focused agent roles such as architect, builder, commentator, explorer, recapper, and researcher. Agent definitions can control models, tools, skills, output formats, budgets, fallbacks, and worktree isolation.
The parent agent stays responsible for decisions while delegated agents contribute bounded work. Delegates can report progress, request clarification from their supervisor, be steered or interrupted, and return structured artifacts or transcripts.
Ask the architect to challenge this plan before we implement it.
Run parallel commentator agents for correctness, tests, and unnecessary complexity.
Have the builder implement this plan, then review the result.
The interactive terminal uses fullscreen TUI mode by default, keeping the editor, status line, and widgets fixed while the conversation scrolls in its own viewport. The bundled workspace also adds:
/zentui;Switch to inline terminal output at any time with --tui-mode regular or the TUI mode entry in /settings.
Selesai carries the extensions that define its experience in src/extensions/, adapts them to the Selesai host, tests them with the application, and ships them with each release. This makes the core stack visible and reviewable in one repository and avoids requiring a long list of unrelated extension installs.
Bundling reduces setup and extension supply-chain exposure; it does not remove dependency or model risk. Review extension and dependency changes as you would for any local coding agent.
Selesai retains Pi's core capabilities:
Selesai is a local agent and runs with the permissions of the user who starts it. Project trust controls loading of project resources; it is not a sandbox. Use a container, VM, or other operating-system isolation for untrusted or unattended work.
| Action | Command |
|---|---|
| Start the interactive TUI | selesai |
| Start with a task | selesai "Implement the requested change and run the relevant tests" |
| Print a response and exit | selesai -p "Summarize this repository" |
| Continue the latest session | selesai -c |
| Browse saved sessions | selesai -r |
| Run without saving a session | selesai --no-session |
| Choose a provider and model | selesai --provider <provider> --model <model> |
| List available models | selesai --list-models |
| Update Selesai | selesai update --self |
Inside the TUI, type / for command completion. Common commands include /model, /settings, /resume, /tree, /fork, /compact, /tokenin, /export, /reload, and /hotkeys.
The documentation is available in both English and Bahasa Indonesia at selesaiintech.github.io/selesai-code.
| Section | What it covers |
|---|---|
| Get started | Install, first run, configuration locations, and credentials. |
| Why Selesai | Evidence-backed comparison with the Pi baseline. |
| Capabilities | Bundled tools, workflows, recovery features, and workspace improvements. |
| Customization | Extension-level settings and behavior. |
| Settings | Global and project configuration. |
| Evidence | Source evidence behind material capability claims. |
| Changelog | Release history and behavior changes. |
| Bahasa Indonesia | Indonesian documentation home. |
The repository also contains the Pi-compatible CLI, provider, model, extension, SDK, setting, session, and security references under docs/.
src/
core/ agent runtime, sessions, tools, packages, and extension loading
modes/ interactive TUI, print, JSON, and RPC modes
extensions/ bundled Selesai extensions and tests
skills/ 32 built-in skills
themes/ terminal themes
defaults/ first-run settings and model catalogue
doc-web/ bilingual documentation website
docs/ Pi-compatible technical references
examples/ extension and SDK examples
test/ cross-cutting tests
Clone the repository and install dependencies:
git clone https://github.com/SelesaiInTech/selesai-code.git
cd selesai-code
npm install
Build and verify the CLI:
npm run build
node dist/cli.js --help
node dist/cli.js --version
npm test
Run from source during development:
npm run dev
Changes to bundled extensions belong in src/extensions/; the build copies them to dist/extensions/ for the published package. Built-in skills live in src/skills/ and are copied to dist/skills/.
cd doc-web
npm install
npm run dev
Run npm run verify inside doc-web/ before publishing documentation changes.
Issues and pull requests are welcome.
npm run build and the relevant tests locally.~/.selesai/agent/ and .selesai/) aligned across code, tests, and documentation.When changing a bundled extension, prefer the existing Selesai runtime and installed dependencies before adding another package. Preserve upstream attribution for adapted code and call out security-sensitive behavior clearly in the pull request.
Selesai is built on the excellent Pi coding agent and includes adapted, in-tree components from the broader Pi and open-source agent ecosystem. Component-level attribution and license notices remain with their respective source files and packages.
Built and maintained by SelesaiInTech.
TypeScript
94.8%
JavaScript
2.7%
MDX
1.9%