Skip to content

feat: URL command inlines - !@https://url syntax #6

@johnlindquist

Description

@johnlindquist

Summary

Add a command inline syntax that fetches and converts URLs to markdown on-the-fly, complementing the existing !`cmd` syntax with into.md integration.

Proposed Syntax

# Existing command inline (unchanged):
!`git status`

# New URL inline:
!@https://example.com/current-status

# Or explicit into.md call:
!`into https://news.ycombinator.com`

How It Would Work

  1. Add new pattern: !@<url> for URL inlines
  2. Fetch URL through into.md API
  3. Replace inline with converted markdown
  4. Process at the same time as !`cmd` inlines in src/imports.ts

Use Cases

  • Live Data Agents: !@https://status.example.com for current system status
  • Research Workflows: Pull in relevant articles/docs dynamically
  • Competitive Analysis: !@https://competitor.com/pricing to inform decisions
  • News-Aware Agents: Include current headlines in context

Alternative: CLI Helper

Could also expose as a standalone command:

# Standalone usage
into https://example.com > context.md

# Pipe to agent
into https://example.com | ma ANALYZER.md

Implementation Notes

  • Add !@ pattern to src/imports.ts
  • Reuse into.md client from URL imports feature
  • Consider timeout for slow pages
  • Error handling for unreachable URLs

Questions for Discussion

  • Is !@url intuitive or confusing? Alternatives: !web(url), !fetch(url)
  • Should we support selectors? !@https://example.com#main-content
  • Rate limiting / caching between runs?

Related

This is part of exploring into.md integration opportunities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions