just-bash 2.1.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/README.md +8 -4
  2. package/dist/AGENTS.md +4 -2
  3. package/dist/bin/chunks/{alias-ZAQAKC5X.js → alias-PCMLRCRW.js} +1 -1
  4. package/dist/bin/chunks/{awk2-A73ZNFXJ.js → awk2-D2US2LMM.js} +1 -1
  5. package/dist/bin/{shell/chunks/base64-JPITV4MD.js → chunks/base64-RJX7MYGG.js} +1 -1
  6. package/dist/bin/{shell/chunks/basename-IYEP3AMY.js → chunks/basename-SO5MVUEX.js} +1 -1
  7. package/dist/bin/chunks/{bash-WZYHIZP6.js → bash-UT3MT5UU.js} +1 -1
  8. package/dist/bin/{shell/chunks/cat-XILYL7NW.js → chunks/cat-7TVSOZLU.js} +1 -1
  9. package/dist/bin/{shell/chunks/chmod-EXWX4N7Y.js → chunks/chmod-3DIKREF7.js} +1 -1
  10. package/dist/bin/chunks/{chunk-WEONT2KP.js → chunk-ACRTDIBO.js} +1 -1
  11. package/dist/bin/chunks/chunk-KGOUQS5A.js +2 -0
  12. package/dist/bin/chunks/chunk-OQRRF62X.js +10 -0
  13. package/dist/bin/chunks/chunk-QSDVMMYI.js +21 -0
  14. package/dist/bin/chunks/{clear-2APRIRCF.js → clear-CI7A5IXQ.js} +1 -1
  15. package/dist/bin/chunks/column-TSFEMTG6.js +8 -0
  16. package/dist/bin/chunks/{comm-KY3COLF5.js → comm-CPIFQTKY.js} +1 -1
  17. package/dist/bin/{shell/chunks/cp-HES4UN7K.js → chunks/cp-XXWRVG2D.js} +1 -1
  18. package/dist/bin/chunks/{curl-BN5M3BUX.js → curl-LCMREE7R.js} +1 -1
  19. package/dist/bin/chunks/{cut-JSIPAKOX.js → cut-VCKWLT2T.js} +1 -1
  20. package/dist/bin/chunks/{date-CU4J7GHI.js → date-IQLPMFYI.js} +1 -1
  21. package/dist/bin/{shell/chunks/diff-W4JRNHXW.js → chunks/diff-GI3QVUGD.js} +1 -1
  22. package/dist/bin/chunks/{dirname-UTCUUILN.js → dirname-EES7TR26.js} +1 -1
  23. package/dist/bin/chunks/{du-2JU3PUTM.js → du-ZONJJZUK.js} +1 -1
  24. package/dist/bin/{shell/chunks/echo-HKLPYMNC.js → chunks/echo-WSKTON6U.js} +1 -1
  25. package/dist/bin/chunks/{env-2SBJNP7X.js → env-YLLSNZZN.js} +1 -1
  26. package/dist/bin/chunks/expand-77K5HH2M.js +11 -0
  27. package/dist/bin/chunks/{expr-M74QZQ6C.js → expr-RMGXYNQJ.js} +1 -1
  28. package/dist/bin/{shell/chunks/file-QPD3U2H7.js → chunks/file-XMPFXMUJ.js} +1 -1
  29. package/dist/bin/{shell/chunks/find-TRBVCSI6.js → chunks/find-P6UQXFKX.js} +1 -1
  30. package/dist/bin/chunks/fold-452R4I2C.js +12 -0
  31. package/dist/bin/{shell/chunks/grep-BEZRXAWL.js → chunks/grep-L5HBHEEQ.js} +1 -1
  32. package/dist/bin/chunks/{gzip-VLTXZB2V.js → gzip-MNCJB6OR.js} +1 -1
  33. package/dist/bin/chunks/{head-YGMY3DHE.js → head-DYK37Z24.js} +1 -1
  34. package/dist/bin/chunks/{help-UEF7LW7F.js → help-7C5JICNL.js} +1 -1
  35. package/dist/bin/{shell/chunks/history-OGBCIAR5.js → chunks/history-G5C2J2OY.js} +1 -1
  36. package/dist/bin/chunks/{hostname-CV7CGKRN.js → hostname-WXDKRL2Z.js} +1 -1
  37. package/dist/bin/chunks/{html-to-markdown-HTGML4TH.js → html-to-markdown-EPEXKI4B.js} +1 -1
  38. package/dist/bin/chunks/join-3IXMEGNA.js +14 -0
  39. package/dist/bin/chunks/{jq-DT3MD2GZ.js → jq-MTQKMJJI.js} +1 -1
  40. package/dist/bin/chunks/{ln-RUR4ALOJ.js → ln-EFFNQ3RY.js} +1 -1
  41. package/dist/bin/chunks/{ls-GU5227KE.js → ls-FSSC77F4.js} +1 -1
  42. package/dist/bin/chunks/{md5sum-C7WDEYN5.js → md5sum-VGXAOUBA.js} +1 -1
  43. package/dist/bin/chunks/{mkdir-4OYU22AA.js → mkdir-XJABRAUN.js} +1 -1
  44. package/dist/bin/chunks/{mv-H3S4FEWR.js → mv-3ATZ2ABL.js} +1 -1
  45. package/dist/bin/chunks/nl-DSM3NUGM.js +17 -0
  46. package/dist/bin/{shell/chunks/od-TXTSFFJY.js → chunks/od-SLM7SRWU.js} +1 -1
  47. package/dist/bin/chunks/{paste-HHCFASL4.js → paste-FT6WBQZG.js} +1 -1
  48. package/dist/bin/chunks/{printf-2JFCUFOA.js → printf-HWUQKYUM.js} +1 -1
  49. package/dist/bin/{shell/chunks/pwd-T5Q3JEBO.js → chunks/pwd-53KG2MCJ.js} +1 -1
  50. package/dist/bin/chunks/{readlink-M44TLMFS.js → readlink-VL3R4LAM.js} +1 -1
  51. package/dist/bin/chunks/rev-VP42N2JN.js +7 -0
  52. package/dist/bin/chunks/{rm-R4M647EC.js → rm-2PKAWTSQ.js} +1 -1
  53. package/dist/bin/{shell/chunks/sed-QLLAZYHH.js → chunks/sed-5LQMJYRJ.js} +1 -1
  54. package/dist/bin/chunks/{seq-GJMQM7SP.js → seq-AVK43XM2.js} +1 -1
  55. package/dist/bin/chunks/{sha1sum-WKCGV66X.js → sha1sum-BIUH233Z.js} +1 -1
  56. package/dist/bin/{shell/chunks/sha256sum-3ZDGP5WC.js → chunks/sha256sum-SUIK2MT2.js} +1 -1
  57. package/dist/bin/chunks/{sleep-OJPODQGM.js → sleep-O5BOTJGJ.js} +1 -1
  58. package/dist/bin/chunks/{sort-JL33INQB.js → sort-J5ARYV56.js} +1 -1
  59. package/dist/bin/chunks/split-JJFZRWRC.js +16 -0
  60. package/dist/bin/chunks/sqlite3-J2DBDCKT.js +36 -0
  61. package/dist/bin/{shell/chunks/stat-CR2INBC2.js → chunks/stat-UEQ7KMY5.js} +1 -1
  62. package/dist/bin/chunks/strings-ZEKN6D4Q.js +14 -0
  63. package/dist/bin/chunks/{tac-F4GC3MAI.js → tac-KNRFDAY7.js} +1 -1
  64. package/dist/bin/chunks/{tail-BYPLMYMZ.js → tail-BES27CZT.js} +1 -1
  65. package/dist/bin/chunks/{tee-HOMRRC3X.js → tee-ZFIT2GTM.js} +1 -1
  66. package/dist/bin/{shell/chunks/timeout-MYKG34DQ.js → chunks/timeout-JED4EKFH.js} +1 -1
  67. package/dist/bin/{shell/chunks/touch-3ZANYAXI.js → chunks/touch-TSNAXMZ2.js} +1 -1
  68. package/dist/bin/{shell/chunks/tr-E66N7IS2.js → chunks/tr-MBLEXZBI.js} +1 -1
  69. package/dist/bin/chunks/{tree-EE2PYIMV.js → tree-ESVATRDW.js} +1 -1
  70. package/dist/bin/chunks/{true-OWPVS7U4.js → true-OVATH2SQ.js} +1 -1
  71. package/dist/bin/chunks/unexpand-BFVYAPOU.js +11 -0
  72. package/dist/bin/chunks/{uniq-F5NP3LLU.js → uniq-7JNZWE5D.js} +1 -1
  73. package/dist/bin/chunks/{wc-NBMNJDZL.js → wc-OFU3HUEZ.js} +1 -1
  74. package/dist/bin/chunks/{which-6MRG2UCF.js → which-73KOOLC6.js} +1 -1
  75. package/dist/bin/chunks/xan-ASGSTJP4.js +140 -0
  76. package/dist/bin/chunks/xan-view-YGORUYA2.js +2 -0
  77. package/dist/bin/chunks/{xargs-EMY5BOJ2.js → xargs-WIJC4RTG.js} +1 -1
  78. package/dist/bin/chunks/yq-MF2SNFGL.js +287 -0
  79. package/dist/bin/just-bash.js +42 -42
  80. package/dist/bin/shell/chunks/{alias-ZAQAKC5X.js → alias-PCMLRCRW.js} +1 -1
  81. package/dist/bin/shell/chunks/{awk2-A73ZNFXJ.js → awk2-D2US2LMM.js} +1 -1
  82. package/dist/bin/{chunks/base64-JPITV4MD.js → shell/chunks/base64-RJX7MYGG.js} +1 -1
  83. package/dist/bin/{chunks/basename-IYEP3AMY.js → shell/chunks/basename-SO5MVUEX.js} +1 -1
  84. package/dist/bin/shell/chunks/{bash-WZYHIZP6.js → bash-UT3MT5UU.js} +1 -1
  85. package/dist/bin/{chunks/cat-XILYL7NW.js → shell/chunks/cat-7TVSOZLU.js} +1 -1
  86. package/dist/bin/{chunks/chmod-EXWX4N7Y.js → shell/chunks/chmod-3DIKREF7.js} +1 -1
  87. package/dist/bin/shell/chunks/{chunk-WEONT2KP.js → chunk-ACRTDIBO.js} +1 -1
  88. package/dist/bin/shell/chunks/chunk-KGOUQS5A.js +2 -0
  89. package/dist/bin/shell/chunks/chunk-OQRRF62X.js +10 -0
  90. package/dist/bin/shell/chunks/chunk-QSDVMMYI.js +21 -0
  91. package/dist/bin/shell/chunks/{clear-2APRIRCF.js → clear-CI7A5IXQ.js} +1 -1
  92. package/dist/bin/shell/chunks/column-TSFEMTG6.js +8 -0
  93. package/dist/bin/shell/chunks/{comm-KY3COLF5.js → comm-CPIFQTKY.js} +1 -1
  94. package/dist/bin/{chunks/cp-HES4UN7K.js → shell/chunks/cp-XXWRVG2D.js} +1 -1
  95. package/dist/bin/shell/chunks/{curl-BN5M3BUX.js → curl-LCMREE7R.js} +1 -1
  96. package/dist/bin/shell/chunks/{cut-JSIPAKOX.js → cut-VCKWLT2T.js} +1 -1
  97. package/dist/bin/shell/chunks/{date-CU4J7GHI.js → date-IQLPMFYI.js} +1 -1
  98. package/dist/bin/{chunks/diff-W4JRNHXW.js → shell/chunks/diff-GI3QVUGD.js} +1 -1
  99. package/dist/bin/shell/chunks/{dirname-UTCUUILN.js → dirname-EES7TR26.js} +1 -1
  100. package/dist/bin/shell/chunks/{du-2JU3PUTM.js → du-ZONJJZUK.js} +1 -1
  101. package/dist/bin/{chunks/echo-HKLPYMNC.js → shell/chunks/echo-WSKTON6U.js} +1 -1
  102. package/dist/bin/shell/chunks/{env-2SBJNP7X.js → env-YLLSNZZN.js} +1 -1
  103. package/dist/bin/shell/chunks/expand-77K5HH2M.js +11 -0
  104. package/dist/bin/shell/chunks/{expr-M74QZQ6C.js → expr-RMGXYNQJ.js} +1 -1
  105. package/dist/bin/{chunks/file-QPD3U2H7.js → shell/chunks/file-XMPFXMUJ.js} +1 -1
  106. package/dist/bin/{chunks/find-TRBVCSI6.js → shell/chunks/find-P6UQXFKX.js} +1 -1
  107. package/dist/bin/shell/chunks/fold-452R4I2C.js +12 -0
  108. package/dist/bin/{chunks/grep-BEZRXAWL.js → shell/chunks/grep-L5HBHEEQ.js} +1 -1
  109. package/dist/bin/shell/chunks/{gzip-VLTXZB2V.js → gzip-MNCJB6OR.js} +1 -1
  110. package/dist/bin/shell/chunks/{head-YGMY3DHE.js → head-DYK37Z24.js} +1 -1
  111. package/dist/bin/shell/chunks/{help-UEF7LW7F.js → help-7C5JICNL.js} +1 -1
  112. package/dist/bin/{chunks/history-OGBCIAR5.js → shell/chunks/history-G5C2J2OY.js} +1 -1
  113. package/dist/bin/shell/chunks/{hostname-CV7CGKRN.js → hostname-WXDKRL2Z.js} +1 -1
  114. package/dist/bin/shell/chunks/{html-to-markdown-HTGML4TH.js → html-to-markdown-EPEXKI4B.js} +1 -1
  115. package/dist/bin/shell/chunks/join-3IXMEGNA.js +14 -0
  116. package/dist/bin/shell/chunks/{jq-DT3MD2GZ.js → jq-MTQKMJJI.js} +1 -1
  117. package/dist/bin/shell/chunks/{ln-RUR4ALOJ.js → ln-EFFNQ3RY.js} +1 -1
  118. package/dist/bin/shell/chunks/{ls-GU5227KE.js → ls-FSSC77F4.js} +1 -1
  119. package/dist/bin/shell/chunks/{md5sum-C7WDEYN5.js → md5sum-VGXAOUBA.js} +1 -1
  120. package/dist/bin/shell/chunks/{mkdir-4OYU22AA.js → mkdir-XJABRAUN.js} +1 -1
  121. package/dist/bin/shell/chunks/{mv-H3S4FEWR.js → mv-3ATZ2ABL.js} +1 -1
  122. package/dist/bin/shell/chunks/nl-DSM3NUGM.js +17 -0
  123. package/dist/bin/{chunks/od-TXTSFFJY.js → shell/chunks/od-SLM7SRWU.js} +1 -1
  124. package/dist/bin/shell/chunks/{paste-HHCFASL4.js → paste-FT6WBQZG.js} +1 -1
  125. package/dist/bin/shell/chunks/{printf-2JFCUFOA.js → printf-HWUQKYUM.js} +1 -1
  126. package/dist/bin/{chunks/pwd-T5Q3JEBO.js → shell/chunks/pwd-53KG2MCJ.js} +1 -1
  127. package/dist/bin/shell/chunks/{readlink-M44TLMFS.js → readlink-VL3R4LAM.js} +1 -1
  128. package/dist/bin/shell/chunks/rev-VP42N2JN.js +7 -0
  129. package/dist/bin/shell/chunks/{rm-R4M647EC.js → rm-2PKAWTSQ.js} +1 -1
  130. package/dist/bin/{chunks/sed-QLLAZYHH.js → shell/chunks/sed-5LQMJYRJ.js} +1 -1
  131. package/dist/bin/shell/chunks/{seq-GJMQM7SP.js → seq-AVK43XM2.js} +1 -1
  132. package/dist/bin/shell/chunks/{sha1sum-WKCGV66X.js → sha1sum-BIUH233Z.js} +1 -1
  133. package/dist/bin/{chunks/sha256sum-3ZDGP5WC.js → shell/chunks/sha256sum-SUIK2MT2.js} +1 -1
  134. package/dist/bin/shell/chunks/{sleep-OJPODQGM.js → sleep-O5BOTJGJ.js} +1 -1
  135. package/dist/bin/shell/chunks/{sort-JL33INQB.js → sort-J5ARYV56.js} +1 -1
  136. package/dist/bin/shell/chunks/split-JJFZRWRC.js +16 -0
  137. package/dist/bin/shell/chunks/sqlite3-J2DBDCKT.js +36 -0
  138. package/dist/bin/{chunks/stat-CR2INBC2.js → shell/chunks/stat-UEQ7KMY5.js} +1 -1
  139. package/dist/bin/shell/chunks/strings-ZEKN6D4Q.js +14 -0
  140. package/dist/bin/shell/chunks/{tac-F4GC3MAI.js → tac-KNRFDAY7.js} +1 -1
  141. package/dist/bin/shell/chunks/{tail-BYPLMYMZ.js → tail-BES27CZT.js} +1 -1
  142. package/dist/bin/shell/chunks/{tee-HOMRRC3X.js → tee-ZFIT2GTM.js} +1 -1
  143. package/dist/bin/{chunks/timeout-MYKG34DQ.js → shell/chunks/timeout-JED4EKFH.js} +1 -1
  144. package/dist/bin/{chunks/touch-3ZANYAXI.js → shell/chunks/touch-TSNAXMZ2.js} +1 -1
  145. package/dist/bin/{chunks/tr-E66N7IS2.js → shell/chunks/tr-MBLEXZBI.js} +1 -1
  146. package/dist/bin/shell/chunks/{tree-EE2PYIMV.js → tree-ESVATRDW.js} +1 -1
  147. package/dist/bin/shell/chunks/{true-OWPVS7U4.js → true-OVATH2SQ.js} +1 -1
  148. package/dist/bin/shell/chunks/unexpand-BFVYAPOU.js +11 -0
  149. package/dist/bin/shell/chunks/{uniq-F5NP3LLU.js → uniq-7JNZWE5D.js} +1 -1
  150. package/dist/bin/shell/chunks/{wc-NBMNJDZL.js → wc-OFU3HUEZ.js} +1 -1
  151. package/dist/bin/shell/chunks/{which-6MRG2UCF.js → which-73KOOLC6.js} +1 -1
  152. package/dist/bin/shell/chunks/xan-ASGSTJP4.js +140 -0
  153. package/dist/bin/shell/chunks/xan-view-YGORUYA2.js +2 -0
  154. package/dist/bin/shell/chunks/{xargs-EMY5BOJ2.js → xargs-WIJC4RTG.js} +1 -1
  155. package/dist/bin/shell/chunks/yq-MF2SNFGL.js +287 -0
  156. package/dist/bin/shell/shell.js +66 -66
  157. package/dist/bundle/browser.js +486 -394
  158. package/dist/bundle/chunks/{alias-JFIUWFGE.js → alias-4UGRF4DM.js} +1 -1
  159. package/dist/bundle/chunks/{awk2-QWBT4IFJ.js → awk2-46RTIZKB.js} +1 -1
  160. package/dist/bundle/chunks/{base64-TUA2XORD.js → base64-F5R4G5EG.js} +1 -1
  161. package/dist/bundle/chunks/{basename-5UVU5RXR.js → basename-CFA5ZIGT.js} +1 -1
  162. package/dist/bundle/chunks/{bash-BASUPKHJ.js → bash-ZILV3VHA.js} +1 -1
  163. package/dist/bundle/chunks/{cat-47EP4IAV.js → cat-CE7XIAD2.js} +1 -1
  164. package/dist/bundle/chunks/{chmod-XJXFAD4M.js → chmod-FBHLEIY6.js} +1 -1
  165. package/dist/bundle/chunks/{chunk-OQ2MSNPG.js → chunk-4JO5BKO4.js} +1 -1
  166. package/dist/bundle/chunks/chunk-DXB73IDG.js +1 -0
  167. package/dist/bundle/chunks/chunk-SYMJJMQ4.js +20 -0
  168. package/dist/bundle/chunks/chunk-U4UYWYTO.js +9 -0
  169. package/dist/bundle/chunks/{clear-XD3TJRVQ.js → clear-VT2LJIDX.js} +1 -1
  170. package/dist/bundle/chunks/column-XPDNNO5Y.js +7 -0
  171. package/dist/bundle/chunks/{comm-KSJ4BBRQ.js → comm-AXQM7FFF.js} +1 -1
  172. package/dist/bundle/chunks/{cp-37OVLNLD.js → cp-PBJT3GBF.js} +1 -1
  173. package/dist/bundle/chunks/{curl-C43O5WQS.js → curl-TVZH24MD.js} +1 -1
  174. package/dist/bundle/chunks/{cut-FIZRELKC.js → cut-MCCSW2TZ.js} +1 -1
  175. package/dist/bundle/chunks/{date-NN5C354M.js → date-PN3CMG7K.js} +1 -1
  176. package/dist/bundle/chunks/{diff-GLRVCAKJ.js → diff-ZLJYSBRK.js} +1 -1
  177. package/dist/bundle/chunks/{dirname-U2KVUSQY.js → dirname-YPJLCQYA.js} +1 -1
  178. package/dist/bundle/chunks/{du-KRAFOIQK.js → du-3NURMGXT.js} +1 -1
  179. package/dist/bundle/chunks/{echo-WUKBESC7.js → echo-VUHWYV6L.js} +1 -1
  180. package/dist/bundle/chunks/{env-MSPSPGCD.js → env-EG5SQSAQ.js} +1 -1
  181. package/dist/bundle/chunks/expand-VSTNOVF5.js +10 -0
  182. package/dist/bundle/chunks/{expr-HYOCSWK6.js → expr-DG4E7SIS.js} +1 -1
  183. package/dist/bundle/chunks/{file-LQXX6P4Y.js → file-AWZ3TUFP.js} +1 -1
  184. package/dist/bundle/chunks/{find-GM7FJ4D3.js → find-QJDJJ5KW.js} +1 -1
  185. package/dist/bundle/chunks/fold-6CFXIPYZ.js +11 -0
  186. package/dist/bundle/chunks/{grep-ZJVDG3FA.js → grep-4K5T3MYL.js} +1 -1
  187. package/dist/bundle/chunks/{gzip-UQS7KRTV.js → gzip-7QAS5P2Y.js} +1 -1
  188. package/dist/bundle/chunks/{head-6PAUYCDP.js → head-FZ6IQHYW.js} +1 -1
  189. package/dist/bundle/chunks/{help-5E6PYJWQ.js → help-75YOGKM4.js} +1 -1
  190. package/dist/bundle/chunks/{history-SG6VRATI.js → history-MQDK2OPD.js} +1 -1
  191. package/dist/bundle/chunks/{hostname-K4BA3P6X.js → hostname-NWR32CGF.js} +1 -1
  192. package/dist/bundle/chunks/{html-to-markdown-ZSZ34PAN.js → html-to-markdown-ZK6GQVSL.js} +1 -1
  193. package/dist/bundle/chunks/join-X3QYPZUA.js +13 -0
  194. package/dist/bundle/chunks/{jq-NZZAXGBX.js → jq-QAA4WF2O.js} +1 -1
  195. package/dist/bundle/chunks/{ln-XFYHBIFL.js → ln-Y7YB677N.js} +1 -1
  196. package/dist/bundle/chunks/{ls-JGYJQA2Y.js → ls-CS3TIKWR.js} +1 -1
  197. package/dist/bundle/chunks/{md5sum-PIH6F3O3.js → md5sum-LJHKXLVT.js} +1 -1
  198. package/dist/bundle/chunks/{mkdir-HA2FJX4O.js → mkdir-7UKY4B3B.js} +1 -1
  199. package/dist/bundle/chunks/{mv-7I62SB3I.js → mv-FXHEKRTB.js} +1 -1
  200. package/dist/bundle/chunks/nl-KWQGFZH5.js +16 -0
  201. package/dist/bundle/chunks/{od-SOCTFI2F.js → od-ECWXNUB4.js} +1 -1
  202. package/dist/bundle/chunks/{paste-QBGVCQFT.js → paste-QTGVEPH5.js} +1 -1
  203. package/dist/bundle/chunks/{printf-HBP44PXI.js → printf-VG2POOXB.js} +1 -1
  204. package/dist/bundle/chunks/{pwd-CEF235GL.js → pwd-AC4P3JKI.js} +1 -1
  205. package/dist/bundle/chunks/{readlink-MQIMKDSA.js → readlink-EM4O3U4P.js} +1 -1
  206. package/dist/bundle/chunks/rev-FKUV5GH5.js +6 -0
  207. package/dist/bundle/chunks/{rm-NF3FNLAY.js → rm-I2SRVF7H.js} +1 -1
  208. package/dist/bundle/chunks/{sed-H2RWPMTM.js → sed-ZKODWZ6F.js} +1 -1
  209. package/dist/bundle/chunks/{seq-VKYIUOPJ.js → seq-5VRIVQYP.js} +1 -1
  210. package/dist/bundle/chunks/{sha1sum-HVHNZSEC.js → sha1sum-NRUZZ4Q6.js} +1 -1
  211. package/dist/bundle/chunks/{sha256sum-REOOJORK.js → sha256sum-5ZGJ4NJL.js} +1 -1
  212. package/dist/bundle/chunks/{sleep-AFN3PHJW.js → sleep-AK4QE4WR.js} +1 -1
  213. package/dist/bundle/chunks/{sort-XODGFZC4.js → sort-PMLMEZ4E.js} +1 -1
  214. package/dist/bundle/chunks/split-YBTFW7MT.js +15 -0
  215. package/dist/bundle/chunks/sqlite3-RCPUSN3E.js +35 -0
  216. package/dist/bundle/chunks/{stat-FVFLDQGP.js → stat-IVQBBOKN.js} +1 -1
  217. package/dist/bundle/chunks/strings-LRU5XCFP.js +13 -0
  218. package/dist/bundle/chunks/{tac-VIFKNLII.js → tac-2X4JLF4W.js} +1 -1
  219. package/dist/bundle/chunks/{tail-QXKYHAML.js → tail-PD4RZR6J.js} +1 -1
  220. package/dist/bundle/chunks/{tee-W5HCCBPO.js → tee-2QU4NRSJ.js} +1 -1
  221. package/dist/bundle/chunks/{timeout-XAA3N7CF.js → timeout-X3X3N6IE.js} +1 -1
  222. package/dist/bundle/chunks/{touch-FOE745V2.js → touch-MVQSKQKT.js} +1 -1
  223. package/dist/bundle/chunks/{tr-LMLGE4IE.js → tr-EDGW5FG6.js} +1 -1
  224. package/dist/bundle/chunks/{tree-WBUGLVP5.js → tree-5TYW7S7K.js} +1 -1
  225. package/dist/bundle/chunks/{true-6LGCG4EY.js → true-CNJ54NE6.js} +1 -1
  226. package/dist/bundle/chunks/unexpand-I7A2VXFD.js +10 -0
  227. package/dist/bundle/chunks/{uniq-7PFWPNWK.js → uniq-ONGDGSEB.js} +1 -1
  228. package/dist/bundle/chunks/{wc-GV5WUREX.js → wc-Y5MNUNQQ.js} +1 -1
  229. package/dist/bundle/chunks/{which-KHFYPBWW.js → which-M5MQ6QXQ.js} +1 -1
  230. package/dist/bundle/chunks/xan-B3RI2BDO.js +139 -0
  231. package/dist/bundle/chunks/xan-view-33AU6NPN.js +1 -0
  232. package/dist/bundle/chunks/{xargs-NQBNFMCT.js → xargs-2IMBHM4N.js} +1 -1
  233. package/dist/bundle/chunks/yq-KANM4MD2.js +286 -0
  234. package/dist/bundle/index.js +27 -27
  235. package/dist/commands/column/column.d.ts +9 -0
  236. package/dist/commands/expand/expand.d.ts +10 -0
  237. package/dist/commands/expand/unexpand.d.ts +10 -0
  238. package/dist/commands/fold/fold.d.ts +10 -0
  239. package/dist/commands/join/join.d.ts +10 -0
  240. package/dist/commands/nl/nl.d.ts +10 -0
  241. package/dist/commands/registry.d.ts +1 -1
  242. package/dist/commands/rev/rev.d.ts +11 -0
  243. package/dist/commands/split/split.d.ts +10 -0
  244. package/dist/commands/sqlite3/formatters.d.ts +15 -0
  245. package/dist/commands/sqlite3/sqlite3.d.ts +8 -0
  246. package/dist/commands/strings/strings.d.ts +10 -0
  247. package/dist/commands/xan/aggregation.d.ts +20 -0
  248. package/dist/commands/xan/csv.d.ts +16 -0
  249. package/dist/commands/xan/moonblade-parser.d.ts +80 -0
  250. package/dist/commands/xan/moonblade-to-jq.d.ts +12 -0
  251. package/dist/commands/xan/subcommands.d.ts +15 -0
  252. package/dist/commands/xan/xan-agg.d.ts +8 -0
  253. package/dist/commands/xan/xan-columns.d.ts +8 -0
  254. package/dist/commands/xan/xan-core.d.ts +10 -0
  255. package/dist/commands/xan/xan-data.d.ts +52 -0
  256. package/dist/commands/xan/xan-filter.d.ts +8 -0
  257. package/dist/commands/xan/xan-map.d.ts +11 -0
  258. package/dist/commands/xan/xan-reshape.d.ts +40 -0
  259. package/dist/commands/xan/xan-simple.d.ts +40 -0
  260. package/dist/commands/xan/xan-utils.d.ts +19 -0
  261. package/dist/commands/xan/xan-view.d.ts +12 -0
  262. package/dist/commands/xan/xan.d.ts +8 -0
  263. package/package.json +3 -1
  264. package/dist/bin/chunks/chunk-SJXDWN5X.js +0 -2
  265. package/dist/bin/chunks/yq-XRJR6BNP.js +0 -304
  266. package/dist/bin/shell/chunks/chunk-SJXDWN5X.js +0 -2
  267. package/dist/bin/shell/chunks/yq-XRJR6BNP.js +0 -304
  268. package/dist/bundle/chunks/chunk-2RUN43TJ.js +0 -1
  269. package/dist/bundle/chunks/yq-63LJU3AR.js +0 -303
@@ -0,0 +1,9 @@
1
+ /**
2
+ * column - columnate lists
3
+ *
4
+ * Usage: column [OPTION]... [FILE]...
5
+ *
6
+ * Columnate input. Fill rows first by default, or create a table with -t.
7
+ */
8
+ import type { Command } from "../../types.js";
9
+ export declare const column: Command;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * expand - convert tabs to spaces
3
+ *
4
+ * Usage: expand [OPTION]... [FILE]...
5
+ *
6
+ * Convert TABs in each FILE to spaces, writing to standard output.
7
+ * If no FILE is specified, standard input is read.
8
+ */
9
+ import type { Command } from "../../types.js";
10
+ export declare const expand: Command;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * unexpand - convert spaces to tabs
3
+ *
4
+ * Usage: unexpand [OPTION]... [FILE]...
5
+ *
6
+ * Convert blanks in each FILE to TABs, writing to standard output.
7
+ * If no FILE is specified, standard input is read.
8
+ */
9
+ import type { Command } from "../../types.js";
10
+ export declare const unexpand: Command;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * fold - wrap each input line to fit in specified width
3
+ *
4
+ * Usage: fold [OPTION]... [FILE]...
5
+ *
6
+ * Wrap input lines in each FILE, writing to standard output.
7
+ * If no FILE is specified, standard input is read.
8
+ */
9
+ import type { Command } from "../../types.js";
10
+ export declare const fold: Command;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * join - join lines of two files on a common field
3
+ *
4
+ * Usage: join [OPTION]... FILE1 FILE2
5
+ *
6
+ * For each pair of input lines with identical join fields, write a line to
7
+ * standard output. The default join field is the first, delimited by blanks.
8
+ */
9
+ import type { Command } from "../../types.js";
10
+ export declare const join: Command;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * nl - number lines of files
3
+ *
4
+ * Usage: nl [OPTION]... [FILE]...
5
+ *
6
+ * Write each FILE to standard output, with line numbers added.
7
+ * If no FILE is specified, standard input is read.
8
+ */
9
+ import type { Command } from "../../types.js";
10
+ export declare const nl: Command;
@@ -1,6 +1,6 @@
1
1
  import type { Command } from "../types.js";
2
2
  /** All available built-in command names (excludes network commands like curl) */
3
- export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "clear" | "bash" | "sh" | "jq" | "base64" | "diff" | "date" | "sleep" | "timeout" | "seq" | "expr" | "md5sum" | "sha1sum" | "sha256sum" | "file" | "html-to-markdown" | "help" | "which" | "tac" | "hostname" | "od" | "gzip" | "gunzip" | "zcat" | "yq";
3
+ export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "rev" | "nl" | "fold" | "expand" | "unexpand" | "strings" | "split" | "column" | "join" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "clear" | "bash" | "sh" | "jq" | "base64" | "diff" | "date" | "sleep" | "timeout" | "seq" | "expr" | "md5sum" | "sha1sum" | "sha256sum" | "file" | "html-to-markdown" | "help" | "which" | "tac" | "hostname" | "od" | "gzip" | "gunzip" | "zcat" | "yq" | "xan" | "sqlite3";
4
4
  /** Network command names (only available when network is configured) */
5
5
  export type NetworkCommandName = "curl";
6
6
  /** All command names including network commands */
@@ -0,0 +1,11 @@
1
+ /**
2
+ * rev - reverse lines characterwise
3
+ *
4
+ * Usage: rev [file ...]
5
+ *
6
+ * Copies the specified files to standard output, reversing the order
7
+ * of characters in every line. If no files are specified, standard
8
+ * input is read.
9
+ */
10
+ import type { Command } from "../../types.js";
11
+ export declare const rev: Command;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * split - split a file into pieces
3
+ *
4
+ * Usage: split [OPTION]... [FILE [PREFIX]]
5
+ *
6
+ * Output pieces of FILE to PREFIXaa, PREFIXab, ...;
7
+ * default size is 1000 lines, and default PREFIX is 'x'.
8
+ */
9
+ import type { Command } from "../../types.js";
10
+ export declare const split: Command;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Output formatters for sqlite3 command
3
+ */
4
+ export type OutputMode = "list" | "csv" | "json" | "line" | "column" | "table" | "markdown" | "tabs" | "box" | "quote" | "html" | "ascii";
5
+ export interface FormatOptions {
6
+ mode: OutputMode;
7
+ header: boolean;
8
+ separator: string;
9
+ nullValue: string;
10
+ newline: string;
11
+ }
12
+ /**
13
+ * Format query results according to the specified options
14
+ */
15
+ export declare function formatOutput(columns: string[], rows: unknown[][], options: FormatOptions): string;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * sqlite3 - SQLite database CLI
3
+ *
4
+ * Wraps better-sqlite3 to provide SQLite database access through the virtual filesystem.
5
+ * Databases are loaded from buffers and written back after modifications.
6
+ */
7
+ import type { Command } from "../../types.js";
8
+ export declare const sqlite3Command: Command;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * strings - print the sequences of printable characters in files
3
+ *
4
+ * Usage: strings [OPTION]... [FILE]...
5
+ *
6
+ * For each FILE, print the printable character sequences that are at least
7
+ * MIN characters long. If no FILE is specified, standard input is read.
8
+ */
9
+ import type { Command } from "../../types.js";
10
+ export declare const strings: Command;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Aggregation functions for xan command
3
+ */
4
+ import { type EvaluateOptions } from "../query-engine/index.js";
5
+ import type { CsvData, CsvRow } from "./csv.js";
6
+ /** Aggregation specification from parsed expression */
7
+ export interface AggSpec {
8
+ func: string;
9
+ expr: string;
10
+ alias: string;
11
+ }
12
+ /**
13
+ * Parse aggregation expression: "func(expr) as alias" or "func(expr)"
14
+ * Handles nested parentheses in expressions like sum(add(a, b))
15
+ */
16
+ export declare function parseAggExpr(expr: string): AggSpec[];
17
+ /** Compute aggregation on data */
18
+ export declare function computeAgg(data: CsvData, spec: AggSpec, evalOptions?: EvaluateOptions): number | string | boolean | null;
19
+ /** Build aggregation result row */
20
+ export declare function buildAggRow(data: CsvData, specs: AggSpec[], evalOptions?: EvaluateOptions): CsvRow;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * CSV parsing and formatting utilities for xan command
3
+ */
4
+ import type { CommandContext, ExecResult } from "../../types.js";
5
+ export interface CsvRow {
6
+ [key: string]: string | number | boolean | null;
7
+ }
8
+ export type CsvData = CsvRow[];
9
+ /** Format array of row objects back to CSV string */
10
+ export declare function formatCsv(headers: string[], data: CsvData): string;
11
+ /** Read CSV input from file or stdin */
12
+ export declare function readCsvInput(args: string[], ctx: CommandContext): Promise<{
13
+ headers: string[];
14
+ data: CsvData;
15
+ error?: ExecResult;
16
+ }>;
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Moonblade expression parser for xan
3
+ *
4
+ * Parses moonblade expressions (xan's expression language) and transforms
5
+ * them to jq AST for evaluation by the shared query engine.
6
+ *
7
+ * Grammar based on xan's grammar.pest
8
+ */
9
+ export type MoonbladeExpr = {
10
+ type: "int";
11
+ value: number;
12
+ } | {
13
+ type: "float";
14
+ value: number;
15
+ } | {
16
+ type: "string";
17
+ value: string;
18
+ } | {
19
+ type: "bool";
20
+ value: boolean;
21
+ } | {
22
+ type: "null";
23
+ } | {
24
+ type: "identifier";
25
+ name: string;
26
+ unsure: boolean;
27
+ } | {
28
+ type: "underscore";
29
+ } | {
30
+ type: "func";
31
+ name: string;
32
+ args: Array<{
33
+ name?: string;
34
+ expr: MoonbladeExpr;
35
+ }>;
36
+ } | {
37
+ type: "list";
38
+ elements: MoonbladeExpr[];
39
+ } | {
40
+ type: "map";
41
+ entries: Array<{
42
+ key: string;
43
+ value: MoonbladeExpr;
44
+ }>;
45
+ } | {
46
+ type: "regex";
47
+ pattern: string;
48
+ caseInsensitive: boolean;
49
+ } | {
50
+ type: "slice";
51
+ start?: MoonbladeExpr;
52
+ end?: MoonbladeExpr;
53
+ } | {
54
+ type: "lambda";
55
+ params: string[];
56
+ body: MoonbladeExpr;
57
+ } | {
58
+ type: "lambdaBinding";
59
+ name: string;
60
+ } | {
61
+ type: "pipeline";
62
+ exprs: MoonbladeExpr[];
63
+ };
64
+ export interface NamedExpr {
65
+ expr: MoonbladeExpr;
66
+ name: string | string[];
67
+ }
68
+ export interface Aggregation {
69
+ aggName: string;
70
+ funcName: string;
71
+ args: MoonbladeExpr[];
72
+ }
73
+ /**
74
+ * Parse named expressions like: "expr1, expr2 as name, expr3 as (a, b)"
75
+ */
76
+ export declare function parseNamedExpressions(input: string): NamedExpr[];
77
+ /**
78
+ * Parse a moonblade expression string into AST
79
+ */
80
+ export declare function parseMoonblade(input: string): MoonbladeExpr;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Transform moonblade AST to jq AST
3
+ *
4
+ * This module converts moonblade expressions (xan's expression language)
5
+ * to jq AST for evaluation by the shared query engine.
6
+ */
7
+ import type { AstNode } from "../query-engine/parser.js";
8
+ import type { MoonbladeExpr } from "./moonblade-parser.js";
9
+ /**
10
+ * Transform moonblade AST to jq AST
11
+ */
12
+ export declare function moonbladeToJq(expr: MoonbladeExpr, rowContext?: boolean): AstNode;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Barrel file for xan subcommand handlers
3
+ *
4
+ * This file re-exports all subcommands from their individual modules
5
+ * for cleaner organization and easier maintenance.
6
+ */
7
+ export { cmdAgg, cmdFrequency, cmdGroupby, cmdStats } from "./xan-agg.js";
8
+ export { cmdDrop, cmdEnum, cmdRename, cmdSelect } from "./xan-columns.js";
9
+ export { cmdCount, cmdHead, cmdHeaders, cmdReverse, cmdSlice, cmdTail, } from "./xan-core.js";
10
+ export { cmdFixlengths, cmdFrom, cmdPartition, cmdShuffle, cmdSplit, cmdTo, cmdTranspose, } from "./xan-data.js";
11
+ export { cmdDedup, cmdFilter, cmdSort, cmdTop } from "./xan-filter.js";
12
+ export { cmdMap, cmdTransform } from "./xan-map.js";
13
+ export { cmdExplode, cmdImplode, cmdJoin, cmdMerge, cmdPivot, } from "./xan-reshape.js";
14
+ export { cmdBehead, cmdCat, cmdFlatmap, cmdFmt, cmdSample, cmdSearch, } from "./xan-simple.js";
15
+ export { cmdFlatten, cmdView } from "./xan-view.js";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Aggregation commands: agg, groupby, frequency, stats
3
+ */
4
+ import type { CommandContext, ExecResult } from "../../types.js";
5
+ export declare function cmdAgg(args: string[], ctx: CommandContext): Promise<ExecResult>;
6
+ export declare function cmdGroupby(args: string[], ctx: CommandContext): Promise<ExecResult>;
7
+ export declare function cmdFrequency(args: string[], ctx: CommandContext): Promise<ExecResult>;
8
+ export declare function cmdStats(args: string[], ctx: CommandContext): Promise<ExecResult>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Column operation commands: select, drop, rename, enum
3
+ */
4
+ import type { CommandContext, ExecResult } from "../../types.js";
5
+ export declare function cmdSelect(args: string[], ctx: CommandContext): Promise<ExecResult>;
6
+ export declare function cmdDrop(args: string[], ctx: CommandContext): Promise<ExecResult>;
7
+ export declare function cmdRename(args: string[], ctx: CommandContext): Promise<ExecResult>;
8
+ export declare function cmdEnum(args: string[], ctx: CommandContext): Promise<ExecResult>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Core xan commands: headers, count, head, tail, slice, reverse
3
+ */
4
+ import type { CommandContext, ExecResult } from "../../types.js";
5
+ export declare function cmdHeaders(args: string[], ctx: CommandContext): Promise<ExecResult>;
6
+ export declare function cmdCount(args: string[], ctx: CommandContext): Promise<ExecResult>;
7
+ export declare function cmdHead(args: string[], ctx: CommandContext): Promise<ExecResult>;
8
+ export declare function cmdTail(args: string[], ctx: CommandContext): Promise<ExecResult>;
9
+ export declare function cmdSlice(args: string[], ctx: CommandContext): Promise<ExecResult>;
10
+ export declare function cmdReverse(args: string[], ctx: CommandContext): Promise<ExecResult>;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Data utility commands: transpose, shuffle, fixlengths, split, partition
3
+ * Commands that exist in real xan
4
+ */
5
+ import type { CommandContext, ExecResult } from "../../types.js";
6
+ /**
7
+ * Transpose: swap rows and columns
8
+ * Usage: xan transpose [FILE]
9
+ * First column becomes header row, first row becomes header column
10
+ */
11
+ export declare function cmdTranspose(args: string[], ctx: CommandContext): Promise<ExecResult>;
12
+ /**
13
+ * Shuffle: randomly reorder rows
14
+ * Usage: xan shuffle [OPTIONS] [FILE]
15
+ * --seed N Random seed for reproducibility
16
+ */
17
+ export declare function cmdShuffle(args: string[], ctx: CommandContext): Promise<ExecResult>;
18
+ /**
19
+ * Fixlengths: fix ragged CSV by padding/truncating rows
20
+ * Usage: xan fixlengths [OPTIONS] [FILE]
21
+ * -l, --length N Target number of columns (default: max row length)
22
+ * -d, --default V Default value for missing fields (default: empty)
23
+ */
24
+ export declare function cmdFixlengths(args: string[], ctx: CommandContext): Promise<ExecResult>;
25
+ /**
26
+ * Split: split CSV into multiple files by row count
27
+ * Usage: xan split [OPTIONS] FILE
28
+ * -c, --chunks N Split into N equal chunks
29
+ * -S, --size N Split into chunks of N rows each
30
+ * -o, --output DIR Output directory (default: current)
31
+ *
32
+ * In sandbox mode, outputs as JSON with parts as array
33
+ */
34
+ export declare function cmdSplit(args: string[], ctx: CommandContext): Promise<ExecResult>;
35
+ /**
36
+ * Partition: split CSV by column value into separate outputs
37
+ * Usage: xan partition COLUMN [OPTIONS] [FILE]
38
+ * -o, --output DIR Output directory (default: current)
39
+ */
40
+ export declare function cmdPartition(args: string[], ctx: CommandContext): Promise<ExecResult>;
41
+ /**
42
+ * To: convert CSV to other formats
43
+ * Usage: xan to FORMAT [OPTIONS] [FILE]
44
+ * FORMAT: json
45
+ */
46
+ export declare function cmdTo(args: string[], ctx: CommandContext): Promise<ExecResult>;
47
+ /**
48
+ * From: convert other formats to CSV
49
+ * Usage: xan from [OPTIONS] [FILE]
50
+ * -f, --format FORMAT Input format (json)
51
+ */
52
+ export declare function cmdFrom(args: string[], ctx: CommandContext): Promise<ExecResult>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Filter and sort commands: filter, sort, dedup, top
3
+ */
4
+ import type { CommandContext, ExecResult } from "../../types.js";
5
+ export declare function cmdFilter(args: string[], ctx: CommandContext): Promise<ExecResult>;
6
+ export declare function cmdSort(args: string[], ctx: CommandContext): Promise<ExecResult>;
7
+ export declare function cmdDedup(args: string[], ctx: CommandContext): Promise<ExecResult>;
8
+ export declare function cmdTop(args: string[], ctx: CommandContext): Promise<ExecResult>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Map command: add computed columns
3
+ */
4
+ import type { CommandContext, ExecResult } from "../../types.js";
5
+ export declare function cmdMap(args: string[], ctx: CommandContext): Promise<ExecResult>;
6
+ /**
7
+ * Transform command: modify existing columns in-place
8
+ * Usage: xan transform COLUMN EXPR [FILE]
9
+ * -r, --rename NAME Rename the column after transformation
10
+ */
11
+ export declare function cmdTransform(args: string[], ctx: CommandContext): Promise<ExecResult>;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Reshape commands: explode, implode, flatmap, pivot, join, merge
3
+ */
4
+ import type { CommandContext, ExecResult } from "../../types.js";
5
+ /**
6
+ * Explode: split delimited column values into multiple rows
7
+ * Usage: xan explode COLUMN [OPTIONS] [FILE]
8
+ * -s, --separator SEP Value separator (default: |)
9
+ * --drop-empty Drop rows where column is empty
10
+ * -r, --rename NAME Rename the column
11
+ */
12
+ export declare function cmdExplode(args: string[], ctx: CommandContext): Promise<ExecResult>;
13
+ /**
14
+ * Implode: combine consecutive rows with same key, joining column values
15
+ * Usage: xan implode COLUMN [OPTIONS] [FILE]
16
+ * -s, --separator SEP Value separator (default: |)
17
+ * -r, --rename NAME Rename the column
18
+ */
19
+ export declare function cmdImplode(args: string[], ctx: CommandContext): Promise<ExecResult>;
20
+ /**
21
+ * Join: join two CSV files on key columns
22
+ * Usage: xan join KEY1 FILE1 KEY2 FILE2 [OPTIONS]
23
+ * --left Left outer join (keep all rows from first file)
24
+ * --right Right outer join (keep all rows from second file)
25
+ * --full Full outer join (keep all rows from both files)
26
+ * -D, --default VALUE Default value for missing fields
27
+ */
28
+ export declare function cmdJoin(args: string[], ctx: CommandContext): Promise<ExecResult>;
29
+ /**
30
+ * Pivot: reshape data by turning row values into columns
31
+ * Usage: xan pivot COLUMN AGG_EXPR [OPTIONS] [FILE]
32
+ * -g, --groupby COLS Group by these columns (default: all other columns)
33
+ */
34
+ export declare function cmdPivot(args: string[], ctx: CommandContext): Promise<ExecResult>;
35
+ /**
36
+ * Merge: merge multiple sorted CSV files
37
+ * Usage: xan merge [OPTIONS] FILE1 FILE2 ...
38
+ * -s, --sort COLUMN Sort column (files must be pre-sorted by this)
39
+ */
40
+ export declare function cmdMerge(args: string[], ctx: CommandContext): Promise<ExecResult>;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Simple commands: behead, sample, cat, search, flatmap, fmt
3
+ */
4
+ import type { CommandContext, ExecResult } from "../../types.js";
5
+ /**
6
+ * Behead: remove header row from CSV (output data rows only)
7
+ * Usage: xan behead [FILE]
8
+ */
9
+ export declare function cmdBehead(args: string[], ctx: CommandContext): Promise<ExecResult>;
10
+ /**
11
+ * Sample: randomly sample N rows from CSV
12
+ * Usage: xan sample [OPTIONS] <sample-size> [FILE]
13
+ * --seed SEED Random seed for reproducibility
14
+ */
15
+ export declare function cmdSample(args: string[], ctx: CommandContext): Promise<ExecResult>;
16
+ /**
17
+ * Cat: concatenate CSV files
18
+ * Usage: xan cat [OPTIONS] FILE1 FILE2 ...
19
+ * -p, --pad Pad missing columns with empty values
20
+ */
21
+ export declare function cmdCat(args: string[], ctx: CommandContext): Promise<ExecResult>;
22
+ /**
23
+ * Search: filter rows by regex match on any/specific columns
24
+ * Usage: xan search [OPTIONS] PATTERN [FILE]
25
+ * -s, --select COLS Only search in these columns
26
+ * -v, --invert Invert match (exclude matching rows)
27
+ * -i, --ignore-case Case insensitive match
28
+ */
29
+ export declare function cmdSearch(args: string[], ctx: CommandContext): Promise<ExecResult>;
30
+ /**
31
+ * Flatmap: like map but expression can return multiple rows
32
+ * Usage: xan flatmap EXPR [FILE]
33
+ * The expression should return an array; each element becomes a row
34
+ */
35
+ export declare function cmdFlatmap(args: string[], ctx: CommandContext): Promise<ExecResult>;
36
+ /**
37
+ * Fmt: format CSV as a table (alias for view with options)
38
+ * Usage: xan fmt [OPTIONS] [FILE]
39
+ */
40
+ export declare function cmdFmt(args: string[], ctx: CommandContext): Promise<ExecResult>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Shared utilities for xan subcommands
3
+ */
4
+ import type { AstNode } from "../query-engine/parser.js";
5
+ /**
6
+ * Parse a moonblade expression and transform to jq AST
7
+ */
8
+ export declare function parseMoonbladeExpr(expr: string): AstNode;
9
+ /**
10
+ * Parse column specification which can include:
11
+ * - Column names (e.g., "name,email")
12
+ * - Column indices (e.g., "0,2")
13
+ * - Numeric ranges (e.g., "0-2" means columns 0, 1, 2)
14
+ * - Column name ranges (e.g., "name:email" means columns from name to email)
15
+ * - Glob patterns (e.g., "vec_*", "*_count")
16
+ * - Negation (e.g., "!name" excludes column)
17
+ * Returns an array of column names
18
+ */
19
+ export declare function parseColumnSpec(spec: string, headers: string[]): string[];
@@ -0,0 +1,12 @@
1
+ /**
2
+ * View commands: pretty print CSV as table or flattened records
3
+ */
4
+ import type { CommandContext, ExecResult } from "../../types.js";
5
+ /**
6
+ * Flatten: display records vertically, one field per line
7
+ * Usage: xan flatten [OPTIONS] [FILE]
8
+ * -l, --limit N Maximum number of rows to display
9
+ * -s, --select COLS Select columns to display
10
+ */
11
+ export declare function cmdFlatten(args: string[], ctx: CommandContext): Promise<ExecResult>;
12
+ export declare function cmdView(args: string[], ctx: CommandContext): Promise<ExecResult>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * xan - CSV toolkit command
3
+ *
4
+ * Provides ergonomic CLI for CSV operations, translating commands to jq expressions
5
+ * and using the shared query engine. Inspired by xsv and xan tools.
6
+ */
7
+ import type { Command } from "../../types.js";
8
+ export declare const xanCommand: Command;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "just-bash",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "description": "A simulated bash environment with virtual filesystem",
5
5
  "repository": {
6
6
  "type": "git",
@@ -52,6 +52,7 @@
52
52
  "license": "Apache-2.0",
53
53
  "devDependencies": {
54
54
  "@biomejs/biome": "^2.3.10",
55
+ "@types/better-sqlite3": "^7.6.11",
55
56
  "@types/ini": "^4.1.1",
56
57
  "@types/node": "^25.0.3",
57
58
  "@types/papaparse": "^5.5.2",
@@ -63,6 +64,7 @@
63
64
  "vitest": "^4.0.16"
64
65
  },
65
66
  "dependencies": {
67
+ "better-sqlite3": "^11.9.1",
66
68
  "diff": "^8.0.2",
67
69
  "fast-xml-parser": "^5.3.3",
68
70
  "file-type": "^21.2.0",
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var l=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&f(a,d,{get:()=>b[d],enumerable:!(e=h(b,d))||e.enumerable});return a};var o=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c};