Local backlink CLI quickstart

Use an existing AgentLinkOps repository checkout to create a local ledger, preview backlink exports and check supplied source pages.

The development CLI keeps backlink records in your repository. It can inspect supplied pages locally and preview supplier exports. These instructions require an existing authorized checkout of the AgentLinkOps repository; they are not a public package installation guide.

Initialize local records

Run commands from the repository root after installing its dependencies:

npm run linktrail -- init

The local configuration uses .linktrail/ for the ledger, observations, events and sync state. Keep this directory with your project records, and follow your own policy for sensitive campaign notes. Local checks do not require a hosted account; remote sync has separate account and connection requirements.

Record an expected link

Replace the illustrative source and destination with a placement you are authorized to check:

npm run linktrail -- add --source=https://example.org/resources \
  --target=https://example.com/guide --scope=exact --intent=expected

Use wanted for an opportunity you would like to pursue, expected for a placement you expect to exist, and retired when ending that work. An earned link is an observed outcome, not an additional intent value. Record why you expect the placement so a later missing check has context.

Check the supplied page

npm run linktrail -- check

The command checks entries that are due. Use npm run linktrail -- check --all when you need to check every active record again.

Read the request outcome and evidence before interpreting link presence. A readable page without the expected link and an unsuccessful request are different results. JavaScript-dependent content can also limit what a fetch establishes. Keep uncertain results for investigation instead of turning them into confirmed link loss.

See the backlink monitoring checklist for a review sequence and the JavaScript backlink guide for rendering limits.

Preview a backlink export

npm run linktrail -- import ahrefs.csv --from=ahrefs --target=example.com

The import command reads the file and reports accepted, rejected and duplicate rows. It does not write the ledger, fetch candidate pages or create a remote discovery run. Correct mapping errors before passing candidates to the next authorized workflow.

The adapters cover Ahrefs, Semrush, Majestic, Moz, Google Search Console, DataForSEO, Linkody and explicitly mapped CSV. They require source-page and target-page URLs. An aggregate linking-domain table is not enough. The import reference documents the headers and a tested example for each format.

Connect the next step

Keep wanted prospects separate from expected placements. Review candidate relevance before outreach, and confirm a current observation before describing a backlink as live. The ledger guide explains how intent and observations work together.

AgentLinkOps remains an invitation-only pilot. Imports and selected candidate checks are available; live supplier discovery and competitor-gap workflows are still in validation. For a hosted connection, read the public tool guide.

References

Command behavior and intent values were checked against the AgentLinkOps CLI on September 12, 2026. For the underlying concepts, see Google's link guidance and the JSON Lines format. The domains in the examples are placeholders, not a claimed placement.