valaq.1 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. .\" valaq.1 - VAPI File Query Tool man page
  2. .\"
  3. .\" Copyright (C) 2023 Valaq Project
  4. .\" License: GPLv3
  5. .\"
  6. .TH VALAQ 1 "2023-12-10" "valaq 1.0.0" "User Commands"
  7. .SH NAME
  8. valaq \- VAPI File Query Tool for exploring Vala API files
  9. .SH SYNOPSIS
  10. .B valaq
  11. [\fIOPTIONS\fR] [\fIVAPI_FILE\fR] [\fISYMBOL_PATH\fR...]
  12. .SH DESCRIPTION
  13. .B valaq
  14. is a powerful command-line tool for querying and exploring VAPI (Vala API) files.
  15. It provides hierarchical navigation of symbols within VAPI files with support for both
  16. human-readable and JSON output formats. Built with libvala for accurate VAPI parsing
  17. and symbol extraction.
  18. When run without arguments,
  19. .B valaq
  20. lists all available VAPI files in the standard search paths. When a VAPI file is
  21. specified, it displays the symbols contained in that file. Symbol paths can be used
  22. to navigate to specific symbols within the hierarchy.
  23. .SH OPTIONS
  24. .TP
  25. .B \-h, \-\-help
  26. Show this help message and exit.
  27. .TP
  28. .B \-v, \-\-version
  29. Show version information and exit.
  30. .TP
  31. .B \-j, \-\-json
  32. Output in JSON format instead of human-readable text.
  33. .SH ARGUMENTS
  34. .TP
  35. .B VAPI_FILE
  36. Path to a VAPI file to analyze. Can be:
  37. .RS
  38. .IP \(bu 2
  39. Full path: \fI/usr/share/vala/vapi/gtk+-3.0.vapi\fR
  40. .IP \(bu 2
  41. Basename with extension: \fIgtk+-3.0.vapi\fR
  42. .IP \(bu 2
  43. Basename without extension: \fIgtk+-3.0\fR
  44. .RE
  45. .TP
  46. .B SYMBOL_PATH...
  47. Hierarchical path to a symbol. Supports both space-separated and dot-separated paths.
  48. .SH SYMBOL PATH FORMATS
  49. Symbol paths can be specified using spaces or dots as separators:
  50. .TP
  51. Space-separated:
  52. .EX
  53. valaq gtk+-3.0 Gtk Window show
  54. .EE
  55. # Navigates to Gtk -> Window -> show
  56. .TP
  57. Dot-separated:
  58. .EX
  59. valaq gtk+-3.0 Gtk.Window.show
  60. .EE
  61. # Same navigation using dot notation
  62. .TP
  63. Mixed separators:
  64. .EX
  65. valaq gtk+-3.0 Gtk.Window show
  66. .EE
  67. # Combines both formats
  68. .SH SUPPORTED SYMBOL TYPES
  69. .B valaq
  70. supports all major Vala language constructs:
  71. .TP
  72. .B Namespaces
  73. Containers for related symbols
  74. .TP
  75. .B Classes
  76. Object-oriented class definitions
  77. .TP
  78. .B Interfaces
  79. Abstract interfaces for classes
  80. .TP
  81. .B Structs
  82. Value type structures
  83. .TP
  84. .B Enums
  85. Enumeration types with named values
  86. .TP
  87. .B Delegates
  88. Function pointer types
  89. .TP
  90. .B Methods
  91. Member functions with parameters
  92. .TP
  93. .B Properties
  94. Object properties with getters/setters
  95. .TP
  96. .B Fields
  97. Member variables
  98. .TP
  99. .B Constants
  100. Compile-time constant values
  101. .SH VAPI FILE DISCOVERY
  102. .B valaq
  103. automatically searches for VAPI files in standard directories:
  104. .RS
  105. .IP \(bu 2
  106. Primary: \fI/usr/share/vala-0.56/vapi\fR
  107. .IP \(bu 2
  108. Secondary: \fI/usr/share/vala/vapi\fR
  109. .IP \(bu 2
  110. Fallbacks: \fI/usr/share/vala-0.54/vapi\fR, \fI/usr/share/vala/vapi\fR
  111. .RE
  112. Run 'valaq' with no arguments to see all available VAPI files.
  113. .SH OUTPUT FORMATS
  114. .SS Text Output
  115. Human-readable output with hierarchical symbol listing:
  116. .EX
  117. VAPI file: gtk+-3.0.vapi
  118. Symbols:
  119. Gtk
  120. Window
  121. show() -> void
  122. hide() -> void
  123. destroy() -> void
  124. Button
  125. clicked() -> void
  126. set_label(string) -> void
  127. .EE
  128. .SS JSON Output
  129. Structured JSON output for programmatic use:
  130. .EX
  131. {
  132. "result_type": "symbol_details",
  133. "vapi_file": "gtk+-3.0.vapi",
  134. "query_path": ["Gtk", "Window"],
  135. "symbol": {
  136. "name": "Window",
  137. "type": "class",
  138. "access": "public",
  139. "base_types": ["Bin"],
  140. "methods": [
  141. {
  142. "name": "show",
  143. "return_type": "void",
  144. "parameters": []
  145. }
  146. ],
  147. "properties": [...],
  148. "fields": [...]
  149. },
  150. "metadata": {
  151. "vala_version": "0.56",
  152. "timestamp": "2023-..."
  153. }
  154. }
  155. .EE
  156. .SH EXAMPLES
  157. .TP
  158. List all available VAPI files
  159. .EX
  160. valaq
  161. .EE
  162. .TP
  163. List VAPI files in JSON format
  164. .EX
  165. valaq --json
  166. .EE
  167. .TP
  168. List top-level symbols (using basename without extension)
  169. .EX
  170. valaq gtk+-3.0
  171. .EE
  172. .TP
  173. List top-level symbols (using basename with extension)
  174. .EX
  175. valaq gtk+-3.0.vapi
  176. .EE
  177. .TP
  178. List top-level symbols (using full path)
  179. .EX
  180. valaq /usr/share/vala/vapi/gtk+-3.0.vapi
  181. .EE
  182. .TP
  183. Navigate to a class
  184. .EX
  185. valaq gtk+-3.0 Gtk.Window
  186. .EE
  187. .TP
  188. Navigate to a method (dot-separated)
  189. .EX
  190. valaq gtk+-3.0 Gtk.Window.show
  191. .EE
  192. .TP
  193. Navigate to a method (space-separated)
  194. .EX
  195. valaq gtk+-3.0 Gtk Window show
  196. .EE
  197. .TP
  198. Navigate to nested symbols with dots in names
  199. .EX
  200. valaq package-name Namespace.Class
  201. .EE
  202. .TP
  203. Get JSON output for symbol details
  204. .EX
  205. valaq json-glib-1.0 Json.Object --json
  206. .EE
  207. .TP
  208. Explore namespace contents
  209. .EX
  210. valaq gio-2.0 GLib
  211. .EE
  212. .TP
  213. View method details with parameters
  214. .EX
  215. valaq glib-2.0 GLib.Timeout.add
  216. .EE
  217. .TP
  218. Examine enum values
  219. .EX
  220. valaq glib-2.0 GLib.FileType
  221. .EE
  222. .SH EXIT STATUS
  223. .TP
  224. .B 0
  225. Success
  226. .TP
  227. .B 1
  228. General error (invalid arguments, file not found, etc.)
  229. .TP
  230. .B 2
  231. Parse error (invalid VAPI file syntax)
  232. .SH TROUBLESHOOTING
  233. .SS VAPI Files Not Found
  234. If VAPI files are not found:
  235. .RS
  236. .IP \(bu 2
  237. Run 'valaq' with no arguments to see available files
  238. .IP \(bu 2
  239. Use full path: \fIvalaq /path/to/your/file.vapi\fR
  240. .IP \(bu 2
  241. Check if vala development packages are installed
  242. .RE
  243. .SS Symbol Navigation Issues
  244. If symbols are not found:
  245. .RS
  246. .IP \(bu 2
  247. Check symbol name case (case-sensitive)
  248. .IP \(bu 2
  249. List top-level symbols first: \fIvalaq <vapi-file>\fR
  250. .IP \(bu 2
  251. Verify symbol path hierarchy
  252. .RE
  253. .SH SEE ALSO
  254. .BR valac (1),
  255. .BR vala (1)
  256. .SH BUGS
  257. Report bugs to the Valaq project issue tracker at:
  258. https://github.com/valaq/valaq/issues
  259. .SH AUTHOR
  260. .B valaq
  261. was written by the Valaq Project.
  262. This manual page was written for the Valaq Project.
  263. .SH COPYRIGHT
  264. Copyright (C) 2023 Valaq Project
  265. License: GPLv3
  266. This is free software; see the source for copying conditions.