Skip to content

Commit 9f3fc0e

Browse files
committed
Add CLI-first Quick Share service setup
1 parent 5fed2b8 commit 9f3fc0e

14 files changed

Lines changed: 1935 additions & 611 deletions

File tree

.gitignore

Lines changed: 4 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,5 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
.pnpm-debug.log*
9-
10-
# Diagnostic reports
11-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12-
13-
# Runtime data
14-
pids
15-
*.pid
16-
*.seed
17-
*.pid.lock
18-
19-
# Coverage directory used by tools like istanbul
20-
coverage
21-
*.lcov
22-
23-
# nyc test coverage
24-
.nyc_output
25-
26-
# Grunt intermediate storage
27-
.grunt
28-
29-
# Bower dependency directory
30-
bower_components
31-
32-
# node_modules
33-
node_modules/
34-
jspm_packages/
35-
36-
# Snowpack dependency directory
37-
web_modules/
38-
39-
# TypeScript cache
40-
*.tsbuildinfo
41-
42-
# Optional npm cache directory
43-
.npm
44-
45-
# Optional eslint cache
46-
.eslintcache
47-
48-
# Optional stylelint cache
49-
.stylelintcache
50-
51-
# Microbundle cache
52-
.rpt2_cache/
53-
.rts2_cache_cjs/
54-
.rts2_cache_es/
55-
.rts2_cache_umd/
56-
57-
# Optional REPL history
58-
.node_repl_history
59-
60-
# Output of 'npm pack'
61-
*.tgz
62-
63-
# Yarn Integrity file
64-
.yarn-integrity
65-
66-
# dotenv environment variable files
67-
.env
68-
.env.development.local
69-
.env.test.local
70-
.env.production.local
71-
.env.local
72-
73-
# parcel-bundler cache
74-
.cache
75-
.parcel-cache
76-
77-
# Next.js build output
78-
.next
79-
out
80-
81-
# Nuxt.js build / generate output
82-
.nuxt
83-
dist
84-
85-
# Storybook build outputs
86-
.out
87-
.storybook-out
88-
storybook-static
89-
90-
# Temporary folders
91-
tmp/
92-
temp/
93-
94-
# Editor directories and files
95-
.vscode/*
96-
!.vscode/extensions.json
97-
.idea
981
.DS_Store
99-
*.suo
100-
*.ntvs*
101-
*.njsproj
102-
*.sln
103-
*.sw?
104-
105-
# Test files
106-
test-results/
107-
*.test.js.snap
2+
wrangler.toml
3+
node_modules/
4+
dist/
5+
.wrangler/

AGENTS.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Quick Share Agent Notes
2+
3+
Quick Share is a CLI-first bridge to shared public assets in Cloudflare R2.
4+
5+
Use it when a project needs to find shared images, PDFs, exports, handoff files, or public asset URLs without guessing bucket paths.
6+
7+
## Preferred Workflow
8+
9+
From any configured project:
10+
11+
```bash
12+
quick-share where
13+
quick-share health
14+
quick-share images
15+
quick-share urls
16+
quick-share files client-name/
17+
```
18+
19+
The CLI reads `.quick-share.json` from the current directory or a parent directory. If no config file exists, it falls back to `QUICK_SHARE_API_URL`.
20+
21+
## Configure A Project
22+
23+
If there is no hosted Quick Share Worker yet, set it up first:
24+
25+
```bash
26+
quick-share setup-service --bucket quick-share-assets --public-url https://YOUR-PUBLIC-BUCKET.r2.dev
27+
```
28+
29+
This checks Wrangler, installs a local Wrangler dev dependency when needed, checks Cloudflare authentication, creates the R2 bucket, writes `wrangler.toml`, and deploys the Worker.
30+
31+
If authentication is missing, do not guess credentials. Ask Jack to run `wrangler login` or provide a scoped `CLOUDFLARE_API_TOKEN`.
32+
33+
From the project root:
34+
35+
```bash
36+
quick-share init https://quick-share-api.example.workers.dev project-prefix/
37+
```
38+
39+
Or configure another project from anywhere:
40+
41+
```bash
42+
quick-share init https://quick-share-api.example.workers.dev project-prefix/ --project /path/to/project
43+
```
44+
45+
This writes `.quick-share.json` and adds a short Quick Share section to that project's `AGENTS.md` if needed.
46+
47+
## Important Boundaries
48+
49+
- Read-only: no upload, delete, move, or overwrite command exists.
50+
- Public-first: treat returned URLs as public.
51+
- Not authentication: do not use this for private client assets without adding signed URLs or auth.
52+
- Durability depends on the R2 object and public asset domain staying available.
53+
54+
## Stable Commands
55+
56+
- `quick-share init <api-url> [prefix] [--project <dir>]`
57+
- `quick-share setup-service [--bucket <bucket>] [--public-url <url>] [--no-deploy]`
58+
- `quick-share health`
59+
- `quick-share manifest`
60+
- `quick-share files [prefix]`
61+
- `quick-share urls [prefix]`
62+
- `quick-share images [prefix]`
63+
- `quick-share open <filename-or-index> [prefix]`
64+
- `quick-share copy <filename-or-index> [prefix]`
65+
- `quick-share where`

0 commit comments

Comments
 (0)