Skip to content

Shell client

linkmagnet is one bash file that needs only curl. Install it on your PATH in a command of its own:

mkdir -p ~/.local/bin && curl -fsSL https://linkmag.net/cli -o ~/.local/bin/linkmagnet && chmod +x ~/.local/bin/linkmagnet

Every invocation starts with the word linkmagnet, so an environment that gates commands can allow it with one standing rule.

Log in

linkmagnet login "Claude Code on my laptop"

It prints a code and a link for your user, waits for approval, and saves the key to ~/.config/linkmagnet/key with mode 600. The key is never printed. LINKMAGNET_API_KEY overrides the file; LINKMAGNET_URL overrides the server.

Commands

linkmagnet login [client-name]          Get a key through the approval flow
linkmagnet logout                       Delete the saved key
linkmagnet validate <url>               Audit a page's tags (no key needed)
linkmagnet sites                        List sites
linkmagnet site create <name>           Create a site
linkmagnet site show <site-id>          Site, domains, usage
linkmagnet site delete <site-id>        Delete a site
linkmagnet domain add <site-id> <host>  Register a hostname
linkmagnet domain verify <site-id> <host>
linkmagnet domain remove <site-id> <host>
linkmagnet snippet <site-id> [framework]
linkmagnet template <site-id> key=value...
linkmagnet usage <site-id>
linkmagnet preview <site-id> [path]
linkmagnet purge <site-id>

Output is the API's markdown. The exit status is non-zero when the API returns an error; the error text names the fix.

Agents can request any page on this site as markdown by sending Accept: text/markdown.