summaryrefslogtreecommitdiff
path: root/README.org
blob: d79a5668a006f08fc00e134b9b141e2f1a843d75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#+TITLE: hashline-tools
* CLI tools for [[https://blog.can.ac/2026/02/12/the-harness-problem][Hashline]]
** Included tools
:PROPERTIES:
:header-args: :results verbatim :exports both :eval never-export
:END:
+ hlcat :: A variant of =cat= that prints the hashline before each line
  #+begin_src sh
hlcat --help
  #+end_src

  #+RESULTS:
  #+begin_example
usage: hlcat [-h] [--start START] [--end END] [files ...]

Print file with hashline prefixes

positional arguments:
  files              Files end print (or stdin if none)

options:
  -h, --help         show this help message and exit
  --start, -s START  Starting line, inclusive (omit for beginning of file)
  --end, -e END      Ending line, exclusive (omit for end of file, negatives exclude lines)
  #+end_example
+ hlgrep :: A variant of =grep= that prints the hashline before each line
    #+begin_src sh
hlgrep --help
  #+end_src
  #+RESULTS:
  #+begin_example
usage: hlgrep [-h] pattern [files ...]

Search for pattern in file with hashline prefixes

positional arguments:
  pattern     Regex pattern to search for
  files       Files to search (or stdin if none)

options:
  -h, --help  show this help message and exit
  #+end_example
+ hlpatch :: A hashline-based editing tool
    #+begin_src sh
hlpatch --help
  #+end_src
  #+RESULTS:
  #+begin_example
usage: hlpatch [-h] [--inplace INPLACE] {replace,append,prepend,delete} ...

Hashline-based editing tool

positional arguments:
  {replace,append,prepend,delete}
    replace             Replace lines
    append              Append lines after position
    prepend             Prepend lines before position
    delete              Delete lines

options:
  -h, --help            show this help message and exit
  --inplace, -i INPLACE
                        Write back to file after editing
  #+end_example
** Prior implementations
+ [[https://github.com/can1357/oh-my-pi/blob/main/packages/coding-agent/src/patch/hashline.ts][Oh-My-Pi]] (the original implementation, TypeScript)
+ [[https://github.com/dwash96/cecli/blob/main/cecli/helpers/hashline.py][Cecli (formerly Aider-CE)]] (Python)