Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,32 @@ Record your work as a trajectory for future agents and humans to follow.

## Usage

If `trail` is installed globally, run commands directly:
Run without a global install by invoking the npm package:
```bash
trail start "Task description"
npx --yes agent-trajectories start "Task description"
```

If `agent-trajectories` is installed locally in a project, run through npm so
`node_modules/.bin` is resolved:
```bash
npx --no-install trail start "Task description"
# or
npm exec -- trail start "Task description"
```

If not globally installed, use npx to run from local installation:
If this is the `agent-trajectories` repository, use the local source runner:
```bash
npx trail start "Task description"
npm run trail -- start "Task description"
```

If `trail` is installed globally, run commands directly:
```bash
trail start "Task description"
```

Examples below use `trail` directly; for non-global installs, substitute the
appropriate `npx`, `npm exec`, or `npm run trail --` prefix from above.

## When Starting Work

Start a trajectory when beginning a task:
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,25 @@ Over time, trajectories become a searchable knowledge base:
### CLI

```bash
# Install globally (trail command available directly)
# Run without installing globally
npx --yes agent-trajectories start "Implement auth module"

# Or install globally if you prefer the short trail command
npm install -g agent-trajectories
trail start "Implement auth module"

# Or install locally (requires npx prefix)
# Or install locally in a project
npm install agent-trajectories
npx --no-install trail start "Implement auth module"
# or
npm exec -- trail start "Implement auth module"
```

```bash
# Start tracking a task
trail start "Implement auth module"
# (use `npx trail start ...` if installed locally)
# (for non-global installs, replace `trail` with
# `npx --yes agent-trajectories`, `npx --no-install trail`, or `npm exec -- trail`)

# View current status
trail status
Expand Down
24 changes: 20 additions & 4 deletions docs/trail-snippet.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,32 @@ Record your work as a trajectory for future agents and humans to follow.

## Usage

If `trail` is installed globally, run commands directly:
Run without a global install by invoking the npm package:
```bash
trail start "Task description"
npx --yes agent-trajectories start "Task description"
```

If `agent-trajectories` is installed locally in a project, run through npm so
`node_modules/.bin` is resolved:
```bash
npx --no-install trail start "Task description"
# or
npm exec -- trail start "Task description"
```

If not globally installed, use npx to run from local installation:
If this is the `agent-trajectories` repository, use the local source runner:
```bash
npx trail start "Task description"
npm run trail -- start "Task description"
```

If `trail` is installed globally, run commands directly:
```bash
trail start "Task description"
```

Examples below use `trail` directly; for non-global installs, substitute the
appropriate `npx`, `npm exec`, or `npm run trail --` prefix from above.

## When Starting Work

Start a trajectory when beginning a task:
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"trail": "vite-node src/cli/index.ts",
"test": "vitest",
"test:run": "vitest run",
"lint": "biome check .",
Expand All @@ -48,9 +49,7 @@
"type": "git",
"url": "https://github.com/AgentWorkforce/trajectories"
},
"files": [
"dist"
],
"files": ["dist"],
"engines": {
"node": ">=20.0.0"
},
Expand All @@ -67,6 +66,7 @@
"lint-staged": "^16.2.7",
"tsup": "^8.5.1",
"typescript": "^5.4.0",
"vite-node": "^2.1.9",
"vitest": "^2.0.0"
},
"lint-staged": {
Expand Down
Loading