Overview

a1 is an open-source coding agent for the terminal. It runs the pi coding engine underneath and puts its own interface around it: a fullscreen transcript, paste chips, persistent prompt history, and optional next-step suggestions.

How a1 relates to pi

a1 pins a tested release of pi and uses it for everything the agent does: reading and editing files, running commands, talking to model providers, sessions, extensions, and skills. What a1 adds is the layer you look at all day. If you already use pi, your knowledge carries over; most of the Basics pages describe pi behavior as it appears inside a1.

a1 keeps its own profile in ~/.a1/agent. It never reads or changes your pi profile in ~/.pi/agent.

Where to start

Find what you need

I want to…Read
Pick a model or thinking levelModels & thinking
Return to an earlier conversationSessions
Add MCP servers or other toolsExtensions & packages
Paste a screenshot or a long logPaste chips
Reuse a prompt from yesterdayPrompt history
Turn off suggestions or the update checkSettings & files

Installation

a1 installs from npm with a small installer that sets up the a1 command and checks that your shell finds it.

Requirements

  • Node.js 22.19 or newer, below 25, with npm.
  • A terminal. a1 is tested on Windows, macOS, and Linux.
  • An account or API key for a model provider. Usage is billed by that provider.

Install

$ npm x -y -- @timurproko/a1-install

The installer installs @timurproko/a1 globally, activates it, and verifies that a1 on your PATH points at the new install. When everything checks out it prints a1 successfully installed. Running it again when a1 is already installed performs an update instead.

Development previews

Preview builds come from the develop channel. They get new features first and can differ from the stable release.

$ npm x -y -- @timurproko/a1-install --develop

Add a preview number or exact version to pin one, for example --develop 0.2.4-dev.663.

If installation fails

MessageWhat to do
another command takes precedenceA different a1 comes first on your PATH. Remove it or reorder PATH.
not active in this shellOpen a new terminal so it picks up the updated PATH.
permission was deniedYour npm global prefix is not writable. Fix the prefix permissions or use a Node version manager.
Node.js 22.19.0 or newer is requiredUpgrade Node.js to a supported version.

Add --verbose to the installer command to print more detail about a failure.

Quickstart

From a fresh install to a reviewed change in a few minutes.

1. Open a project

$ cd your-project
$ a1

The first launch creates the profile in ~/.a1/agent. Nothing is copied from pi. In a new project, pi asks whether to trust it; you can change that decision later with /trust.

2. Connect a model

Run /login to authenticate with a provider, then /models to choose a model. Provider credentials from environment variables also work.

3. Send a small task

Describe what you want and press Enter. Reference files with @ to search and add them to the prompt. Start with something you can verify quickly, such as explaining a module or adding a test.

Explain how @src/auth/session.ts refreshes tokens, then add a test for the expiry path.

4. Review the result

The agent edits files and runs commands with your permissions. Inspect the diff and run your tests before you commit. Press Esc to stop a response that is going the wrong way.

Before you rely on it

Use version control, keep secrets out of prompts, and run untrusted code in a container or sandbox. The interface is not a security boundary.

5. Leave and come back

Quit with /quit, Ctrl+D on an empty editor, or Ctrl+C twice. a1 prints a resume command; run it from the same directory to continue. See Sessions.

Models & thinking

a1 works with the providers pi supports. You choose the model and how much it thinks.

Providers

/login configures provider authentication and /logout removes it. Credentials are stored in ~/.a1/agent/auth.json, separate from pi.

Choosing a model

/models opens the model dialog. It switches the active model and manages the scoped list you cycle through.

KeyIn the models dialog
SpaceAdd or remove the selected model from the cycling scope
TabSwitch between all models and the scoped list
Ctrl+SSave the scope
Ctrl+A / Ctrl+XScope all listed models / clear the scope
Alt+↑ / Alt+↓Reorder

Outside the dialog, Ctrl+P cycles forward through the scoped models. Cycle backward with Alt+P on Windows and WSL, or Shift+Ctrl+P elsewhere.

Thinking level

/thinking opens a selector. Levels range from off through minimal, low, medium, high, xhigh, and max, depending on what the model supports. Ctrl+L cycles levels without opening the selector, and Ctrl+T shows or hides thinking blocks in the transcript.

The current model and thinking level are always visible in the footer.

Sessions

Every conversation is saved as a session you can resume, branch, export, or share.

Resume a session

When you quit, a1 prints the command to come back. Run it from the original project directory.

$ a1 --session <id>

--session also accepts a path to a session .jsonl file. If the sessions live somewhere other than the default, add --session-dir <dir>. Inside a1, /resume opens a picker.

An ID is looked up in the current project first. If it belongs to another project, a1 asks before creating a fork here. A missing session is an error, never a silent empty start.

Session commands

CommandWhat it does
/newStart a fresh session
/resumePick a previous session
/treeBrowse the session tree and jump between branches
/forkStart a new branch from an earlier message
/cloneDuplicate the current session
/nameName the session; the name shows in the footer
/sessionSession info and usage stats
/compactSummarize earlier context to free up the window
/exportExport to HTML (default) or .jsonl
/importImport a session file
/shareShare as a secret GitHub gist

Pressing Esc twice on an empty editor opens the tree or a fork, depending on the Double-escape action setting.

Where sessions live

Sessions are stored under ~/.a1/agent/sessions/. The PI_CODING_AGENT_SESSION_DIR environment variable or --session-dir changes the location.

Slash commands

Type / in the editor to open the command menu above the prompt. It filters as you type and shows a count of matches.

Built-in commands

CommandWhat it does
/settingsOpen settings
/modelsSwitch models and manage the cycling scope
/thinkingChoose a thinking level
/skillsBrowse, search, and apply a skill
/copyCopy the last agent message
/hotkeysFull-screen keyboard shortcut reference
/changelogRead a1 release notes
/login, /logoutManage provider authentication
/trustChange the trust decision for this project
/reloadReload settings, extensions, and resources after editing files
/quitExit a1

Session commands such as /new, /resume, /tree, and /export are listed on the Sessions page. Extensions, prompt templates, and skills add their own commands to the same menu.

Referencing files

Type @ to search the project and add a file to your prompt. Tab completes paths.

Running shell commands

PrefixBehavior
!git statusRun the command and add its output to the conversation
!!npm testRun the command without adding it to the context

Keyboard shortcuts

The defaults below are what a1 ships with. Run /hotkeys to see the effective list, including your own bindings.

Prompt

KeyAction
EnterSend
EscClose autocomplete, or stop the current response
↑ / ↓Move the cursor; at the edges, browse prompt history
TabAccept autocomplete or a suggestion
Ctrl+VPaste text or an image (Alt+V also pastes images on Windows)
Ctrl+Z / Ctrl+YUndo / redo
Ctrl+ASelect all prompt text
Ctrl+Backspace / Ctrl+DeleteDelete the previous / next word
Ctrl+GEdit the prompt in your external editor

Transcript

KeyAction
PageUp / PageDownScroll by a page
Ctrl+HomeJump to the start of the transcript
Ctrl+EndJump to the end and follow new output
Shift+↑ / Shift+↓Jump to the previous / next prompt you sent
Ctrl+OShow or hide tool output
Ctrl+TShow or hide thinking blocks
Ctrl+XCopy the selection, or the last assistant message

Models and flow

KeyAction
Ctrl+PNext model in the scope
Ctrl+LCycle thinking level
Alt+EnterQueue a follow-up while the agent works (Ctrl+Q on Windows)
Alt+↑Restore queued messages to the editor
Ctrl+CCopy the selection; otherwise clear the editor, and press twice to quit
Ctrl+DQuit when the editor is empty

Custom bindings

Override any binding in ~/.a1/agent/keybindings.json, then run /reload.

Extensions & packages

a1 runs pi packages: extensions, skills, prompt templates, and tools. Install them into the a1 profile from npm, git, or a local folder.

Install, list, remove

$ a1 install npm:pi-mcp-adapter
$ a1 list
$ a1 remove npm:pi-mcp-adapter

Sources can be npm:@scope/name, git:github.com/user/repo, an https:// or ssh:// repository URL, or a local path like ./my-extension. a1 uninstall is an alias for a1 remove.

Update packages

$ a1 update --extensions   # all packages
$ a1 update npm:pi-mcp-adapter   # one package

MCP servers

MCP support comes from an extension rather than a built-in service. Install the adapter, launch a1, and run /mcp setup.

Trust

Extensions run code with your permissions. Install only packages and connect only servers you trust.

Profile scope

These commands manage the a1 profile only. Packages installed in pi are not visible to a1, and the other way round. Install the extensions you want in each.

Skills & templates

Skills and prompt templates are reusable instructions you invoke from the command menu.

Skills

a1 loads skills from ~/.a1/agent/skills/, the project's .pi/skills/, and ~/.agents/skills/ or .agents/skills/.

By default, a1 groups them behind a single /skills command that opens a searchable dialog. To jump straight to one, type /skills: followed by its name; typing : on the highlighted /skills row does the same.

Prefer every skill as its own command? Set Skills to expand in /settings → Agent to list each one as /skill:<name>.

Prompt templates

Any Markdown file in ~/.a1/agent/prompts/ or the project's .pi/prompts/ becomes a slash command named after the file.

# ~/.a1/agent/prompts/review.md  →  /review
Review the staged changes for bugs, missing tests, and unclear names.

Run /reload after adding or editing skills and templates.

Settings & files

/settings holds a1's own options first, followed by the pi engine settings that apply inside a1.

a1 settings

SettingSectionWhat it controls
Quit animationGenericShort animation when you quit. On by default.
Update checkGenericDaily check for a newer release. On by default.
Scrollbar modeScrollauto, always, or hidden
Scrollbar styleScrollthin or thick
SpeedScrollnormal, fast, or high
Persistent historyHistorySave prompts across sessions. On by default.
History limitHistory10 to 100 entries, default 100
Prompt suggestionsAgentNext-step suggestions. On by default.
SkillsAgentcollapse into /skills, or expand
Prompt image limitAgent1 to 16 images per prompt, default 8

Useful pi settings in the same screen include auto-compact, image display, Mermaid diagrams, default project trust, double-escape action, and Fullscreen copy on select. a1 always uses its dark theme, so the theme setting is hidden.

Files and locations

PathContents
~/.a1/agent/The a1 profile: settings.json, auth.json, keybindings.json, models.json, sessions, extensions, skills, prompts
.pi/Project-level settings, skills, and prompts
%APPDATA%\a1\settings\a1.jsona1 settings on Windows
~/.config/a1/settings/a1.jsona1 settings on macOS and Linux (respects XDG_CONFIG_HOME)
~/.a1/data/history/Persistent prompt history

After editing any of these by hand, run /reload.

Environment variables

VariableEffect
A1_PROFILE_HOMEUse a different home directory for the .a1/agent profile
A1_CONFIG_DIRMove a1's settings directory
A1_DATA_DIRMove a1's data, including prompt history
A1_SKIP_VERSION_CHECK=1Skip the daily update check

Updates

a1 tells you when a new release is out. It never installs anything on its own.

Update commands

CommandWhat it does
a1 updateInstall the latest release
a1 update --developInstall the latest development preview
a1 update --extensionsUpdate all installed packages
a1 update --modelsRefresh the model catalogs
a1 versionShow the installed and latest versions

Updating does not interrupt other a1 windows; they keep running their current version until restarted. Updating within a channel never downgrades.

Update notice

At most once a day, a1 checks npm for a newer release on its channel at startup and shows a banner with the command to run. Close it with its ✕. Release builds suggest a1 update; preview builds suggest a1 update --develop.

Turn the check off with Update check in /settings → Generic, or set A1_SKIP_VERSION_CHECK=1. It is also skipped in CI and when output is not a terminal.

What's new

After an update, a1 shows the release notes once at startup. Read them again any time with /changelog.

CLI reference

a1 is interactive. Its command line starts sessions and manages the install; everything else happens inside the app.

Commands

CommandDescription
a1Start a new session in the current directory
a1 --session <id|path>Resume a session
a1 --session-dir <dir> --session <id>Resume from a custom session directory
a1 install <source>Install a package
a1 remove <source>Remove a package (alias uninstall)
a1 listList installed packages
a1 update [options]Update a1, packages, or model catalogs. See Updates.
a1 versionShow versions (--version, -v)
a1 helpShow help (--help, -h)
Not supported

a1 has no print or non-interactive mode, and does not take a prompt, --model, or --continue on the command line. Unrecognized arguments are ignored on purpose, so a typo never starts a session or changes your install.

Interface

a1 replaces pi's interface with a fullscreen view built for long sessions: a scrolling transcript above a fixed input dock, with the details you check most kept in sight.

Following output

The view follows new output as it streams. Scroll up to read earlier work and it stops following; a floating Jump to bottom (Ctrl+End) ↓ button appears, or N new messages if more has arrived. Press Ctrl+End or click it to catch up.

Prompts in the transcript

  • Each prompt you send shows the time it was sent.
  • The prompt you are reading under stays pinned at the top while you scroll. Click it to jump back to it.
  • Shift+↑ and Shift+↓ jump between your prompts.
  • Compacted context appears as a single row, such as Compacted from 281,483 tokens.

Scrollbar

Click or drag the scrollbar to move through long transcripts. Its visibility, thickness, and scroll speed are in /settings → Scroll.

The first line shows the project path, git branch, a clickable pull request badge when the branch has one, and the session name. The second shows token and cache usage, cost, context fill (amber above 70%, red above 90%), the model, and the thinking level.

Notices

Confirmations, warnings, and errors appear briefly above the editor instead of being added to the transcript, so the conversation stays clean.

Quitting

Quitting plays a short animation and leaves only a dim resume hint in your terminal. Turn the animation off with Quit animation in /settings.

Paste chips

Large pastes, links, files, and images collapse into compact chips in the editor, so your prompt stays readable. The full content is sent when you press Enter.

Kinds of chips

ChipCreated when you paste
[paste #1 +42 lines]Text longer than 10 lines
[paste #2 1800 chars]Text longer than 1,000 characters
[🔗 github.com/…]A single link
[📄 auth.ts]The path of an existing file
[📁 src]The path of a folder
[🖼 diagram.png]The path of an image file
[📷 screenshot-3f9a]An image from the clipboard

Shorter text is inserted as is.

Editing around chips

A chip behaves like a single character: the cursor steps over it, and one Backspace removes it. Copying editor text copies the full content behind each chip, not the label.

What gets sent

  • Text and link chips expand to their full content.
  • File and folder chips expand to the path. The agent reads the file with its tools; the contents are not attached.
  • Image chips are attached as images.

Images

Paste screenshots with Ctrl+V (Alt+V also works on Windows), or right-click in the editor. Up to 8 images are sent per prompt by default; change this with Prompt image limit in /settings. Providers may accept fewer.

Prompt history

What you type is remembered across sessions and projects, so yesterday's prompt is a few key presses away.

Recall a prompt

Press ↑ at the top of the editor to step back through earlier prompts, and ↓ to come forward. Moving past the newest entry brings back the draft you were writing. The editor border shows your position, for example History 97/100.

History is shared by every session and project that uses the same a1 profile. Repeating a prompt moves it to the front instead of adding a duplicate. Pasted images come back as chips when you recall a prompt.

What is saved

Prompts, follow-ups, steering messages, ! shell commands, and skill or template commands as you typed them. Agent responses, tool output, credentials, and environment values are never saved.

Storage and privacy

History is a local SQLite database in ~/.a1/data/history/, one file per profile. Access is limited to your user account where the system supports it.

Unencrypted

History is stored as plain text and can contain anything you typed, including sensitive details.

Turn it off or clear it

Switch off Persistent history in /settings → History; it applies the next time a1 starts. History limit keeps between 10 and 100 entries.

Turning history off does not delete what is saved. To clear it, close every a1 window that uses the profile, then delete that profile's files in ~/.a1/data/history/.

Next-step suggestions

After a response finishes, a1 can predict what you are likely to ask next and show it as faint text in the empty editor.

Using a suggestion

  1. Press Tab to put the suggestion into the editor.
  2. Edit it if you like.
  3. Press Enter to send it.

A suggestion is never sent by itself: Enter does nothing while only the faint text is showing. Start typing to dismiss it; clear your draft and it comes back.

How it works

a1 makes one extra background request to your selected model at its lowest thinking level. Often no suggestion appears, because the model chooses not to guess. Suggestions disappear when you send, switch session or model, or interrupt.

Usage

Suggestions use your provider quota like any other request.

Turn it off

Switch off Prompt suggestions in /settings → Agent. The change applies immediately.

Selection & copy

Select text in the transcript with the mouse, like in any other app, and copy it without fighting the terminal.

Selecting

  • Drag to select. The view scrolls when you drag past the edge.
  • Double-click selects a word, triple-click selects a line.
  • Selection still works on visible transcript text while a dialog is open.

Copying

HowCopies
Release the mouseThe selection, when Fullscreen copy on select is on
Ctrl+CThe selection (it does not clear or quit while text is selected)
Ctrl+XThe selection, or the last assistant message when nothing is selected
/copyThe last agent message

A short notice confirms how many characters were copied.

Over SSH

In a remote session, a1 copies through your terminal (OSC 52, up to 64 KiB) when the terminal supports it. It never reads or writes the remote machine's clipboard.

Profiles

a1 and pi keep separate profiles, so trying a1 never touches your pi setup.

Separate from pi

a1 uses ~/.a1/agent; pi uses ~/.pi/agent. a1 does not copy, merge, or import pi's settings, credentials, sessions, packages, or trust decisions. Log in and install extensions in a1 separately.

Both tools can still edit the project files you point them at.

Several windows

Run as many a1 instances as you like in separate terminals. Closing one never closes another, and they share prompt history when they use the same profile.

Moving the profile

Set A1_PROFILE_HOME to use a different home directory for .a1/agent, for example to keep a separate work profile.

Reporting a problem

Include the output of a1 version, your operating system and terminal, and a minimal example when you open an issue. Remove private prompts and credentials first.