3 nitls - search and lists the packages, groups and paths of Nit sources files.
7 nitls [*options*] [*FILE*]...
11 `nitls` is used to search and list Nit files in directories and extract the module-group-package relation.
13 It is basically a `ls`, a `which` or a simple `find` specialized on `.nit` source files.
15 By default `nitls` works with the current directory (`.`).
17 Each file can then be:
19 * A Nit module (file).
20 In this case, only this single module is considered
21 * A Nit group (directory).
22 In this case, all the modules of the groups (and recursively the sub-groups) are considered
24 In this case, all its entries are analysed.
25 Files that are Nit modules and directories that are Nit groups are considered.
26 Other files and directories are ignored.
30 Show the tree of modules from the current directory.
33 test_prog: Test program for model tools. (.)
34 |--game: Gaming group (./game)
35 | `--game: A game abstraction for RPG. (./game/game.nit)
36 |--platform: Fictive Crappy Platform. (./platform)
37 | `--platform: Declares base types allowed on the platform. (./platform/platform.nit)
38 |--rpg: Role Playing Game group (./rpg)
39 | |--careers: Careers of the game. (./rpg/careers.nit)
40 | |--character: Characters are playable entity in the world. (./rpg/character.nit)
41 | |--combat: COmbat interactions between characters. (./rpg/combat.nit)
42 | |--races: Races of the game. (./rpg/races.nit)
43 | `--rpg: A worlg RPG abstraction. (./rpg/rpg.nit)
44 `--test_prog: A test program with a fake model to check model tools. (./test_prog.nit)
47 Show the list of packages imported by the modules of the current directory.
50 base64: Offers the base 64 encoding and decoding algorithms (/home/privat/prog/nit/lib/base64.nit)
51 core: # Nit common library of core classes and methods (/home/privat/prog/nit/lib/core)
52 curl: Data transfer with URL syntax (/home/privat/prog/nit/lib/curl)
53 json (/home/privat/prog/nit/lib/json)
54 libevent: Low-level wrapper around the libevent library to manage events on file descriptors (/home/privat/prog/nit/lib/libevent.nit)
55 md5: Native MD5 digest implementation as `Text::md5` (/home/privat/prog/nit/lib/md5.nit)
56 more_collections: Highly specific, but useful, collections-related classes. (/home/privat/prog/nit/lib/more_collections.nit)
57 nitcc_runtime: Runtime library required by parsers and lexers generated by nitcc (/home/privat/prog/nit/lib/nitcc_runtime.nit)
58 nitcorn: Lightweight framework for Web applications development (.)
59 parser_base: Simple base for hand-made parsers of all kinds (/home/privat/prog/nit/lib/parser_base.nit)
60 performance_analysis: Services to gather information on the performance of events by categories (/home/privat/prog/nit/lib/performance_analysis.nit)
61 realtime: Services to keep time of the wall clock time (/home/privat/prog/nit/lib/realtime.nit)
62 serialization: # Abstract serialization services (/home/privat/prog/nit/lib/serialization)
63 template: Basic template system (/home/privat/prog/nit/lib/template)
65 Show the directory of the package `inkscape_tools`.
67 $ nitls -pP inkscape_tools
68 /home/privat/prog/nit/contrib/inkscape_tools
72 Each combination of option
76 Three presentation modes are available.
79 List packages in a flat list (default).
81 Only package are displayed (and not the individual files).
84 List source files in their groups and packages.
86 Each `.nit` file is presented in a tree of packages and groups.
89 List source files in a flat list.
91 Each `.nit` file is presented individually.
93 The three modes are exclusives.
95 The default mode is `--package` unless one on the argument is a group, then it is `--group`.
99 ### `-r`, `--recursive`
100 Process directories recursively.
102 All `.nit` files found in the specified directory and subdirectories are considered.
104 ### `-d`, `--depends`
105 List dependencies of given modules.
107 All imported modules are also considered.
109 In --tree and --source modes, the modules directly imported are also displayed.
112 Ignore errors and files that are not a Nit source file.
114 When a file that is not a valid Nit module is encountered, it is ignored and the rest of the files are
117 Without this option, an error message is displayed and nitls terminates on such a case.
119 ## PRESENTATION OPTIONS
121 ### `-p`, `--path-only`
122 List only path (instead of name + path).
124 Paths are displayed uncolored.
127 List dependencies suitable for a rule in a Makefile.
129 Alias for `-d`, `-p` and `-s`.
133 The Nit language documentation and the source code of its tools and libraries may be downloaded from <http://nitlanguage.org>