@selesai/code
Maintained, extension-first Pi coding agent with built-in workflows, subagents, web research, questions, skills, and an enhanced terminal UI.
Package details
Install @selesai/code from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@selesai/code- Package
@selesai/code- Version
0.15.1- Published
- Oct 17, 2026
- Downloads
- 13.3K/mo · 1,702/wk
- Author
- selesai
- License
- unknown
- Types
- package
- Size
- 37.1 MB
- Dependencies
- 35 dependencies · 0 peers
Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Your AI coding team. Built to finish. Yours to shape.
Documentation · Get started · Get model access on token.in · Report an issue
Your coding agent should do more than write code. It should remember how you work, bring in help when you ask, find answers instead of guessing, and keep going without making you repeat the whole story.
Selesai brings that together in one install. An AI coding agent for your terminal, with built-in memory, a team of specialist agents, agent-to-agent messaging, live web research, public code search, recovery tools, and 30+ ready-to-use skills.
And you can make it yours just by asking. Change how it looks, how it works, which models do which jobs, or teach it a workflow your team uses every day. Selesai can help configure and extend the harness itself, not just edit your project.
Not a bare agent and a weekend of extension setup. A workspace built to help you finish.
| Less of this | More of this |
|---|---|
| Adapting your workflow to a rigid tool | A harness you can ask to customize around you. |
| Explaining your preferences in every new chat | An agent that remembers your corrections and project conventions. |
| Waiting for one agent to do everything | Specialists working on independent tasks in parallel. |
| Paying premium-model rates for every small task | The option to delegate focused work to lower-cost models. |
| Copy-pasting messages between project windows | Agents that can ask each other directly through Intercom. |
| Coding from outdated assumptions | Current web sources and real implementations from public GitHub code. |
| Starting over when a conversation gets unwieldy | A fresh session with a handoff of the important context. |
Use your preferred model provider, a local model, or an OpenAI-compatible endpoint. Connect token.in for model access and Sai-powered helpers, including relevance-based memory recall and code discovery. Some helpers require TokenIn even if your main coding model comes from another provider. See what needs TokenIn →
Built on the extensible Pi coding agent. The extensions below ship with Selesai—not as a shopping list of plugins you have to assemble yourself.
Quick install
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 →
Not just more extensions. Fewer things you have to do yourself.
Your harness. Your rules. Just ask.
You don't have to learn an extension API to ask for a better tool.
Want a quieter terminal? A reviewer that follows your team's checklist? A shortcut for your release routine? Tell Selesai what you want. It can consult its shipped documentation and examples, update configuration, or help build the skill, agent, theme, or extension that makes it happen.
Make my terminal cleaner. Keep Git status and cost visible, hide the noise.
Create a reviewer agent that checks our payment code against this checklist.
Use a cheaper model for scouting, but keep my main model for difficult decisions.
Turn our release checklist into a reusable skill for this project.
Add a command that runs our checks and summarizes what failed.
Make a change for one project, or keep it across your work. Choose your models, shape your specialist team, connect your own tools, and keep the parts of the bundled workspace you find useful.
Start with a complete workspace. Keep shaping it into your workspace. Custom extensions are real local code: review and test them before relying on them, and reload when a change requires it.
Customization guide → · Configuration →
The more you use it, the less you have to explain
Stop teaching your agent the same lesson twice.
Selesai's persistent memory saves preferences, corrections, project facts, and reusable lessons across sessions. Tell it how you like tests written. Correct an assumption about your architecture. That knowledge can be there the next time you work—not buried in a chat you have to find yourself.
Past conversations are searchable too. Ask “What did we decide about authentication?” instead of reconstructing the decision from scratch.
Remember: this project uses pnpm, and every bug fix needs a regression test.
What did we decide about the database migration last time?
This is how Selesai gets smarter about you and your projects: saved knowledge and recall, not retraining the underlying model. You can inspect and manage what it remembers with /memory-insights.
One agent is useful. A team can move faster—and cost less.
Don't make one expensive model do every job.
With subagents, you can ask Selesai to split the work: one agent maps the code, another researches the approach, and reviewers check independent concerns in parallel. Keep background work moving while you continue with the main agent.
You can choose different models for different jobs. Keep a stronger model on architecture or difficult reasoning, and assign focused work to a lower-cost model, such as an available DeepSeek model. Match the model to the job, not every job to the most expensive model.
Delegate a scan of the authentication code to a scout.
Run parallel reviewers for correctness, missing tests, and unnecessary complexity.
Use a lower-cost DeepSeek model for the focused research task,
then bring the findings back here for review.
You stay in control: delegation happens when you authorize it, and you can inspect progress, steer agents, or stop a run. Independent work can finish sooner; savings depend on model prices, task size, and coordination overhead. More agents alone does not guarantee a lower bill.
Let your agents talk. Stop being the middleman.
Working on a frontend in one directory and an API in another? You shouldn't have to carry every question and answer between them.
Intercom lets running Selesai sessions on the same machine discover and message each other. Just ask your agent to talk to the agent working in the other directory.
Use Intercom to find the agent working in /projects/backend.
Ask it what the checkout endpoint expects before we build the form.
The agents can exchange questions, replies, and context while you focus on the result. Open /intercom to see connected sessions, or give a session a memorable name with /alias backend.
Intercom connects existing local sessions; it doesn't start a new agent or reach agents on another machine.
Answers from today's sources. Examples from real code.
Less guessing. Less tab-hopping.
- Built-in web research finds current documentation, compares sources, and brings the findings back into the task. It can use a browser when a page needs rendering.
- Public code search with grep.app finds how people actually use a library across public GitHub repositories, then reads the relevant source. Move from “this API probably works like this” to a concrete implementation you can inspect.
- Interactive questions bring important choices to you in a clear form, instead of letting the agent silently invent requirements.
Check the current migration guide before upgrading this dependency.
Find real GitHub examples of how this library handles retries.
Ask me about the trade-offs before choosing the database.
Web research supports keyless search; some backends need credentials, and browser-rendered pages need a supported browser. Public code search covers public repositories, not private code. Sources still need judgment—not blind copying.
Web research → · Public code search →
Find the right code before changing the wrong thing
Big repository? Graft gives the agent a map of your code: where behavior lives, what calls it, and what else a change might affect. Less wandering through files. More attention on the code that matters.
Sai adds focused second opinions and plain-language code discovery: help classify a failure or find “where retry backoff is configured,” without loading every candidate file into the main conversation.
Find where checkout totals are calculated and what depends on them.
Before changing this shared function, check which callers could be affected.
Graft builds its repository map on first use and refreshes it after edits. Its deeper analysis uses your active model; a structural-only build can stay offline. Sai needs Token-In access. Both help the agent investigate; neither replaces reading the source and running checks.
Spend less on repeating context. More on solving the problem.
A better-informed agent shouldn't need your entire history to make its next move.
Memory brings back useful decisions instead of making you explain them again. Graft helps locate relevant code instead of reading the whole repository. Compact command output and on-demand skills leave more room for the actual task. Smaller models can handle focused helper work while your main model concentrates on harder decisions.
The benefit isn't just fewer tokens. It's better awareness: your conventions, past decisions, relevant code, and the consequences of a change. That gives the agent a better basis for its next action, not just a shorter prompt.
Less unnecessary context can stretch a token-metered plan further and reduce usage-based spend. It doesn't automatically extend a subscription limited by requests or time.
The economics we're aiming for: under US$1/month for lightweight Sai helper calls at light usage, and up to 50% lower token spend in context-heavy workflows. These are illustrative budget and savings targets, not measured averages, benchmarks, or guarantees. The helper budget excludes your main coding model, subagents, image generation, and deep graph builds. Actual costs depend on model prices, repository size, helper frequency, caching, and how much repeated context is avoided; helper calls and indexing add their own cost.
Connect TokenIn and see what's included →
A wrong turn shouldn't mean starting over
Keep your momentum—even when the plan changes.
- Undo rolls back tracked file edits from the last turn. Mutating shell commands are flagged, not automatically reversed.
- Session branches let you return to an earlier conversation and explore another approach. Branching the conversation alone does not roll back files.
- Handoff carries a summary into a fresh session, so a long conversation doesn't have to become permanent baggage. Use
/handoff-newto continue with the important context. - Context reminders warn when the conversation is getting large, before you keep adding more history to every request.
Your original session remains available. Try another approach without throwing away the whole conversation.
Explore recovery and continuity →
Less noise on screen. More visibility into the work.
See what changed, what's running, and what you're spending.
Selesai's fullscreen terminal workspace keeps your editor and status visible while the conversation scrolls. Zentui lets you shape the workspace; Tool Display keeps tool output compact and file changes readable.
Live model and subagent throughput, token usage, context usage, Git state, and session costs help you see what's happening instead of guessing. Cost reconciliation uses provider-reported billed amounts where available; otherwise costs remain estimates.
Prefer traditional scrolling terminal output? Switch with --tui-mode regular or in /settings.
Explore the terminal workspace →
The small things that save you work, every day
The rest of the bundled stack has a job too:
| Feature | What it saves you |
|---|---|
| Ponytail | Pushes for the simplest working solution before adding more code or dependencies. |
| Browser automation | Lets the agent navigate pages, fill forms, capture screenshots, and help test real flows. The bundled setup helper asks before installing the external browser CLI and runtime. |
| Inline skills | Type $ to pick a ready-made workflow instead of rewriting a long instruction prompt. |
| Skills index | Finds relevant skills and loads their instructions when needed, rather than putting the full catalog into every prompt. |
| RTK output compression | Reduces noisy output from compatible shell commands so it takes up less model context. A verified binary is provisioned when needed. |
| Automatic session names | Makes past work easier to recognize when you come back. |
| Copy turn | Copies a reply or prompt with /cp—no selecting pages of terminal text. |
| Herdr integration | Shows which pane is working, waiting on you, or idle when you run Selesai in Herdr. |
| Codemode and tool discovery | Lets the agent combine related tool calls and find the tools it needs without a permanently huge tool list. |
| MCP connections | Brings tools from your MCP servers into the same workspace. |
| Local model management | Browse, load, and unload models from a running llama.cpp-compatible server with /llama. |
| Token.in onboarding | Connects model access with a guided first run, account switching, usage checks, and failover between saved accounts. |
These are maintained together in src/extensions/ and shipped with the application. Bundled means no separate Selesai extension install; external services, model access, and some runtimes still have their own requirements.
Stop writing the perfect prompt. Start with the right skill.
“Make it look better.” “Review this properly.” “Don't stop halfway.” You shouldn't have to explain what good means from scratch every time.
Selesai includes 32 built-in skills: reusable playbooks for better design, sharper decisions, simpler code, and work that actually gets checked. Choose the outcome you need, then add your brief.
$taste Build a landing page for this product that doesn't look like an AI template.
$design-references Find a design direction inspired by Linear, adapted to our brand.
$grill-me Challenge this feature idea before we spend a week building it.
$plan-todo Turn what we've agreed into a plan someone else can execute.
$unlazy Implement this plan and verify every agreed outcome before calling it done.
Type $ to find a skill and insert $skill-name into your prompt. You can combine skills, such as $redesign $web-design-guidelines, or ask Selesai to create a new one for your workflow.
🎨 Make it look designed, not generated
A working interface isn't the same as a product people want to use. These skills give the agent a design direction, concrete standards, and a way to check its own work.
| Skill | Use it when… |
|---|---|
taste |
You need a landing page, portfolio, or redesign with a point of view. Reads your audience and brief, chooses a fitting design direction, and pushes past repetitive AI layouts. |
taste-v1 |
You want the original Taste playbook for an existing workflow. Keeps its earlier design rules available instead of forcing you onto the rewritten version. |
soft |
You want a polished, agency-style website. Guides the details that make it feel considered: typography, spacing, depth, responsive layouts, and motion. |
minimalist |
You want calm rather than clutter. Builds an editorial look with warm neutrals, generous space, clear typography, and restrained effects. |
brutalist |
You want something bold and mechanical, not another soft SaaS template. Uses strong grids, oversized type, and industrial or terminal-inspired styling. |
gpt-taste |
Your marketing site needs more expressive motion. Focuses on cinematic sections, scroll-driven animation, strong page structure, and layouts that don't repeat the same pattern. |
redesign |
Your app works, but looks unfinished. Audits what's there, then improves typography, spacing, components, and missing states without replacing your existing stack. |
design-references |
You know the feel you want, but not how to describe it. Finds documented design references from real sites and translates relevant principles into a direction for your product, without copying their identity. |
stitch |
You use Google Stitch and want new screens to feel like the same product. Creates a DESIGN.md with clear rules for colors, typography, layout, components, and motion. |
web-design-guidelines |
You want a UI review, not just a visual opinion. Checks interface code against current Web Interface Guidelines and points to concrete usability and accessibility issues. |
🖼️ Give the product a visual identity before coding it
| Skill | Use it when… |
|---|---|
brandkit |
You need a coherent brand direction, not a random logo. Creates image-based identity boards connecting logo concepts, color, typography, imagery, and brand applications. |
image-to-code |
You want a visual target before implementation. Generates clear design references, studies their details, then builds the frontend from that direction rather than improvising in code. |
Image generation needs an authenticated image model; generated assets may need refinement before production. Google Stitch access and web-based reference lookups have their own service requirements.
📋 Turn “we should build this” into a plan you can hand off
| Skill | Use it when… |
|---|---|
to-prd |
The decisions are scattered through a conversation. Turns the agreed context into a saved product requirements document: the problem, user stories, decisions, tests, and what's out of scope. |
plan-todo |
You need an executable plan, not a vague list. Writes a shared plan and task checklist with clear ownership, dependencies, acceptance criteria, and checks. Planning doesn't start implementation. |
plan-todo-implementer |
You have that plan and want coordinated execution. Assigns bounded tasks to writers, follows dependencies, and keeps review and final acceptance with the parent agent. Requires your delegation approval and chosen writer model and reasoning level. |
pi-subagents |
You want help delegated well. Guides focused assignments, parallel work, model selection, isolation, and useful handoffs so a team doesn't become a pile of overlapping agents. |
Need to challenge a big decision? The subagent extension also ships the council-mode playbook, available through /council. Advisors develop independent recommendations, challenge important disagreements, and return a decision memo. Get more than one perspective without an endless agent debate. This is an additional packaged workflow, separate from the 32 skills above.
🧹 Get the result without inheriting unnecessary complexity
| Skill | Use it when… |
|---|---|
ponytail |
You want the simplest solution that works. Pushes the agent to reuse existing code, the standard library, and native features before inventing abstractions or adding dependencies. |
ponytail-review |
You want to catch bloat in a change before merging. Reports what can be deleted, replaced, or shortened in the diff. Complements a correctness review; doesn't apply fixes. |
ponytail-audit |
The whole repository feels heavier than it should. Produces a ranked list of code and dependencies you could simplify or remove, without changing files. |
ponytail-debt |
You don't want “we'll fix it later” to disappear. Collects marked shortcuts into a ledger showing their limits and when they need revisiting. |
ponytail-gain |
You want to understand Ponytail's measured impact. Shows its published benchmark scoreboard, not invented savings for your current project. |
ponytail-help |
You want the quick reference. Explains the modes and which Ponytail command to reach for, without digging through documentation. |
🛠️ Make the next change easier, not just this one
| Skill | Use it when… |
|---|---|
improve-codebase |
Working on the codebase means jumping through too many layers. Finds architectural friction and compares clearer module boundaries so you can choose a refactor that removes complexity. |
code-review-and-quality |
You need a serious pre-merge review. Checks correctness, readability, architecture, security, and performance, and separates blocking findings from optional polish. |
code-simplification |
The code works, but the next person will struggle to understand it. Refactors for clarity in small, checked steps while preserving behavior, rather than chasing fewer lines at any cost. |
✅ Replace “done” with evidence
| Skill | Use it when… |
|---|---|
unlazy |
A substantial task keeps coming back half-finished. Defines checkable outcomes before work, tracks them through implementation, and requires verification or an explicit blocker before reporting completion. |
📤 Keep the progress. Leave the oversized conversation behind.
| Skill | Use it when… |
|---|---|
handoff |
Another agent needs to pick up the work. Saves a focused continuation document in your OS's temporary directory, with pointers to existing plans and suggested skills. |
handoff-text |
You want a continuation brief to copy elsewhere. Produces the handoff in chat instead of saving a file or starting another agent. |
selesai-handoff |
You want a fresh agent to continue now. Prepares the handoff and launches a named background Selesai session in the current project. |
🎤 Find the expensive assumptions before you build them
| Skill | Use it when… |
|---|---|
grill-me |
You want your idea stress-tested one decision at a time. Asks focused questions, recommends answers, and explores the code instead of asking you for facts it can look up. |
batch-grill-me |
You want the same depth with fewer back-and-forth rounds. Groups independent decisions into one question wizard, then asks the next round once their prerequisites are settled. |
🤖 Test what people actually click
| Skill | Use it when… |
|---|---|
agent-browser |
You need the agent to use the interface: navigate, fill forms, take screenshots, extract data, or hunt for bugs. Also points to workflows for supported Electron apps, Slack, and exploratory QA. Requires the external agent-browser CLI and browser runtime; Selesai offers setup. |
Every playbook is readable and editable. Use the bundled starting point, adapt it, or ask Selesai to create one around your team's way of working.
code-review-and-quality and code-simplification are adapted from addyosmani/agent-skills (MIT). Shared references and the upstream license ship in src/skills/references/.
Keep your model. Unlock more with TokenIn.
Your main model does the work. Lightweight helpers give it better context.
You can use Selesai with other model providers. Adding a token.in account unlocks the bundled TokenIn-powered Sai helpers without requiring you to switch your main coding model. Or use TokenIn for model access too.
Here's the difference, before you install:
| Capability | Without TokenIn | With TokenIn |
|---|---|---|
| Coding, skills, subagents, Intercom, and customization | Work with your configured models and required tools. | Also available; TokenIn can supply model access. |
| Persistent memory and conversation search | Local storage and search still work; your main agent can use them. | Adds Sai's relevance decision for a bounded memory lookup before eligible requests. |
| Graft's code map | Structural mode works offline; deeper analysis works with supported providers. | Can use a compatible TokenIn model for deeper analysis. Graphs are not TokenIn-exclusive. |
Sai second opinions and plain-language code discovery (ask_sai, sai_find) |
Bundled Sai helpers need a TokenIn credential; these calls cannot run without it. | Available through TokenIn's decisions models. |
| Sai-ranked tool discovery | Falls back to local keyword ranking. | Adds relevance judgments to help find appropriate tools. |
| Sai workflow recommendations and subagent routing | TokenIn-backed routes are unavailable. | Available when explicitly enabled; both are opt-in. |
| Web research and public code search | Keyless web search and public code search remain available, subject to network access and service limits. | Web research can also use TokenIn search. |
The idea: a small helper budget can save expensive main-model work. The sub-dollar helper budget and up-to-50% savings target above are estimates to validate against your workload, not a flat-rate bundle or a promise about your bill. Deep graph analysis uses the selected model and is billed separately from lightweight Sai calls.
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 |
Check account credit, spend, and expiry or reset information. |
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.
Built on Pi. Still yours to customize.
You get the bundled workspace without giving up Pi's extensibility or model choice:
- terminal tools for reading, searching, editing, writing, and running commands;
- multiple model providers, API keys, OAuth, thinking levels, image input, retries, and custom endpoints;
- persistent sessions with resume, fork, tree navigation, compaction, import, and export;
- interactive, print, JSON event-stream, and RPC modes;
- TypeScript extensions, skills, prompt templates, themes, packages, and an embeddable Node.js SDK;
- project trust and configurable resource loading.
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.
Everyday commands
| 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.
Documentation
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/.
Repository map
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/ built-in skill playbooks
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
Development
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/.
Documentation development
cd doc-web
npm install
npm run dev
Run npm run verify inside doc-web/ before publishing documentation changes.
Contributing
Issues and pull requests are welcome.
- Search existing issues before opening a new one.
- Keep changes focused and explain the user-visible behavior.
- Add or update regression coverage for executable changes.
- Run
npm run buildand the relevant tests locally. - Keep Selesai config paths (
~/.selesai/agent/and.selesai/) aligned across code, tests, and documentation. - Update the bilingual documentation when a public capability or setting changes.
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.
Acknowledgements
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.