@phamvuhoang/otto 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # @phamvuhoang/otto
2
+
3
+ CLI for **[Otto](https://github.com/phamvuhoang/otto)** — a harness that drives the
4
+ [Claude Code](https://docs.anthropic.com/claude/docs/claude-code) CLI against a target
5
+ repository in an iterating implementer → reviewer loop, running `claude` directly on the host.
6
+ Docker is not required.
7
+
8
+ Exposes two bin entries (thin wrappers over
9
+ **[`@phamvuhoang/otto-core`](https://www.npmjs.com/package/@phamvuhoang/otto-core)**):
10
+
11
+ - **`otto-afk`** — plan/PRD-driven loop. Iterates until the agent emits `<promise>NO MORE TASKS</promise>`.
12
+ - **`otto-ghafk`** — GitHub-issue-driven loop. Pulls open issues and lets the agent pick the next task.
13
+
14
+ > **Security:** Otto runs Claude with `--permission-mode bypassPermissions`. The default
15
+ > `OTTO_RUNNER=sandbox` uses Claude Code's native OS sandbox (Seatbelt on macOS) to confine
16
+ > writes to the workspace. Point it only at repositories and prompts you trust. See
17
+ > [SECURITY.md](https://github.com/phamvuhoang/otto/blob/main/SECURITY.md).
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ npm i -g @phamvuhoang/otto
23
+ ```
24
+
25
+ ## Use
26
+
27
+ ```bash
28
+ cd /path/to/your/workspace
29
+ otto-afk "<plan-and-prd>" 5 # plan/PRD loop
30
+ otto-ghafk 5 # GitHub-issue loop
31
+ otto-afk --help # flags, env vars
32
+ otto-afk --print-config # diagnose workspace / runner / sandbox config
33
+ ```
34
+
35
+ Requires an authenticated Claude Code login (and `gh` for `otto-ghafk`). First-run
36
+ setup, per-OS notes, and the full flag/env reference are in the
37
+ **[main README](https://github.com/phamvuhoang/otto#readme)** and
38
+ **[QUICKSTART](https://github.com/phamvuhoang/otto/blob/main/QUICKSTART.md)**.
39
+
40
+ ## License
41
+
42
+ [MIT](https://github.com/phamvuhoang/otto/blob/main/LICENSE) © Henry Pham.
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ import { runAfk } from "@phamvuhoang/otto-core";
7
+
8
+ const here = dirname(fileURLToPath(import.meta.url));
9
+ const pkgPath = join(here, "..", "package.json");
10
+ const cliVersion = JSON.parse(readFileSync(pkgPath, "utf8")).version;
11
+
12
+ runAfk(process.argv.slice(2), { cliVersion }).catch((e) => {
13
+ console.error(e?.stack ?? e);
14
+ process.exit(1);
15
+ });
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ import { runGhAfk } from "@phamvuhoang/otto-core";
7
+
8
+ const here = dirname(fileURLToPath(import.meta.url));
9
+ const pkgPath = join(here, "..", "package.json");
10
+ const cliVersion = JSON.parse(readFileSync(pkgPath, "utf8")).version;
11
+
12
+ runGhAfk(process.argv.slice(2), { cliVersion }).catch((e) => {
13
+ console.error(e?.stack ?? e);
14
+ process.exit(1);
15
+ });
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@phamvuhoang/otto",
3
+ "version": "0.1.0",
4
+ "description": "CLI for the otto AFK loop (otto-afk, otto-ghafk).",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Henry Pham <phamvuhoang@gmail.com>",
8
+ "homepage": "https://github.com/phamvuhoang/otto/tree/main/apps/cli#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/phamvuhoang/otto.git",
12
+ "directory": "apps/cli"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/phamvuhoang/otto/issues"
16
+ },
17
+ "keywords": [
18
+ "claude-code",
19
+ "claude",
20
+ "ai-agent",
21
+ "afk",
22
+ "automation",
23
+ "cli"
24
+ ],
25
+ "bin": {
26
+ "otto-afk": "./bin/otto-afk.js",
27
+ "otto-ghafk": "./bin/otto-ghafk.js"
28
+ },
29
+ "files": [
30
+ "bin",
31
+ "scripts",
32
+ "README.md"
33
+ ],
34
+ "dependencies": {
35
+ "@phamvuhoang/otto-core": "^0.1.0"
36
+ },
37
+ "engines": {
38
+ "node": ">=20"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ }
43
+ }
package/scripts/afk.sh ADDED
@@ -0,0 +1,12 @@
1
+ #!/bin/bash
2
+ set -eo pipefail
3
+
4
+ # Workspace = caller's cwd. Dockerfile resolution = bundled (packages/core).
5
+ # Arg validation handled by otto-afk JS (supports --help, --print-config).
6
+ if command -v otto-afk >/dev/null 2>&1; then
7
+ exec otto-afk "$@"
8
+ fi
9
+ if [ -x "./node_modules/.bin/otto-afk" ]; then
10
+ exec ./node_modules/.bin/otto-afk "$@"
11
+ fi
12
+ exec npx -y @phamvuhoang/otto otto-afk "$@"
@@ -0,0 +1,12 @@
1
+ #!/bin/bash
2
+ set -eo pipefail
3
+
4
+ # Workspace = caller's cwd. Dockerfile resolution = bundled (packages/core).
5
+ # Arg validation handled by otto-ghafk JS (supports --help, --print-config).
6
+ if command -v otto-ghafk >/dev/null 2>&1; then
7
+ exec otto-ghafk "$@"
8
+ fi
9
+ if [ -x "./node_modules/.bin/otto-ghafk" ]; then
10
+ exec ./node_modules/.bin/otto-ghafk "$@"
11
+ fi
12
+ exec npx -y @phamvuhoang/otto otto-ghafk "$@"