rag-add(1)
==========

NAME
----
rag-add - Add files to the staging area

SYNOPSIS
--------
[verse]
'rag add' [--force | -f | --reject] [--dry-run] [--all | <files>...]

DESCRIPTION
-----------
Run `rag help chunks` to read documents on chunks and files. It also explains
what staging area and processed files are.

This command adds files to the staging area. Then you have to run `rag build`
to generate chunks from the files in the staging area. It does not follow symlinks.

Below is the behavior of this command according to the flag.

1. `rag add`

|           | processed/modified | processed/not-modified |    staged    |    new    |  n exist  |
|-----------|--------------------|------------------------|--------------|-----------|-----------|
| ignore    | ignore             | ignore                 | ignore       | ignore    | error     |
| n ignore  | stage              | ignore                 | ignore       | stage     | error     |

2. `rag add --reject`

|           | processed/modified | processed/not-modified |    staged    |    new    |  n exist  |
|-----------|--------------------|------------------------|--------------|-----------|-----------|
| ignore    | error              | error                  | error        | error     | error     |
| n ignore  | error              | error                  | error        | stage     | error     |

If any file is erroneous, `rag add --reject` does not alter the knowledge-base.

3. `rag add --force`

|           | processed/modified | processed/not-modified |    staged    |    new    |  n exist  |
|-----------|--------------------|------------------------|--------------|-----------|-----------|
| ignore    | stage              | ignore                 | ignore       | stage     | error     |
| n ignore  | stage              | ignore                 | ignore       | stage     | error     |
