create-glanceway-source 1.0.0 → 1.2.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,77 @@
1
+ # create-glanceway-source
2
+
3
+ Scaffold a [Glanceway](https://glanceway.app) source with full build/test tooling and AI-assisted development support.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ npm create glanceway-source
9
+ ```
10
+
11
+ Or with a source name:
12
+
13
+ ```bash
14
+ npm create glanceway-source my-source
15
+ ```
16
+
17
+ You'll be prompted for:
18
+
19
+ - **Display name** — shown in Glanceway
20
+ - **Description** — brief summary of what the source does
21
+ - **Author** — your name or handle
22
+ - **Author URL** — optional link (e.g., GitHub profile)
23
+ - **Category** — Developer, News, Social, Finance, Entertainment, Productivity, or Other
24
+
25
+ Non-interactive mode (all flags required):
26
+
27
+ ```bash
28
+ npm create glanceway-source my-source \
29
+ --name "My Source" \
30
+ --description "Fetches items from Example API" \
31
+ --author myname \
32
+ --author-url "https://github.com/myname" \
33
+ --category Developer
34
+ ```
35
+
36
+ ## Developing with AI
37
+
38
+ The scaffolded project includes a `CLAUDE.md` file with the full Glanceway API reference, source lifecycle documentation, and coding conventions. To use it with [Claude Code](https://claude.com/claude-code):
39
+
40
+ 1. `cd` into your scaffolded project
41
+ 2. Run `claude` to start Claude Code
42
+ 3. `CLAUDE.md` is automatically read, giving Claude full context about the Glanceway Source API
43
+
44
+ Example prompts:
45
+
46
+ - "Fetch the top posts from Hacker News and emit them as items"
47
+ - "Check my service's status and emit an item when its status changes"
48
+ - "Ask AI to ask me a philosophical question every day and emit the question as an item"
49
+
50
+ ## Building & Testing
51
+
52
+ ```bash
53
+ cd my-source
54
+ npm install
55
+
56
+ # Build: compiles source, creates dist/latest.gwsrc
57
+ npm run build
58
+
59
+ # Test: executes source with mock API, validates emitted items
60
+ npm run test
61
+
62
+ # Pass config values for testing
63
+ npm run test -- --config API_TOKEN=xxx --config USERNAME=yyy
64
+ ```
65
+
66
+ The `dist/latest.gwsrc` file is the importable source package.
67
+
68
+ ## Importing into Glanceway
69
+
70
+ 1. Open **Glanceway**
71
+ 2. Go to **Sources**
72
+ 3. Click **Import from file**
73
+ 4. Select `dist/latest.gwsrc`
74
+
75
+ ## Submitting to glanceway-sources
76
+
77
+ To share your source with the community, [open an issue](https://github.com/glanceway/glanceway-sources/issues) on glanceway-sources with a link to your project repository.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};