johnlindquist / johnlindquist/mdflow
feat: URL imports via into.md - @https://example.com syntax
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- TypeScript
- Stars
- 604
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Extend the existing file import syntax (@./path.md) to support URL imports that automatically convert web pages to markdown using into.md.
Proposed Syntax
# In your agent file body:
@https://docs.example.com/api-reference
# Or with tilde-style for saved bookmarks:
@~/bookmarks/react-docs.url
How It Would Work
- Detect URLs in
@imports (pattern:@https?://...) - Fetch the URL through into.md API to get clean markdown
- Inline the result just like local file imports
- Support recursive imports if the converted markdown contains more
@references
Use Cases
- Documentation as Context:
@https://react.dev/reference/react/useStateto give the agent API docs - Research Tasks: Import blog posts, articles, or technical specs directly
- Dynamic Agents: Agent files that always have fresh documentation context
Implementation Notes
- Add URL pattern matching in
src/imports.ts - Create
into.mdAPI client (likely just fetch to their endpoint) - Consider caching fetched URLs to avoid repeated API calls
- Error handling for offline/unreachable URLs
Questions for Discussion
- Should we cache converted pages? If so, for how long?
- Rate limiting considerations for into.md API?
- Should this be opt-in via a flag or enabled by default?
Related
This is part of exploring into.md integration opportunities.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/imports.ts and compare the existing @./path.md handling with the proposed URL and ~/bookmarks/react-docs.url forms. Resolve the caching, rate-limiting, opt-in, and error-handling questions before implementation. Done means URL content is converted through into.md, inlined like local imports, and recursive imports continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100