# @tjcoder/cli

> Terminal-first AI coding assistant by TJ Coder / AI Labs. A keyboard-driven TUI with a live cognition pane, 7 specialized agents, and 31 tools, running on local Ollama models by default.

Latest version **0.9.166** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tjcoder/cli
pnpm add @tjcoder/cli
yarn add @tjcoder/cli
bun add @tjcoder/cli
```

Provides the command `coder`.

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.9.166 |
| Published | 2026-09-24 |
| First published | 2026-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 15.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 10 |
| Maintainers | tjmaghni |
| Keywords | ai, coding, cli, tui, terminal, ollama, gemini, agent, assistant |

## Links

- npm: https://www.npmjs.com/package/@tjcoder/cli
- Repository: https://github.com/tjcoder-labs/cli
- Homepage: https://github.com/tjcoder-labs/cli#readme
- Issues: https://github.com/tjcoder-labs/cli/issues
- npm.io page: https://npm.io/package/@tjcoder/cli

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.9.166 (latest) — 2026-09-24
- 0.9.165 — 2026-09-24
- 0.9.164 — 2026-09-24

## README

# @tjcoder/cli

> Terminal-first AI coding assistant by TJ Coder / AI Labs.

`coder` is a Go TUI that pairs a conversational AI agent with real
developer tools, streams the model's reasoning live in a "cognition"
pane, and ships 7 specialized agents plus 31 tools. It defaults to local
Ollama models (your code never leaves your machine) and optionally uses
Google Gemini. This package is the npm distribution: it downloads the
right prebuilt binary for your platform on `npm install`, so you don't
need a Go toolchain.

## Install

```bash
npm install -g @tjcoder/cli
```

That's it. After install, `coder` is on your `PATH`:

```bash
coder --version
```

### Prerequisites

`coder` itself is a self-contained Go binary — the only requirement is
`node >= 18` (to run the postinstall downloader). To actually use the
TUI you'll also need:

- An [Ollama](https://ollama.com) server running locally
  (default: `http://localhost:11434`)
- At least one model pulled (`ollama pull gemma4:cloud` or similar)

Don't have Ollama yet? The shell installer can set it up in one go:

```bash
INSTALL_OLLAMA=1 curl -fsSL https://raw.githubusercontent.com/tjcoder-labs/cli/main/install.sh | bash
```

## Features

- **Live cognition pane** — watch the model reason in real time
- **7 specialized agents** — software engineer, terminal specialist, code reviewer, Android assistant, cloud expert, social researcher, storyteller
- **31 tools** — filesystem, shell, Git, browser automation (CDP), Cloudflare DNS, email, and more
- **Multi-line paste** — paste code blocks or documents; they're kept as one message
- **Headless mode** — script it with `coder -p "…"` for CI and automation
- **Session persistence** — conversation history, tasks, and memories survive across runs
- **Local-first privacy** — defaults to Ollama; your code never leaves your machine

## Updating

```bash
npm update -g @tjcoder/cli
```

The `postinstall` hook is idempotent and won't redownload a binary
that's already present.

## Uninstalling

```bash
npm uninstall -g @tjcoder/cli
```

The `preuninstall` hook removes the cached binary.

## Usage

```bash
coder                              # launch the TUI
coder --version                    # print version and exit
coder --provider ollama --host http://localhost:11434
coder --provider gemini --gemini-api-key $GEMINI_API_KEY
coder --provider gemini models     # list available Gemini models
coder --workspace-root ~/code/foo
coder --model gemma4:cloud
coder --timeout 30m
```

### Environment variables

| Var | Default | Purpose |
|---|---|---|
| `GEMINI_API_KEY` | _(required for gemini)_ | API key for Google's Gemini API |
| `CODER_HTTP_TIMEOUT` | `5m` | HTTP client timeout (`time.ParseDuration`) |
| `CODER_CLI_REPO` | `tjcoder-labs/cli` | Override the GitHub repo used by `postinstall` |
| `CODER_CLI_VERSION` | _(matches this package)_ | Pin a specific `coder` binary version |
| `CODER_CLI_REQUIRE_DOWNLOAD` | _(unset)_ | Set to `1` to make a failed download fatal |

## Pinning a version

```bash
# install a specific coder version regardless of the @tjcoder/cli wrapper version
CODER_CLI_VERSION=v0.9.166 npm install -g @tjcoder/cli
```

## Troubleshooting

**`coder: native binary not found at .../lib/coder`**

The postinstall hook was skipped. Re-run with scripts enabled:

```bash
npm rebuild @tjcoder/cli
# or
npm install -g @tjcoder/cli --foreground-scripts
```

**`coder: download failed: 404 ...`**

There is no published release for your platform/arch, or the version
you pinned doesn't exist. Try a different version, or fall back to the
Go-based installer:

```bash
curl -fsSL https://raw.githubusercontent.com/tjcoder-labs/cli/main/install.sh | bash
```

## License

MIT — see the [LICENSE](./LICENSE) file. Built by [TJ Coder / AI Labs](https://github.com/tjcoder-labs).

---
_Source: https://npm.io/package/@tjcoder/cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
