|
1 | | -# CLAUDE.md |
| 1 | +# dkdc-links |
2 | 2 |
|
3 | | -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
4 | | - |
5 | | -## Overview |
6 | | - |
7 | | -dkdc-links is a Rust CLI tool for managing terminal bookmarks. Users define aliases, links, and groups in a TOML config file, then open them via command line. |
| 3 | +Bookmarks in your terminal. |
8 | 4 |
|
9 | 5 | ## Commands |
10 | 6 |
|
11 | 7 | ```bash |
12 | | -# Development |
13 | | -cargo build # Build debug binary |
14 | | -cargo run # Run the CLI |
15 | | -cargo run -- link1 alias1 # Open specific links/aliases |
16 | | - |
17 | | -# Quality checks |
18 | | -./bin/check.sh # Format, clippy, and check |
19 | | -cargo fmt # Format code |
20 | | -cargo clippy # Lint |
21 | | - |
22 | | -# Testing |
23 | | -./bin/test.sh # Run tests and build release |
24 | | -cargo test --all-features # Run tests only |
25 | | - |
26 | | -# Release |
27 | | -./bin/release.sh # Clean build and publish to crates.io |
| 8 | +bin/build # Build all (Rust + Python) |
| 9 | +bin/build-rs # Build Rust crate |
| 10 | +bin/build-py # Build Python bindings (maturin develop) |
| 11 | +bin/check # Run all checks (format, lint, test) |
| 12 | +bin/check-rs # Rust checks (fmt, clippy, test) |
| 13 | +bin/check-py # Python checks (ruff) |
| 14 | +bin/test # Run all tests |
| 15 | +bin/test-rs # Rust tests |
| 16 | +bin/format # Format all code |
| 17 | +bin/install # Install CLI (Rust + Python) |
28 | 18 | ``` |
29 | 19 |
|
30 | 20 | ## Architecture |
31 | 21 |
|
32 | | -- `src/main.rs` - CLI entry point using clap for argument parsing |
33 | | -- `src/config.rs` - Config loading/saving from `~/.config/dkdc/links/config.toml` |
34 | | -- `src/open.rs` - Link resolution (alias → link → URI) and opening via system browser |
| 22 | +``` |
| 23 | +dkdc-links/ # Core Rust crate (standalone, not in monorepo workspace) |
| 24 | + src/lib.rs # Library root |
| 25 | + src/main.rs # Binary entry point |
| 26 | + src/cli.rs # CLI (clap), optional `gui` subcommand |
| 27 | + src/config.rs # Config loading/saving (~/.config/dkdc/links/config.toml) |
| 28 | + src/open.rs # Link resolution (alias → link → URI) |
| 29 | + src/gui.rs # iced GUI (behind `gui` feature flag) |
| 30 | +dkdc-links-py/ # PyO3 bindings (cdylib) |
| 31 | +src/dkdc_links/ # Python wrapper |
| 32 | +``` |
35 | 33 |
|
36 | 34 | Config structure: aliases map to links, links map to URIs, groups expand to multiple aliases/links. |
0 commit comments