# Project Structure

You can structure your project however you like, however, here is some basic guidance you might find useful.

If you define all your targets in a `./targets` directory like so:

```
./mycli
  └─┬─┬─ targets/
    │ ├─── ip.js
    │ ├─── memory.js
    │ └─── tcpdump.js
    ├─ package.json
    ├─ index.js
    └─ .myclirc
```

Then, in `./index.js` you just need to include the following to auto register any new target file modules.

```javascript
#!/usr/bin/env node
'use strict';

const Targets = require('targets');

Targets.load('./targets/**');

Targets({ name: 'mycli', targets });
```

With this structure in place, so long as each file module inside the `./targets` directory exports a function, the filename (minus the extension) will become the target's name.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://targets.gitbook.io/docs/learn/project_structure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
