create-glanceway-source
v1.3.0
Published
Scaffold a standalone Glanceway source project
Readme
create-glanceway-source
Scaffold a Glanceway source with full build/test tooling and AI-assisted development support.
Quick Start
npm create glanceway-sourceOr with a source name:
npm create glanceway-source my-sourceYou'll be prompted for:
- Display name — shown in Glanceway
- Description — brief summary of what the source does
- Author — your name or handle
- Author URL — optional link (e.g., GitHub profile)
- Category — Developer, News, Social, Finance, Entertainment, Productivity, or Other
Non-interactive mode (all flags required):
npm create glanceway-source my-source \
--name "My Source" \
--description "Fetches items from Example API" \
--author myname \
--author-url "https://github.com/myname" \
--category DeveloperDeveloping with AI
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:
cdinto your scaffolded project- Run
claudeto start Claude Code CLAUDE.mdis automatically read, giving Claude full context about the Glanceway Source API
Example prompts:
- "Fetch the top posts from Hacker News and emit them as items"
- "Check my service's status and emit an item when its status changes"
- "Ask AI to ask me a philosophical question every day and emit the question as an item"
Building & Testing
cd my-source
npm install
# Build: compiles source, creates dist/latest.gwsrc
npm run build
# Test: executes source with mock API, validates emitted items
npm run test
# Pass config values for testing
npm run test -- --config API_TOKEN=xxx --config USERNAME=yyyThe dist/latest.gwsrc file is the importable source package.
Importing into Glanceway
- Open Glanceway
- Go to Sources
- Click Import from file
- Select
dist/latest.gwsrc
Submitting to glanceway-sources
To share your source with the community, open an issue on glanceway-sources with a link to your project repository.
