Examples
40 runs of dctx 1.3.1 on one small project, recorded when this site was built: the exact stdout and stderr, the exit code, the bytes and the estimated tokens (ceil(2 × bytes / 7)). Each run starts from an empty home, config and cache (DCTX_AUTO_CLEAN=0, LC_ALL=C.UTF-8, COLUMNS=100), in a copy of the sample named kiosk. Wall time is not recorded.
| File | Bytes | In pack |
|---|---|---|
.env | 29 | listed-not-read |
.gitignore | 8 | packed |
Cargo.toml | 185 | packed |
README.md | 473 | packed |
assets/logo.png | 69 | binary |
config.toml | 78 | packed |
src/main.rs | 331 | packed |
src/store.rs | 698 | packed |
src/util.rs | 404 | packed |
target/debug/kiosk.d | 42 | ignored |
tools/report.py | 484 | packed |
web/app.ts | 596 | packed |
web/format.ts | 350 | packed |
Only three values are not stable between runs and are replaced with …, each where it occurs: the commit hash in --version, the MOD: times of --tree-stamps=on and age_s of --meta. The help pages are on /cli/, the template builds on /templates/. The same commands run live in the playground.
Pack
dctx --version
$ dctx --versiondctx 1.3.1 (<git sha>)
dctx pack .
The whole project as one block. .env is listed by name and never read; target/ (ignored by .gitignore) and the binary assets/logo.png are left out.
$ dctx pack .[DCTX_LLM_CONTEXT_SNAPSHOT_V1][DIRECTORY:kiosk]<INSTRUCTIONS>1. Manifest: The <DIRECTORY_TREE> section lists all files. - Each entry: [TYPE] RELATIVE_PATH (ID:UNIQUE_ID) - TYPE is [D] for directory, [F] for file.2. Content Access: To read a specific file: - Find its UNIQUE_ID from the directory tree. - Search for the marker: <FILE_CONTENT_START ID="UNIQUE_ID"> - The content is between this marker and </FILE_CONTENT_END ID="UNIQUE_ID"></INSTRUCTIONS><DIRECTORY_TREE>[D] (ID:ROOT) [F] .env (ID:F001) [F] .gitignore (ID:F002) [F] Cargo.toml (ID:F003) [F] README.md (ID:F004) [F] config.toml (ID:F005) [D] src (ID:D006) [F] src/main.rs (ID:F007) [F] src/store.rs (ID:F008) [F] src/util.rs (ID:F009) [D] tools (ID:D010) [F] tools/report.py (ID:F011) [D] web (ID:D012) [F] web/app.ts (ID:F013) [F] web/format.ts (ID:F014)</DIRECTORY_TREE><FILE_CONTENT_START ID="F001" PATH=".env" LINES="0">[Content omitted by pattern rules]</FILE_CONTENT_END ID="F001"><FILE_CONTENT_START ID="F002" PATH=".gitignore" LINES="2">target/</FILE_CONTENT_END ID="F002"><FILE_CONTENT_START ID="F003" PATH="Cargo.toml" LINES="9">[package]name = "kiosk"version = "0.1.0"edition = "2021"description = "A tiny order kiosk: the sample project for the dctx website examples."license = "Apache-2.0"[dependencies]</FILE_CONTENT_END ID="F003"><FILE_CONTENT_START ID="F004" PATH="README.md" LINES="19"># kioskA tiny order kiosk. It is the example project that every command on the dctx website runs on.## Run cargo run -- adaprints `Hello, Ada!` and saves order 1 to `orders/1.tsv`.## OrdersEach order is one tab-separated line: id, item, quantity and a checksum of the item name.`python3 tools/report.py orders/` sums the quantities.## Configuration`config.toml` holds the currency and the screen title. Secrets live in `.env`, which is never committed.</FILE_CONTENT_END ID="F004"><FILE_CONTENT_START ID="F005" PATH="config.toml" LINES="7">[screen]title = "kiosk example"currency = "EUR"[orders]folder = "orders"</FILE_CONTENT_END ID="F005"><FILE_CONTENT_START ID="F007" PATH="src/main.rs" LINES="11">//! kiosk: greet a customer, take one order, save it.mod store;mod util;fn main() { let name = std::env::args().nth(1).unwrap_or_else(|| "guest".to_string()); println!("{}", util::greet(&name)); let order = store::Order { id: 1, item: "coffee".to_string(), qty: 2 }; store::save(&order).expect("save order");}</FILE_CONTENT_END ID="F007"><FILE_CONTENT_START ID="F008" PATH="src/store.rs" LINES="25">use std::io;/// One order as the kiosk records it.pub struct Order { pub id: u32, pub item: String, pub qty: u32,}/// Write the order to orders/<id>.tsv.pub fn save(order: &Order) -> io::Result<()> { std::fs::create_dir_all("orders")?; std::fs::write(format!("orders/{}.tsv", order.id), encode(order))}/// One tab-separated line with a checksum of the item name.fn encode(order: &Order) -> String { format!("{}\t{}\t{}\t{:08x}\n", order.id, order.item, order.qty, checksum(&order.item))}/// FNV-1a over the bytes of the text.fn checksum(text: &str) -> u32 { text.bytes().fold(0x811c9dc5, |hash, byte| (hash ^ u32::from(byte)).wrapping_mul(0x0100_0193))}</FILE_CONTENT_END ID="F008"><FILE_CONTENT_START ID="F009" PATH="src/util.rs" LINES="14">/// The greeting shown on the kiosk screen.pub fn greet(name: &str) -> String { format!("Hello, {}!", title_case(name))}/// Upper-case the first letter of a name, leave the rest as typed.pub fn title_case(name: &str) -> String { let mut chars = name.chars(); match chars.next() { Some(first) => first.to_uppercase().chain(chars).collect(), None => String::new(), }}</FILE_CONTENT_END ID="F009"><FILE_CONTENT_START ID="F011" PATH="tools/report.py" LINES="19">"""Sum the quantities of every saved order: python3 tools/report.py orders/"""import sysfrom pathlib import Pathdef read_orders(folder): for path in sorted(Path(folder).glob("*.tsv")): order_id, item, qty, _checksum = path.read_text().rstrip("\n").split("\t") yield order_id, item, int(qty)def main(folder="orders"): total = sum(qty for _, _, qty in read_orders(folder)) print(f"{total} items")if __name__ == "__main__": main(*sys.argv[1:])</FILE_CONTENT_END ID="F011"><FILE_CONTENT_START ID="F013" PATH="web/app.ts" LINES="20">import { formatName, formatPrice } from "./format";interface Line { item: string; cents: number; qty: number;}/** The greeting banner of the kiosk web screen. */export function renderGreeting(name: string): string { return `Hello, ${formatName(name)}!`;}/** One receipt line per order line, then the total. */export function renderReceipt(lines: Line[]): string[] { const rows = lines.map((l) => `${l.qty} x ${l.item} ${formatPrice(l.cents * l.qty)}`); const total = lines.reduce((sum, l) => sum + l.cents * l.qty, 0); return [...rows, `total ${formatPrice(total)}`];}</FILE_CONTENT_END ID="F013"><FILE_CONTENT_START ID="F014" PATH="web/format.ts" LINES="10">/** Price in cents to a display string, e.g. 250 -> "2.50 EUR". */export function formatPrice(cents: number, currency = "EUR"): string { return `${(cents / 100).toFixed(2)} ${currency}`;}/** The customer's name as the screen shows it. */export function formatName(name: string): string { return name.trim() === "" ? "guest" : name.trim();}</FILE_CONTENT_END ID="F014">pack bytes=5545 files=11 retention=stdout version=V1
dctx pack . --tree-stamps=on
The 1.0.0 tree lines with MOD and SIZE. MOD is a modification time in milliseconds and differs on every checkout, so its digits are replaced with … here.
$ dctx pack . --tree-stamps=on[DCTX_LLM_CONTEXT_SNAPSHOT_V1][DIRECTORY:kiosk]<INSTRUCTIONS>1. Manifest: The <DIRECTORY_TREE> section lists all files. - Each entry: [TYPE] RELATIVE_PATH (ID:UNIQUE_ID, MOD:TIMESTAMP) - TYPE is [D] for directory, [F] for file.2. Content Access: To read a specific file: - Find its UNIQUE_ID from the directory tree. - Search for the marker: <FILE_CONTENT_START ID="UNIQUE_ID"> - The content is between this marker and </FILE_CONTENT_END ID="UNIQUE_ID"></INSTRUCTIONS><DIRECTORY_TREE>[D] (ID:ROOT, MOD:…) [F] .env (ID:F001, MOD:…, SIZE:29) [F] .gitignore (ID:F002, MOD:…, SIZE:8) [F] Cargo.toml (ID:F003, MOD:…, SIZE:185) [F] README.md (ID:F004, MOD:…, SIZE:473) [F] config.toml (ID:F005, MOD:…, SIZE:78) [D] src (ID:D006, MOD:…) [F] src/main.rs (ID:F007, MOD:…, SIZE:331) [F] src/store.rs (ID:F008, MOD:…, SIZE:698) [F] src/util.rs (ID:F009, MOD:…, SIZE:404) [D] tools (ID:D010, MOD:…) [F] tools/report.py (ID:F011, MOD:…, SIZE:484) [D] web (ID:D012, MOD:…) [F] web/app.ts (ID:F013, MOD:…, SIZE:596) [F] web/format.ts (ID:F014, MOD:…, SIZE:350)</DIRECTORY_TREE><FILE_CONTENT_START ID="F001" PATH=".env" LINES="0">[Content omitted by pattern rules]</FILE_CONTENT_END ID="F001"><FILE_CONTENT_START ID="F002" PATH=".gitignore" LINES="2">target/</FILE_CONTENT_END ID="F002"><FILE_CONTENT_START ID="F003" PATH="Cargo.toml" LINES="9">[package]name = "kiosk"version = "0.1.0"edition = "2021"description = "A tiny order kiosk: the sample project for the dctx website examples."license = "Apache-2.0"[dependencies]</FILE_CONTENT_END ID="F003"><FILE_CONTENT_START ID="F004" PATH="README.md" LINES="19"># kioskA tiny order kiosk. It is the example project that every command on the dctx website runs on.## Run cargo run -- adaprints `Hello, Ada!` and saves order 1 to `orders/1.tsv`.## OrdersEach order is one tab-separated line: id, item, quantity and a checksum of the item name.`python3 tools/report.py orders/` sums the quantities.## Configuration`config.toml` holds the currency and the screen title. Secrets live in `.env`, which is never committed.</FILE_CONTENT_END ID="F004"><FILE_CONTENT_START ID="F005" PATH="config.toml" LINES="7">[screen]title = "kiosk example"currency = "EUR"[orders]folder = "orders"</FILE_CONTENT_END ID="F005"><FILE_CONTENT_START ID="F007" PATH="src/main.rs" LINES="11">//! kiosk: greet a customer, take one order, save it.mod store;mod util;fn main() { let name = std::env::args().nth(1).unwrap_or_else(|| "guest".to_string()); println!("{}", util::greet(&name)); let order = store::Order { id: 1, item: "coffee".to_string(), qty: 2 }; store::save(&order).expect("save order");}</FILE_CONTENT_END ID="F007"><FILE_CONTENT_START ID="F008" PATH="src/store.rs" LINES="25">use std::io;/// One order as the kiosk records it.pub struct Order { pub id: u32, pub item: String, pub qty: u32,}/// Write the order to orders/<id>.tsv.pub fn save(order: &Order) -> io::Result<()> { std::fs::create_dir_all("orders")?; std::fs::write(format!("orders/{}.tsv", order.id), encode(order))}/// One tab-separated line with a checksum of the item name.fn encode(order: &Order) -> String { format!("{}\t{}\t{}\t{:08x}\n", order.id, order.item, order.qty, checksum(&order.item))}/// FNV-1a over the bytes of the text.fn checksum(text: &str) -> u32 { text.bytes().fold(0x811c9dc5, |hash, byte| (hash ^ u32::from(byte)).wrapping_mul(0x0100_0193))}</FILE_CONTENT_END ID="F008"><FILE_CONTENT_START ID="F009" PATH="src/util.rs" LINES="14">/// The greeting shown on the kiosk screen.pub fn greet(name: &str) -> String { format!("Hello, {}!", title_case(name))}/// Upper-case the first letter of a name, leave the rest as typed.pub fn title_case(name: &str) -> String { let mut chars = name.chars(); match chars.next() { Some(first) => first.to_uppercase().chain(chars).collect(), None => String::new(), }}</FILE_CONTENT_END ID="F009"><FILE_CONTENT_START ID="F011" PATH="tools/report.py" LINES="19">"""Sum the quantities of every saved order: python3 tools/report.py orders/"""import sysfrom pathlib import Pathdef read_orders(folder): for path in sorted(Path(folder).glob("*.tsv")): order_id, item, qty, _checksum = path.read_text().rstrip("\n").split("\t") yield order_id, item, int(qty)def main(folder="orders"): total = sum(qty for _, _, qty in read_orders(folder)) print(f"{total} items")if __name__ == "__main__": main(*sys.argv[1:])</FILE_CONTENT_END ID="F011"><FILE_CONTENT_START ID="F013" PATH="web/app.ts" LINES="20">import { formatName, formatPrice } from "./format";interface Line { item: string; cents: number; qty: number;}/** The greeting banner of the kiosk web screen. */export function renderGreeting(name: string): string { return `Hello, ${formatName(name)}!`;}/** One receipt line per order line, then the total. */export function renderReceipt(lines: Line[]): string[] { const rows = lines.map((l) => `${l.qty} x ${l.item} ${formatPrice(l.cents * l.qty)}`); const total = lines.reduce((sum, l) => sum + l.cents * l.qty, 0); return [...rows, `total ${formatPrice(total)}`];}</FILE_CONTENT_END ID="F013"><FILE_CONTENT_START ID="F014" PATH="web/format.ts" LINES="10">/** Price in cents to a display string, e.g. 250 -> "2.50 EUR". */export function formatPrice(cents: number, currency = "EUR"): string { return `${(cents / 100).toFixed(2)} ${currency}`;}/** The customer's name as the screen shows it. */export function formatName(name: string): string { return name.trim() === "" ? "guest" : name.trim();}</FILE_CONTENT_END ID="F014">pack bytes=5951 files=11 retention=stdout version=V1
dctx pack . --ext rs
Only the Rust files.
$ dctx pack . --ext rs[DCTX_LLM_CONTEXT_SNAPSHOT_V1][DIRECTORY:kiosk]<INSTRUCTIONS>1. Manifest: The <DIRECTORY_TREE> section lists all files. - Each entry: [TYPE] RELATIVE_PATH (ID:UNIQUE_ID) - TYPE is [D] for directory, [F] for file.2. Content Access: To read a specific file: - Find its UNIQUE_ID from the directory tree. - Search for the marker: <FILE_CONTENT_START ID="UNIQUE_ID"> - The content is between this marker and </FILE_CONTENT_END ID="UNIQUE_ID"></INSTRUCTIONS><DIRECTORY_TREE>[D] (ID:ROOT) [D] src (ID:D001) [F] src/main.rs (ID:F002) [F] src/store.rs (ID:F003) [F] src/util.rs (ID:F004)</DIRECTORY_TREE><FILE_CONTENT_START ID="F002" PATH="src/main.rs" LINES="11">//! kiosk: greet a customer, take one order, save it.mod store;mod util;fn main() { let name = std::env::args().nth(1).unwrap_or_else(|| "guest".to_string()); println!("{}", util::greet(&name)); let order = store::Order { id: 1, item: "coffee".to_string(), qty: 2 }; store::save(&order).expect("save order");}</FILE_CONTENT_END ID="F002"><FILE_CONTENT_START ID="F003" PATH="src/store.rs" LINES="25">use std::io;/// One order as the kiosk records it.pub struct Order { pub id: u32, pub item: String, pub qty: u32,}/// Write the order to orders/<id>.tsv.pub fn save(order: &Order) -> io::Result<()> { std::fs::create_dir_all("orders")?; std::fs::write(format!("orders/{}.tsv", order.id), encode(order))}/// One tab-separated line with a checksum of the item name.fn encode(order: &Order) -> String { format!("{}\t{}\t{}\t{:08x}\n", order.id, order.item, order.qty, checksum(&order.item))}/// FNV-1a over the bytes of the text.fn checksum(text: &str) -> u32 { text.bytes().fold(0x811c9dc5, |hash, byte| (hash ^ u32::from(byte)).wrapping_mul(0x0100_0193))}</FILE_CONTENT_END ID="F003"><FILE_CONTENT_START ID="F004" PATH="src/util.rs" LINES="14">/// The greeting shown on the kiosk screen.pub fn greet(name: &str) -> String { format!("Hello, {}!", title_case(name))}/// Upper-case the first letter of a name, leave the rest as typed.pub fn title_case(name: &str) -> String { let mut chars = name.chars(); match chars.next() { Some(first) => first.to_uppercase().chain(chars).collect(), None => String::new(), }}</FILE_CONTENT_END ID="F004">pack bytes=2345 files=3 retention=stdout version=V1
dctx pack . --debug-ignored
Ignored paths are listed with [IGNORED] and never read: the content of target/ does not appear.
$ dctx pack . --debug-ignored[DCTX_LLM_CONTEXT_SNAPSHOT_V1][DIRECTORY:kiosk]<INSTRUCTIONS>1. Manifest: The <DIRECTORY_TREE> section lists all files. - Each entry: [TYPE] RELATIVE_PATH (ID:UNIQUE_ID) - TYPE is [D] for directory, [F] for file.2. Content Access: To read a specific file: - Find its UNIQUE_ID from the directory tree. - Search for the marker: <FILE_CONTENT_START ID="UNIQUE_ID"> - The content is between this marker and </FILE_CONTENT_END ID="UNIQUE_ID"></INSTRUCTIONS><DIRECTORY_TREE>[D] (ID:ROOT) [F] .env (ID:F001) [F] .gitignore (ID:F002) [F] Cargo.toml (ID:F003) [F] README.md (ID:F004) [F] config.toml (ID:F005) [D] src (ID:D006) [F] src/main.rs (ID:F007) [F] src/store.rs (ID:F008) [F] src/util.rs (ID:F009) [D] target [IGNORED] (ID:D010) [D] target/debug [IGNORED] (ID:D011) [F] target/debug/kiosk.d [IGNORED] (ID:F012) [D] tools (ID:D013) [F] tools/report.py (ID:F014) [D] web (ID:D015) [F] web/app.ts (ID:F016) [F] web/format.ts (ID:F017)</DIRECTORY_TREE><FILE_CONTENT_START ID="F001" PATH=".env" LINES="0">[Content omitted by pattern rules]</FILE_CONTENT_END ID="F001"><FILE_CONTENT_START ID="F002" PATH=".gitignore" LINES="2">target/</FILE_CONTENT_END ID="F002"><FILE_CONTENT_START ID="F003" PATH="Cargo.toml" LINES="9">[package]name = "kiosk"version = "0.1.0"edition = "2021"description = "A tiny order kiosk: the sample project for the dctx website examples."license = "Apache-2.0"[dependencies]</FILE_CONTENT_END ID="F003"><FILE_CONTENT_START ID="F004" PATH="README.md" LINES="19"># kioskA tiny order kiosk. It is the example project that every command on the dctx website runs on.## Run cargo run -- adaprints `Hello, Ada!` and saves order 1 to `orders/1.tsv`.## OrdersEach order is one tab-separated line: id, item, quantity and a checksum of the item name.`python3 tools/report.py orders/` sums the quantities.## Configuration`config.toml` holds the currency and the screen title. Secrets live in `.env`, which is never committed.</FILE_CONTENT_END ID="F004"><FILE_CONTENT_START ID="F005" PATH="config.toml" LINES="7">[screen]title = "kiosk example"currency = "EUR"[orders]folder = "orders"</FILE_CONTENT_END ID="F005"><FILE_CONTENT_START ID="F007" PATH="src/main.rs" LINES="11">//! kiosk: greet a customer, take one order, save it.mod store;mod util;fn main() { let name = std::env::args().nth(1).unwrap_or_else(|| "guest".to_string()); println!("{}", util::greet(&name)); let order = store::Order { id: 1, item: "coffee".to_string(), qty: 2 }; store::save(&order).expect("save order");}</FILE_CONTENT_END ID="F007"><FILE_CONTENT_START ID="F008" PATH="src/store.rs" LINES="25">use std::io;/// One order as the kiosk records it.pub struct Order { pub id: u32, pub item: String, pub qty: u32,}/// Write the order to orders/<id>.tsv.pub fn save(order: &Order) -> io::Result<()> { std::fs::create_dir_all("orders")?; std::fs::write(format!("orders/{}.tsv", order.id), encode(order))}/// One tab-separated line with a checksum of the item name.fn encode(order: &Order) -> String { format!("{}\t{}\t{}\t{:08x}\n", order.id, order.item, order.qty, checksum(&order.item))}/// FNV-1a over the bytes of the text.fn checksum(text: &str) -> u32 { text.bytes().fold(0x811c9dc5, |hash, byte| (hash ^ u32::from(byte)).wrapping_mul(0x0100_0193))}</FILE_CONTENT_END ID="F008"><FILE_CONTENT_START ID="F009" PATH="src/util.rs" LINES="14">/// The greeting shown on the kiosk screen.pub fn greet(name: &str) -> String { format!("Hello, {}!", title_case(name))}/// Upper-case the first letter of a name, leave the rest as typed.pub fn title_case(name: &str) -> String { let mut chars = name.chars(); match chars.next() { Some(first) => first.to_uppercase().chain(chars).collect(), None => String::new(), }}</FILE_CONTENT_END ID="F009"><FILE_CONTENT_START ID="F014" PATH="tools/report.py" LINES="19">"""Sum the quantities of every saved order: python3 tools/report.py orders/"""import sysfrom pathlib import Pathdef read_orders(folder): for path in sorted(Path(folder).glob("*.tsv")): order_id, item, qty, _checksum = path.read_text().rstrip("\n").split("\t") yield order_id, item, int(qty)def main(folder="orders"): total = sum(qty for _, _, qty in read_orders(folder)) print(f"{total} items")if __name__ == "__main__": main(*sys.argv[1:])</FILE_CONTENT_END ID="F014"><FILE_CONTENT_START ID="F016" PATH="web/app.ts" LINES="20">import { formatName, formatPrice } from "./format";interface Line { item: string; cents: number; qty: number;}/** The greeting banner of the kiosk web screen. */export function renderGreeting(name: string): string { return `Hello, ${formatName(name)}!`;}/** One receipt line per order line, then the total. */export function renderReceipt(lines: Line[]): string[] { const rows = lines.map((l) => `${l.qty} x ${l.item} ${formatPrice(l.cents * l.qty)}`); const total = lines.reduce((sum, l) => sum + l.cents * l.qty, 0); return [...rows, `total ${formatPrice(total)}`];}</FILE_CONTENT_END ID="F016"><FILE_CONTENT_START ID="F017" PATH="web/format.ts" LINES="10">/** Price in cents to a display string, e.g. 250 -> "2.50 EUR". */export function formatPrice(cents: number, currency = "EUR"): string { return `${(cents / 100).toFixed(2)} ${currency}`;}/** The customer's name as the screen shows it. */export function formatName(name: string): string { return name.trim() === "" ? "guest" : name.trim();}</FILE_CONTENT_END ID="F017">pack bytes=5670 files=12 retention=stdout version=V1
dctx pack . --for 'greet store' --budget 800
Task context for an agent: find, neighbors and read of the names in the text, cut to the estimated output-token budget.
$ dctx pack . --for 'greet store' --budget 800# dctx pack --for budget=800 terms=2## find greets:src/util.rs#greet fn L2-4s:web/app.ts#renderGreeting fn L10-12## find stores:src/store.rs#Order struct L4-8s:src/store.rs#checksum fn L22-24s:src/store.rs#encode fn L17-19## neighbors s:src/util.rs#greetcalls:in:s:src/main.rs#main fn src/main.rs L7calls:out:s:src/util.rs#title_case fn src/util.rscontains:in:m:src/util.rs module src/util.rs## neighbors s:src/store.rs#Ordercontains:in:m:src/store.rs module src/store.rs## read s:src/util.rs#greets:src/util.rs#greet fn src/util.rspub fn greet(name: &str) -> String { format!("Hello, {}!", title_case(name))}## read s:src/store.rs#Orders:src/store.rs#Order struct src/store.rspub struct Order { pub id: u32, pub item: String, pub qty: u32,}# end body_tokens=223 budget=800 dropped=0
Map, text
dctx map map src/util.rs --depth 2
Outline of one file.
$ dctx map map src/util.rs --depth 2# kiosk maps:src/util.rs#greet fn L2-4s:src/util.rs#title_case fn L7-13
dctx map find greet
$ dctx map find greet# kiosk finds:src/util.rs#greet fn L2-4s:web/app.ts#renderGreeting fn L10-12
dctx map read 's:src/util.rs#greet'
Read the symbol metadata and verified source bytes; --json puts the source in source_utf8.
$ dctx map read 's:src/util.rs#greet'# kiosk reads:src/util.rs#greet fn src/util.rspub fn greet(name: &str) -> String { format!("Hello, {}!", title_case(name))}
dctx map neighbors 's:src/util.rs#greet' --edge calls --dir in
Callers, with the call-site line.
$ dctx map neighbors 's:src/util.rs#greet' --edge calls --dir in# kiosk neighborscalls:in:s:src/main.rs#main fn src/main.rs L7
dctx map explain 's:src/util.rs#greet'
$ dctx map explain 's:src/util.rs#greet'# kiosk explains:src/util.rs#greet fn src/util.rs
dctx map skeleton src/store.rs
Declaration signatures, no bodies, in source order.
$ dctx map skeleton src/store.rs# kiosk skeletonm:src/store.rs module L1-24 src/store.rss:src/store.rs#Order struct L4-8 pub struct Orders:src/store.rs#save fn L11-14 pub fn save(order: &Order)s:src/store.rs#encode fn L17-19 fn encode(order: &Order)s:src/store.rs#checksum fn L22-24 fn checksum(text: &str)
dctx map grep example -i
Exhaustive literal search. The .env value contains example too; it is never read, so it is not a hit.
$ dctx map grep example -i# kiosk greps:Cargo.toml#package.description fn Cargo.toml L5: description = "A tiny order kiosk: the sample project for the dctx website examples."d:README.md#kiosk heading README.md L3: A tiny order kiosk. It is the example project that every command on the dctx website runs on.s:config.toml#screen.title fn config.toml L2: title = "kiosk example"3 hits in 3 symbols
dctx map hubs --limit 10
$ dctx map hubs --limit 10# kiosk hubss:src/store.rs#checksum fn src/store.rs 1s:src/store.rs#encode fn src/store.rs 1s:src/store.rs#save fn src/store.rs 1s:src/util.rs#greet fn src/util.rs 1s:src/util.rs#title_case fn src/util.rs 1s:tools/report.py#main fn tools/report.py 1s:tools/report.py#read_orders fn tools/report.py 1s:web/format.ts#formatName fn web/format.ts 1s:web/format.ts#formatPrice fn web/format.ts 1./ 4 files 12 symbolsassets/ 1 files 0 symbolssrc/ 3 files 7 symbolstools/ 1 files 2 symbolsweb/ 2 files 5 symbols
dctx map path 's:src/main.rs#main' 's:src/store.rs#save'
$ dctx map path 's:src/main.rs#main' 's:src/store.rs#save'# kiosk pathstart s:src/main.rs#main fn src/main.rscalls:out s:src/store.rs#save fn src/store.rs
Map, JSON
dctx map find greet --json
$ dctx map find greet --json# pretty-printed; the raw bytes are below{ "v": 2, "place": "kiosk", "verb": "find", "freshness": { "mode": "strict", "state": "verified" }, "precision": { "coverage": "structural", "completion": "complete", "parser": "dctx-structural/3" }, "records": [ { "id": "s:src/util.rs#greet", "kind": "fn", "path": "src/util.rs", "lines": [ 2, 4 ], "summary": "The greeting shown on the kiosk screen.", "summary_source": "doc", "signature": null, "span": null, "source_utf8": null, "edge": null, "direction": null, "target": null, "confidence": null }, { "id": "s:web/app.ts#renderGreeting", "kind": "fn", "path": "web/app.ts", "lines": [ 10, 12 ], "summary": "The greeting banner of the kiosk web screen.", "summary_source": "doc", "signature": null, "span": null, "source_utf8": null, "edge": null, "direction": null, "target": null, "confidence": null } ], "more": 0, "next": null}
Raw output (745 bytes, as captured)
{"v":2,"place":"kiosk","verb":"find","freshness":{"mode":"strict","state":"verified"},"precision":{"coverage":"structural","completion":"complete","parser":"dctx-structural/3"},"records":[{"id":"s:src/util.rs#greet","kind":"fn","path":"src/util.rs","lines":[2,4],"summary":"The greeting shown on the kiosk screen.","summary_source":"doc","signature":null,"span":null,"source_utf8":null,"edge":null,"direction":null,"target":null,"confidence":null},{"id":"s:web/app.ts#renderGreeting","kind":"fn","path":"web/app.ts","lines":[10,12],"summary":"The greeting banner of the kiosk web screen.","summary_source":"doc","signature":null,"span":null,"source_utf8":null,"edge":null,"direction":null,"target":null,"confidence":null}],"more":0,"next":null}dctx map neighbors 's:src/util.rs#greet' --edge calls --dir in --json
$ dctx map neighbors 's:src/util.rs#greet' --edge calls --dir in --json# pretty-printed; the raw bytes are below{ "v": 2, "place": "kiosk", "verb": "neighbors", "freshness": { "mode": "strict", "state": "verified" }, "precision": { "coverage": "structural", "completion": "complete", "parser": "dctx-structural/3" }, "records": [ { "id": "calls:in:s:src/main.rs#main", "kind": "fn", "path": "src/main.rs", "lines": [ 5, 10 ], "edge": "calls", "direction": "in", "confidence": "name", "sites": [ 7 ] } ], "more": 0, "next": null}
Raw output (365 bytes, as captured)
{"v":2,"place":"kiosk","verb":"neighbors","freshness":{"mode":"strict","state":"verified"},"precision":{"coverage":"structural","completion":"complete","parser":"dctx-structural/3"},"records":[{"id":"calls:in:s:src/main.rs#main","kind":"fn","path":"src/main.rs","lines":[5,10],"edge":"calls","direction":"in","confidence":"name","sites":[7]}],"more":0,"next":null}dctx map read 's:src/util.rs#greet' --json
The verified source bytes of one node.
$ dctx map read 's:src/util.rs#greet' --json# pretty-printed; the raw bytes are below{ "v": 2, "place": "kiosk", "verb": "read", "freshness": { "mode": "strict", "state": "verified" }, "precision": { "coverage": "syntax", "completion": "complete", "parser": "dctx-lex-rust/syn-3.0.9" }, "records": [ { "id": "s:src/util.rs#greet", "kind": "fn", "path": "src/util.rs", "lines": [ 2, 4 ], "summary": "The greeting shown on the kiosk screen.", "summary_source": "doc", "signature": null, "span": [ 44, 126 ], "source_utf8": "pub fn greet(name: &str) -> String {\n format!(\"Hello, {}!\", title_case(name))\n}", "edge": null, "direction": null, "target": null, "confidence": null } ], "more": 0, "next": null}
Raw output (561 bytes, as captured)
{"v":2,"place":"kiosk","verb":"read","freshness":{"mode":"strict","state":"verified"},"precision":{"coverage":"syntax","completion":"complete","parser":"dctx-lex-rust/syn-3.0.9"},"records":[{"id":"s:src/util.rs#greet","kind":"fn","path":"src/util.rs","lines":[2,4],"summary":"The greeting shown on the kiosk screen.","summary_source":"doc","signature":null,"span":[44,126],"source_utf8":"pub fn greet(name: &str) -> String {\n format!(\"Hello, {}!\", title_case(name))\n}","edge":null,"direction":null,"target":null,"confidence":null}],"more":0,"next":null}dctx map find greet --json --meta
With --meta the answer also carries the snapshot digest, the generation and the index age. The age changes every second, which is why the default leaves these fields out; its digits are replaced with … here.
$ dctx map find greet --json --meta{"v":2,"place":"kiosk","snapshot":"v1:sha256:1de480dbf3f559eb25ca11d9bad2556f8239ae97916d084ce17abafb02916da3:6840","generation":1,"verb":"find","freshness":{"mode":"strict","state":"verified","age_s":…},"precision":{"coverage":"structural","completion":"complete","parser":"dctx-structural/3"},"records":[{"id":"s:src/util.rs#greet","kind":"fn","path":"src/util.rs","lines":[2,4],"summary":"The greeting shown on the kiosk screen.","summary_source":"doc","signature":null,"span":null,"source_utf8":null,"edge":null,"direction":null,"target":null,"confidence":null},{"id":"s:web/app.ts#renderGreeting","kind":"fn","path":"web/app.ts","lines":[10,12],"summary":"The greeting banner of the kiosk web screen.","summary_source":"doc","signature":null,"span":null,"source_utf8":null,"edge":null,"direction":null,"target":null,"confidence":null}],"more":0,"next":null}
Graph export
dctx map export --format mermaid
Paste into any Mermaid renderer.
$ dctx map export --format mermaidflowchart LR n0["d:README.md#Configuration"] n1["d:README.md#Orders"] n2["d:README.md#Run"] n3["d:README.md#kiosk"] n4["m:.gitignore"] n5["m:Cargo.toml"] n6["m:README.md"] n7["m:assets/logo.png"] n8["m:config.toml"] n9["m:src/main.rs"] n10["m:src/store.rs"] n11["m:src/util.rs"] n12["m:tools/report.py"] n13["m:web/app.ts"] n14["m:web/format.ts"] n15["s:Cargo.toml#dependencies"] n16["s:Cargo.toml#package"] n17["s:Cargo.toml#package.description"] n18["s:Cargo.toml#package.edition"] n19["s:Cargo.toml#package.license"] n20["s:Cargo.toml#package.name"] n21["s:Cargo.toml#package.version"] n22["s:config.toml#orders"] n23["s:config.toml#orders.folder"] n24["s:config.toml#screen"] n25["s:config.toml#screen.currency"] n26["s:config.toml#screen.title"] n27["s:src/main.rs#main"] n28["s:src/store.rs#Order"] n29["s:src/store.rs#checksum"] n30["s:src/store.rs#encode"] n31["s:src/store.rs#save"] n32["s:src/util.rs#greet"] n33["s:src/util.rs#title_case"] n34["s:tools/report.py#main"] n35["s:tools/report.py#read_orders"] n36["s:web/app.ts#Line"] n37["s:web/app.ts#renderGreeting"] n38["s:web/app.ts#renderReceipt"] n39["s:web/format.ts#formatName"] n40["s:web/format.ts#formatPrice"] n9 -->|imports| n10 n9 -->|imports| n11 n12 -->|calls| n34 n13 -->|imports| n39 n13 -->|imports| n40 n27 -->|calls| n31 n27 -->|calls| n32 n30 -->|calls| n29 n31 -->|calls| n30 n32 -->|calls| n33 n34 -->|calls| n35 n37 -->|calls| n39 n38 -->|calls| n40
dctx map export --format json
$ dctx map export --format json# pretty-printed; the raw bytes are below{ "nodes": [ { "id": "d:README.md#Configuration", "kind": "heading", "path": "README.md", "lines": [ 16, 18 ] }, { "id": "d:README.md#Orders", "kind": "heading", "path": "README.md", "lines": [ 11, 15 ] }, { "id": "d:README.md#Run", "kind": "heading", "path": "README.md", "lines": [ 5, 10 ] }, { "id": "d:README.md#kiosk", "kind": "heading", "path": "README.md", "lines": [ 1, 18 ] }, { "id": "m:.gitignore", "kind": "module", "path": ".gitignore", "lines": [ 1, 1 ] }, { "id": "m:Cargo.toml", "kind": "module", "path": "Cargo.toml", "lines": [ 1, 8 ] }, { "id": "m:README.md", "kind": "module", "path": "README.md", "lines": [ 1, 18 ] }, { "id": "m:assets/logo.png", "kind": "module", "path": "assets/logo.png", "lines": [ 1, 3 ] }, { "id": "m:config.toml", "kind": "module", "path": "config.toml", "lines": [ 1, 6 ] }, { "id": "m:src/main.rs", "kind": "module", "path": "src/main.rs", "lines": [ 1, 10 ] }, { "id": "m:src/store.rs", "kind": "module", "path": "src/store.rs", "lines": [ 1, 24 ] }, { "id": "m:src/util.rs", "kind": "module", "path": "src/util.rs", "lines": [ 1, 13 ] }, { "id": "m:tools/report.py", "kind": "module", "path": "tools/report.py", "lines": [ 1, 18 ] }, { "id": "m:web/app.ts", "kind": "module", "path": "web/app.ts", "lines": [ 1, 19 ] }, { "id": "m:web/format.ts", "kind": "module", "path": "web/format.ts", "lines": [ 1, 9 ] }, { "id": "s:Cargo.toml#dependencies", "kind": "struct", "path": "Cargo.toml", "lines": [ 8, 8 ] }, { "id": "s:Cargo.toml#package", "kind": "struct", "path": "Cargo.toml", "lines": [ 1, 6 ] }, { "id": "s:Cargo.toml#package.description", "kind": "fn", "path": "Cargo.toml", "lines": [ 5, 5 ] }, { "id": "s:Cargo.toml#package.edition", "kind": "fn", "path": "Cargo.toml", "lines": [ 4, 4 ] }, { "id": "s:Cargo.toml#package.license", "kind": "fn", "path": "Cargo.toml", "lines": [ 6, 6 ] }, { "id": "s:Cargo.toml#package.name", "kind": "fn", "path": "Cargo.toml", "lines": [ 2, 2 ] }, { "id": "s:Cargo.toml#package.version", "kind": "fn", "path": "Cargo.toml", "lines": [ 3, 3 ] }, { "id": "s:config.toml#orders", "kind": "struct", "path": "config.toml", "lines": [ 5, 6 ] }, { "id": "s:config.toml#orders.folder", "kind": "fn", "path": "config.toml", "lines": [ 6, 6 ] }, { "id": "s:config.toml#screen", "kind": "struct", "path": "config.toml", "lines": [ 1, 3 ] }, { "id": "s:config.toml#screen.currency", "kind": "fn", "path": "config.toml", "lines": [ 3, 3 ] }, { "id": "s:config.toml#screen.title", "kind": "fn", "path": "config.toml", "lines": [ 2, 2 ] }, { "id": "s:src/main.rs#main", "kind": "fn", "path": "src/main.rs", "lines": [ 5, 10 ] }, { "id": "s:src/store.rs#Order", "kind": "struct", "path": "src/store.rs", "lines": [ 4, 8 ] }, { "id": "s:src/store.rs#checksum", "kind": "fn", "path": "src/store.rs", "lines": [ 22, 24 ] }, { "id": "s:src/store.rs#encode", "kind": "fn", "path": "src/store.rs", "lines": [ 17, 19 ] }, { "id": "s:src/store.rs#save", "kind": "fn", "path": "src/store.rs", "lines": [ 11, 14 ] }, { "id": "s:src/util.rs#greet", "kind": "fn", "path": "src/util.rs", "lines": [ 2, 4 ] }, { "id": "s:src/util.rs#title_case", "kind": "fn", "path": "src/util.rs", "lines": [ 7, 13 ] }, { "id": "s:tools/report.py#main", "kind": "fn", "path": "tools/report.py", "lines": [ 12, 14 ] }, { "id": "s:tools/report.py#read_orders", "kind": "fn", "path": "tools/report.py", "lines": [ 6, 9 ] }, { "id": "s:web/app.ts#Line", "kind": "interface", "path": "web/app.ts", "lines": [ 3, 7 ] }, { "id": "s:web/app.ts#renderGreeting", "kind": "fn", "path": "web/app.ts", "lines": [ 10, 12 ] }, { "id": "s:web/app.ts#renderReceipt", "kind": "fn", "path": "web/app.ts", "lines": [ 15, 19 ] }, { "id": "s:web/format.ts#formatName", "kind": "fn", "path": "web/format.ts", "lines": [ 7, 9 ] }, { "id": "s:web/format.ts#formatPrice", "kind": "fn", "path": "web/format.ts", "lines": [ 2, 4 ] } ], "edges": [ { "src": "m:Cargo.toml", "edge": "contains", "dst": "s:Cargo.toml#dependencies", "confidence": "exact" }, { "src": "m:Cargo.toml", "edge": "contains", "dst": "s:Cargo.toml#package", "confidence": "exact" }, { "src": "m:Cargo.toml", "edge": "contains", "dst": "s:Cargo.toml#package.description", "confidence": "exact" }, { "src": "m:Cargo.toml", "edge": "contains", "dst": "s:Cargo.toml#package.edition", "confidence": "exact" }, { "src": "m:Cargo.toml", "edge": "contains", "dst": "s:Cargo.toml#package.license", "confidence": "exact" }, { "src": "m:Cargo.toml", "edge": "contains", "dst": "s:Cargo.toml#package.name", "confidence": "exact" }, { "src": "m:Cargo.toml", "edge": "contains", "dst": "s:Cargo.toml#package.version", "confidence": "exact" }, { "src": "m:README.md", "edge": "contains", "dst": "d:README.md#Configuration", "confidence": "exact" }, { "src": "m:README.md", "edge": "contains", "dst": "d:README.md#Orders", "confidence": "exact" }, { "src": "m:README.md", "edge": "contains", "dst": "d:README.md#Run", "confidence": "exact" }, { "src": "m:README.md", "edge": "contains", "dst": "d:README.md#kiosk", "confidence": "exact" }, { "src": "m:config.toml", "edge": "contains", "dst": "s:config.toml#orders", "confidence": "exact" }, { "src": "m:config.toml", "edge": "contains", "dst": "s:config.toml#orders.folder", "confidence": "exact" }, { "src": "m:config.toml", "edge": "contains", "dst": "s:config.toml#screen", "confidence": "exact" }, { "src": "m:config.toml", "edge": "contains", "dst": "s:config.toml#screen.currency", "confidence": "exact" }, { "src": "m:config.toml", "edge": "contains", "dst": "s:config.toml#screen.title", "confidence": "exact" }, { "src": "m:src/main.rs", "edge": "contains", "dst": "s:src/main.rs#main", "confidence": "exact" }, { "src": "m:src/main.rs", "edge": "imports", "dst": "m:src/store.rs", "confidence": "exact" }, { "src": "m:src/main.rs", "edge": "imports", "dst": "m:src/util.rs", "confidence": "exact" }, { "src": "m:src/store.rs", "edge": "contains", "dst": "s:src/store.rs#Order", "confidence": "exact" }, { "src": "m:src/store.rs", "edge": "contains", "dst": "s:src/store.rs#checksum", "confidence": "exact" }, { "src": "m:src/store.rs", "edge": "contains", "dst": "s:src/store.rs#encode", "confidence": "exact" }, { "src": "m:src/store.rs", "edge": "contains", "dst": "s:src/store.rs#save", "confidence": "exact" }, { "src": "m:src/util.rs", "edge": "contains", "dst": "s:src/util.rs#greet", "confidence": "exact" }, { "src": "m:src/util.rs", "edge": "contains", "dst": "s:src/util.rs#title_case", "confidence": "exact" }, { "src": "m:tools/report.py", "edge": "calls", "dst": "s:tools/report.py#main", "confidence": "name" }, { "src": "m:tools/report.py", "edge": "contains", "dst": "s:tools/report.py#main", "confidence": "exact" }, { "src": "m:tools/report.py", "edge": "contains", "dst": "s:tools/report.py#read_orders", "confidence": "exact" }, { "src": "m:web/app.ts", "edge": "contains", "dst": "s:web/app.ts#Line", "confidence": "exact" }, { "src": "m:web/app.ts", "edge": "contains", "dst": "s:web/app.ts#renderGreeting", "confidence": "exact" }, { "src": "m:web/app.ts", "edge": "contains", "dst": "s:web/app.ts#renderReceipt", "confidence": "exact" }, { "src": "m:web/app.ts", "edge": "imports", "dst": "s:web/format.ts#formatName", "confidence": "exact" }, { "src": "m:web/app.ts", "edge": "imports", "dst": "s:web/format.ts#formatPrice", "confidence": "exact" }, { "src": "m:web/format.ts", "edge": "contains", "dst": "s:web/format.ts#formatName", "confidence": "exact" }, { "src": "m:web/format.ts", "edge": "contains", "dst": "s:web/format.ts#formatPrice", "confidence": "exact" }, { "src": "s:src/main.rs#main", "edge": "calls", "dst": "s:src/store.rs#save", "confidence": "name" }, { "src": "s:src/main.rs#main", "edge": "calls", "dst": "s:src/util.rs#greet", "confidence": "name" }, { "src": "s:src/store.rs#encode", "edge": "calls", "dst": "s:src/store.rs#checksum", "confidence": "name" }, { "src": "s:src/store.rs#save", "edge": "calls", "dst": "s:src/store.rs#encode", "confidence": "name" }, { "src": "s:src/util.rs#greet", "edge": "calls", "dst": "s:src/util.rs#title_case", "confidence": "name" }, { "src": "s:tools/report.py#main", "edge": "calls", "dst": "s:tools/report.py#read_orders", "confidence": "name" }, { "src": "s:web/app.ts#renderGreeting", "edge": "calls", "dst": "s:web/format.ts#formatName", "confidence": "name" }, { "src": "s:web/app.ts#renderReceipt", "edge": "calls", "dst": "s:web/format.ts#formatPrice", "confidence": "name" } ]}
Raw output (7,527 bytes, as captured)
{"nodes":[
{"id":"d:README.md#Configuration","kind":"heading","path":"README.md","lines":[16,18]},
{"id":"d:README.md#Orders","kind":"heading","path":"README.md","lines":[11,15]},
{"id":"d:README.md#Run","kind":"heading","path":"README.md","lines":[5,10]},
{"id":"d:README.md#kiosk","kind":"heading","path":"README.md","lines":[1,18]},
{"id":"m:.gitignore","kind":"module","path":".gitignore","lines":[1,1]},
{"id":"m:Cargo.toml","kind":"module","path":"Cargo.toml","lines":[1,8]},
{"id":"m:README.md","kind":"module","path":"README.md","lines":[1,18]},
{"id":"m:assets/logo.png","kind":"module","path":"assets/logo.png","lines":[1,3]},
{"id":"m:config.toml","kind":"module","path":"config.toml","lines":[1,6]},
{"id":"m:src/main.rs","kind":"module","path":"src/main.rs","lines":[1,10]},
{"id":"m:src/store.rs","kind":"module","path":"src/store.rs","lines":[1,24]},
{"id":"m:src/util.rs","kind":"module","path":"src/util.rs","lines":[1,13]},
{"id":"m:tools/report.py","kind":"module","path":"tools/report.py","lines":[1,18]},
{"id":"m:web/app.ts","kind":"module","path":"web/app.ts","lines":[1,19]},
{"id":"m:web/format.ts","kind":"module","path":"web/format.ts","lines":[1,9]},
{"id":"s:Cargo.toml#dependencies","kind":"struct","path":"Cargo.toml","lines":[8,8]},
{"id":"s:Cargo.toml#package","kind":"struct","path":"Cargo.toml","lines":[1,6]},
{"id":"s:Cargo.toml#package.description","kind":"fn","path":"Cargo.toml","lines":[5,5]},
{"id":"s:Cargo.toml#package.edition","kind":"fn","path":"Cargo.toml","lines":[4,4]},
{"id":"s:Cargo.toml#package.license","kind":"fn","path":"Cargo.toml","lines":[6,6]},
{"id":"s:Cargo.toml#package.name","kind":"fn","path":"Cargo.toml","lines":[2,2]},
{"id":"s:Cargo.toml#package.version","kind":"fn","path":"Cargo.toml","lines":[3,3]},
{"id":"s:config.toml#orders","kind":"struct","path":"config.toml","lines":[5,6]},
{"id":"s:config.toml#orders.folder","kind":"fn","path":"config.toml","lines":[6,6]},
{"id":"s:config.toml#screen","kind":"struct","path":"config.toml","lines":[1,3]},
{"id":"s:config.toml#screen.currency","kind":"fn","path":"config.toml","lines":[3,3]},
{"id":"s:config.toml#screen.title","kind":"fn","path":"config.toml","lines":[2,2]},
{"id":"s:src/main.rs#main","kind":"fn","path":"src/main.rs","lines":[5,10]},
{"id":"s:src/store.rs#Order","kind":"struct","path":"src/store.rs","lines":[4,8]},
{"id":"s:src/store.rs#checksum","kind":"fn","path":"src/store.rs","lines":[22,24]},
{"id":"s:src/store.rs#encode","kind":"fn","path":"src/store.rs","lines":[17,19]},
{"id":"s:src/store.rs#save","kind":"fn","path":"src/store.rs","lines":[11,14]},
{"id":"s:src/util.rs#greet","kind":"fn","path":"src/util.rs","lines":[2,4]},
{"id":"s:src/util.rs#title_case","kind":"fn","path":"src/util.rs","lines":[7,13]},
{"id":"s:tools/report.py#main","kind":"fn","path":"tools/report.py","lines":[12,14]},
{"id":"s:tools/report.py#read_orders","kind":"fn","path":"tools/report.py","lines":[6,9]},
{"id":"s:web/app.ts#Line","kind":"interface","path":"web/app.ts","lines":[3,7]},
{"id":"s:web/app.ts#renderGreeting","kind":"fn","path":"web/app.ts","lines":[10,12]},
{"id":"s:web/app.ts#renderReceipt","kind":"fn","path":"web/app.ts","lines":[15,19]},
{"id":"s:web/format.ts#formatName","kind":"fn","path":"web/format.ts","lines":[7,9]},
{"id":"s:web/format.ts#formatPrice","kind":"fn","path":"web/format.ts","lines":[2,4]}],"edges":[
{"src":"m:Cargo.toml","edge":"contains","dst":"s:Cargo.toml#dependencies","confidence":"exact"},
{"src":"m:Cargo.toml","edge":"contains","dst":"s:Cargo.toml#package","confidence":"exact"},
{"src":"m:Cargo.toml","edge":"contains","dst":"s:Cargo.toml#package.description","confidence":"exact"},
{"src":"m:Cargo.toml","edge":"contains","dst":"s:Cargo.toml#package.edition","confidence":"exact"},
{"src":"m:Cargo.toml","edge":"contains","dst":"s:Cargo.toml#package.license","confidence":"exact"},
{"src":"m:Cargo.toml","edge":"contains","dst":"s:Cargo.toml#package.name","confidence":"exact"},
{"src":"m:Cargo.toml","edge":"contains","dst":"s:Cargo.toml#package.version","confidence":"exact"},
{"src":"m:README.md","edge":"contains","dst":"d:README.md#Configuration","confidence":"exact"},
{"src":"m:README.md","edge":"contains","dst":"d:README.md#Orders","confidence":"exact"},
{"src":"m:README.md","edge":"contains","dst":"d:README.md#Run","confidence":"exact"},
{"src":"m:README.md","edge":"contains","dst":"d:README.md#kiosk","confidence":"exact"},
{"src":"m:config.toml","edge":"contains","dst":"s:config.toml#orders","confidence":"exact"},
{"src":"m:config.toml","edge":"contains","dst":"s:config.toml#orders.folder","confidence":"exact"},
{"src":"m:config.toml","edge":"contains","dst":"s:config.toml#screen","confidence":"exact"},
{"src":"m:config.toml","edge":"contains","dst":"s:config.toml#screen.currency","confidence":"exact"},
{"src":"m:config.toml","edge":"contains","dst":"s:config.toml#screen.title","confidence":"exact"},
{"src":"m:src/main.rs","edge":"contains","dst":"s:src/main.rs#main","confidence":"exact"},
{"src":"m:src/main.rs","edge":"imports","dst":"m:src/store.rs","confidence":"exact"},
{"src":"m:src/main.rs","edge":"imports","dst":"m:src/util.rs","confidence":"exact"},
{"src":"m:src/store.rs","edge":"contains","dst":"s:src/store.rs#Order","confidence":"exact"},
{"src":"m:src/store.rs","edge":"contains","dst":"s:src/store.rs#checksum","confidence":"exact"},
{"src":"m:src/store.rs","edge":"contains","dst":"s:src/store.rs#encode","confidence":"exact"},
{"src":"m:src/store.rs","edge":"contains","dst":"s:src/store.rs#save","confidence":"exact"},
{"src":"m:src/util.rs","edge":"contains","dst":"s:src/util.rs#greet","confidence":"exact"},
{"src":"m:src/util.rs","edge":"contains","dst":"s:src/util.rs#title_case","confidence":"exact"},
{"src":"m:tools/report.py","edge":"calls","dst":"s:tools/report.py#main","confidence":"name"},
{"src":"m:tools/report.py","edge":"contains","dst":"s:tools/report.py#main","confidence":"exact"},
{"src":"m:tools/report.py","edge":"contains","dst":"s:tools/report.py#read_orders","confidence":"exact"},
{"src":"m:web/app.ts","edge":"contains","dst":"s:web/app.ts#Line","confidence":"exact"},
{"src":"m:web/app.ts","edge":"contains","dst":"s:web/app.ts#renderGreeting","confidence":"exact"},
{"src":"m:web/app.ts","edge":"contains","dst":"s:web/app.ts#renderReceipt","confidence":"exact"},
{"src":"m:web/app.ts","edge":"imports","dst":"s:web/format.ts#formatName","confidence":"exact"},
{"src":"m:web/app.ts","edge":"imports","dst":"s:web/format.ts#formatPrice","confidence":"exact"},
{"src":"m:web/format.ts","edge":"contains","dst":"s:web/format.ts#formatName","confidence":"exact"},
{"src":"m:web/format.ts","edge":"contains","dst":"s:web/format.ts#formatPrice","confidence":"exact"},
{"src":"s:src/main.rs#main","edge":"calls","dst":"s:src/store.rs#save","confidence":"name"},
{"src":"s:src/main.rs#main","edge":"calls","dst":"s:src/util.rs#greet","confidence":"name"},
{"src":"s:src/store.rs#encode","edge":"calls","dst":"s:src/store.rs#checksum","confidence":"name"},
{"src":"s:src/store.rs#save","edge":"calls","dst":"s:src/store.rs#encode","confidence":"name"},
{"src":"s:src/util.rs#greet","edge":"calls","dst":"s:src/util.rs#title_case","confidence":"name"},
{"src":"s:tools/report.py#main","edge":"calls","dst":"s:tools/report.py#read_orders","confidence":"name"},
{"src":"s:web/app.ts#renderGreeting","edge":"calls","dst":"s:web/format.ts#formatName","confidence":"name"},
{"src":"s:web/app.ts#renderReceipt","edge":"calls","dst":"s:web/format.ts#formatPrice","confidence":"name"}]}Errors and exit codes
dctx map read m:nope.rs
An id that is not in the index: the gone page on stdout, exit 1, two lines on stderr.
$ dctx map read m:nope.rs# kiosk readgone m:nope.rs Error: map: m:nope.rs is not in the indexhint: the file may be missing, ignored, sensitive or renamed; list current ids with `dctx map find <name>`
dctx map read m:.env
A sensitive file is not in the index at all.
$ dctx map read m:.env# kiosk readgone m:.env Error: map: m:.env is not in the indexhint: the file may be missing, ignored, sensitive or renamed; list current ids with `dctx map find <name>`
dctx map find ''
An empty query is a usage error, exit 2.
$ dctx map find '' Error: map: this verb requires a target; next: correct the request or source input and retry; use dctx map --help for optionshint: pass a non-empty name or phrase, for example: dctx map find alpha