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: 12 additions & 12 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ cannot run, report exactly which command was skipped and why.

## Layout

| Path | What |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `src/index.ts` | `#!/usr/bin/env bun` shim; delegates to `features/cli/runtime.ts` |
| `src/cli.ts` | The entire yargs command tree — 77 commands, options, validation, dispatch |
| `src/features/` | Per-domain presenters and UI controllers (`albums/ articles/ auth/ camera/ cli/ config/ credentials/ dreams/ memory/ photos/ pricing/ shares/ social/ upload/ uploads/ usage/ videos/`) |
| `src/ui/` | Ink rendering, formatting, and the `CommandOutput` stdout/stderr boundary |
| `src/camera*.ts` | CCAPI registry, session, store, liveview, events, settings |
| `src/upload*.ts`, `photo-check.ts`, `video-repair.ts` | Transfer pipeline |
| `src/api.ts`, `client.ts`, `http.ts`, `session.ts`, `credentials.ts`, `sftp-*.ts` | SDK adapters |
| `src/gql/` | Generated GraphQL client — never hand-edit |
| `test/` | 42 Bun test files, flat |
| `docs/` | `commands.md`, `configuration.md`, `development.md` |
| Path | What |
| --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `src/index.ts` | `#!/usr/bin/env bun` shim; delegates to `features/cli/runtime.ts` |
| `src/cli.ts` | The entire yargs command tree — 81 commands, options, validation, dispatch |
| `src/features/` | Per-domain presenters and UI controllers (`albums/ articles/ auth/ camera/ cli/ config/ credentials/ dreams/ memory/ photos/ pricing/ shares/ social/ spots/ upload/ uploads/ usage/ videos/`) |
| `src/ui/` | Ink rendering, formatting, and the `CommandOutput` stdout/stderr boundary |
| `src/camera*.ts` | CCAPI registry, session, store, liveview, events, settings |
| `src/upload*.ts`, `photo-check.ts`, `video-repair.ts` | Transfer pipeline |
| `src/api.ts`, `client.ts`, `http.ts`, `session.ts`, `credentials.ts`, `sftp-*.ts` | SDK adapters |
| `src/gql/` | Generated GraphQL client — never hand-edit |
| `test/` | 43 Bun test files, flat |
| `docs/` | `commands.md`, `configuration.md`, `development.md` |

## Project snapshot

Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ in a browser.
- Safely resume an interrupted upload and skip exact files already uploaded.
- Check which local photo and RAW files are already in your Rawback library.
- Find photos by describing them — "from 2012, all images in NYC" — or by
metadata, capture date, rating, location, and GPS data.
metadata, capture date, rating, access level, place, and distance from a point.
- Choose who can see each photo: private, any signed-in user, or public.
- Discover public photography Spots near you and plan sunrise, sunset and golden hour there.
- Create and curate albums, smart filters, cover images, tags, and Markdown stories.
- List and inspect daily AI-generated dream recaps, including their contributing photos.
- Browse content shared with you and manage your outgoing share links.
Expand Down Expand Up @@ -343,6 +345,17 @@ rawback photos list \
--captured-after 2026-01-01 \
--captured-before 2026-02-01

# Photos taken within 2 km of a point, nearest first
rawback photos list --near 37.7749,-122.4194 --radius 2000 --sort distance

# Publish photos (public also lists them in Spots), or list what you have published
rawback photos permission public 108 109
rawback photos list --permission public

# Find public photo spots nearby and plan the light at one
rawback spots list --near 37.7749,-122.4194 --radius 5000
rawback spots sun 18-41928-101324 --date 2026-06-21

# Upload up to eight files in parallel
rawback photos upload --path ./photos --concurrency 8

Expand Down Expand Up @@ -388,7 +401,9 @@ and automation note. You can also ask the binary for context-specific help:
rawback --help
rawback photos search --help
rawback photos list --help
rawback photos permission --help
rawback photos upload --help
rawback spots --help
rawback dream --help
rawback config --help
rawback album --help
Expand Down
79 changes: 79 additions & 0 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ results — a summary line plus one field per filter it applied.
| ---------------------- | ---------------------------------------------------------------- | ------- |
| `<prompt>` | What to look for, in plain language (required) | — |
| `--ai-search-id <id>` | Reuse an earlier interpretation instead of spending an AI credit | — |
| `--near <lat,lng>` | Only photos taken near this point, in degrees | — |
| `--radius <meters>` | Meters around `--near`, up to 500000 | `1000` |
| `--sort <order>` | `newest`, `rating`, or `distance` (needs `--near`) | newest |
| `--page <number>` | Positive result page | `1` |
| `--page-size <number>` | Results per page, from 1 through 100 | `24` |
| `--json` | Print machine-readable JSON | `false` |
Expand Down Expand Up @@ -424,6 +427,10 @@ rawback photos list [options]
| `--city <value>` | Filter by city | — |
| `--country <value>` | Filter by country | — |
| `--has-gps` | Include only photos with GPS coordinates | `false` |
| `--near <lat,lng>` | Only photos taken near this point, in degrees | — |
| `--radius <meters>` | Meters around `--near`, up to 500000 | `1000` |
| `--sort <order>` | `newest`, `rating`, `relevance`, or `distance` | newest |
| `--permission <value>` | Filter by access: `private`, `protected`, `public` | — |
| `--page <number>` | Positive result page | `1` |
| `--page-size <number>` | Results per page, from 1 through 100 | `24` |
| `--json` | Print machine-readable JSON | `false` |
Expand All @@ -445,6 +452,43 @@ wins over the AI's reading of the prompt. Supplying `--prompt` also drops the
`3,4,5` rating default, for the reason given under
[`rawback photos search`](#rawback-photos-search).

`--near` keeps photos whose GPS position lies within `--radius` meters of the
point; photos without GPS never match. `--sort distance` lists the nearest
first and needs `--near`; `--sort relevance` ranks by `--search` and needs it.
Both are refused rather than silently falling back to newest-first.

```bash
rawback photos list --near 37.7749,-122.4194 --radius 2000 --sort distance
rawback photos list --permission public # everything you have published
```

`--permission` matches each photo's own access setting. A private photo in a
shared album is still `private` here, because album access is contextual.

## `rawback photos permission`

Sets who can see one or more photos:

```bash
rawback photos permission <level> <image-ids..>
rawback photos permission public 12 13 14
rawback photos permission private 12,13 --json
```

| Level | Who can see the photo |
| ----------- | -------------------------------------------------------------------------- |
| `private` | Only you. The default for every upload |
| `protected` | Anyone signed in to Rawback |
| `public` | Anyone, and the photo is listed in [Spots](#rawback-spots) when it has GPS |

Albums and share links you created keep working for private photos: an album
you shared still shows its photos to the people you shared it with, whatever
each photo's own level.

Each photo is updated separately. One failure does not stop the rest, but the
command exits `1` if any photo could not be updated. With `--json` the output is
`{ permission, results: [{ id, ok, permission, error }], succeeded, failed }`.

## `rawback photos check`

Checks whether supported local photo and RAW files are already in the
Expand Down Expand Up @@ -503,6 +547,41 @@ EXIF capture time; duplicate-check failures do not block the SFTP upload.
Local EXIF workers are controlled separately by `metadata.concurrency` in the
shared configuration file.

## `rawback spots`

Browses public photography Spots: places where Rawback photographers published
photos. Spots are public, so these commands also work signed out.

```bash
rawback spots list [--near <lat,lng> [--radius <meters>]] [--featured]
rawback spots view <id>
rawback spots sun <id> --date <YYYY-MM-DD>
```

`spots list` options:

| Option | Description | Default |
| ---------------------- | ----------------------------------------- | ------- |
| `--near <lat,lng>` | Only spots near this point, nearest first | — |
| `--radius <meters>` | Meters around `--near`, up to 500000 | `1000` |
| `--featured` | Rank by community reactions instead | `false` |
| `--page <number>` | Positive result page | `1` |
| `--page-size <number>` | Spots per page, from 1 through 100 | `24` |
| `--json` | Print `spots` and `pageInfo` as JSON | `false` |

A spot ID looks like `18-240801-157013`. `spots view <id>` lists the photos
published there with photographer, camera and exposure settings, and takes
`--page`, `--page-size` and `--json`.

`spots sun <id> --date 2026-06-21` prints sunrise, sunset, and the morning and
evening golden hours for that local date, in the spot's own time zone, with the
sun's azimuth at sunrise and sunset. `--photo-id <id>` uses one published
photo's exact position inside the spot. `--json` prints the times as RFC 3339
timestamps next to the IANA `timezone`.

To publish your own photos to Spots, set them `public` with
[`rawback photos permission`](#rawback-photos-permission).

## `rawback videos`

Lists, uploads, and manages videos. Videos upload directly to storage rather
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"@inquirer/prompts": "^8.7.0",
"@rawback/ccapi-js": "1.1.0",
"@rawback/sdk": "0.3.3",
"@rawback/sdk": "0.3.4",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Regenerate the lockfile for SDK 0.3.4

The manifest now requires @rawback/sdk 0.3.4, but bun.lock still records 0.3.3 in both the workspace dependency and resolved package entry. Since CI installs with --frozen-lockfile, dependency installation will fail instead of providing the newly imported Spots and photo-permission APIs; regenerate and commit the lockfile with this bump.

AGENTS.md reference: AGENTS.md:L135-L136

Useful? React with 👍 / 👎.

"ink": "^7.1.1",
"react": "^19.2.8",
"react-devtools-core": "^7.0.1",
Expand Down
Loading
Loading