import

import is a command for coding agents from gastownhall/beads. It costs 7 tokens per session (997 once invoked), scanned A, original, MIT.

JSONL import commands for Beads issues and memories. JSONL is a text format with one JSON object on each line, which makes records easy to move between files or commands.

In plain words
What is it for?
Import records from a file or standard input, update existing issue IDs safely, preview changes, and return structured results as JSON.
Why use it?
They let you restore, migrate, or add issue data without entering each item manually, while a dry run can check the input first.

Command

Part of the beads plugin — 29 commands, 1 agent, 4 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/gastownhall/beads/import
Clone the repo
git clone --depth 1 https://github.com/gastownhall/beads

Or install beads, the plugin that ships this one along with the rest of its 29 commands, 1 agent, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for import

README.md
[![agentmods](https://agentmods.dev/badge/commands/gastownhall/beads/import.svg)](https://agentmods.dev/commands/gastownhall/beads/import)
Your own site
<a href="https://agentmods.dev/commands/gastownhall/beads/import"><img src="https://agentmods.dev/badge/commands/gastownhall/beads/import.svg" alt="Measured on agentmods" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 997 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00007 $0.00997
Opus 5 $0.00003 $0.00498
Sonnet 5 $0.00001 $0.00199
Haiku 4.5 $0.00001 $0.00100

Measured 4d ago against content hash 604e48e6d093, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

import scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/beads/skills/beads/commands/import.md · 85 lines

How it starts

The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.

bd import imports newline-delimited JSON into an existing Beads database. Issues with new IDs are created and existing IDs use guarded upsert semantics. The command is not supported in proxied-server mode.

Usage

bd import                         # Read .beads/<import.path>
bd import backup.jsonl            # Read a specific file
bd import --input backup.jsonl    # Same as -i backup.jsonl
bd import -                       # Read JSONL from stdin
bd export --include-memories | bd import - # Round-trip issues and memories
bd import --dry-run backup.jsonl  # Parse and report without writing
bd import --json backup.jsonl     # Return a structured result

With no file argument, the source is the import.path file under .beads/; import.path defaults to issues.jsonl. Use either a positional file or --input/-i, not both. The special path - reads stdin. With --global and no file, the source is global-issues.jsonl in the active Beads directory.

Each non-empty line must be a JSON object. Issue records accept the schema emitted by bd export; title is the only required issue field. Records with "_type":"memory" and non-empty key and value fields are imported as persistent memories. Optional export header records are ignored, and tombstone rows are skipped. bd export omits memories by default; add --include-memories or --all when they should be carried into an import.

Merge and Safety Semantics

For records that supply updated_at, an incoming row rewrites an existing issue only when its timestamp is strictly newer. Older records are skipped wholesale, including their labels, comments, and dependencies. When timestamps are equal, the local issue row wins, while those auxiliary records still merge. The stale check is repeated inside the upsert so a concurrent newer local update is not overwritten.

If updated_at is omitted, the importer fills it with the current time during the write. A record naming an existing ID can therefore overwrite local state; include the exported timestamp when stale protection matters.

Read the full file on GitHub · 85 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 85 lines · 7 tokens per session scan A 604e48e6d093

Subscribe to this mod's changes

import is a command published in the GitHub repository gastownhall/beads (26,853 stars, last pushed today), licensed MIT. It adds 7 tokens to every session and 997 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.