Skip to content

Commit 1a78b14

Browse files
authored
Merge pull request #2370 from getappmap/feat/sync-docs-3949893b733a78db6467d58dc27e8d9a715adb0b
feat: Sync docs from applandinc.appmap.io
2 parents 82fad66 + 8fb906a commit 1a78b14

19 files changed

Lines changed: 819 additions & 105 deletions

docs/appmap-docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ By using AppMap data, Navie is the first AI code architect with the context to u
1818

1919
Over 90,000 software developers are using the [AppMap extension for VSCode](https://marketplace.visualstudio.com/items?itemName=appland.appmap) and the [AppMap plugin for JetBrains](https://plugins.jetbrains.com/plugin/16701-appmap).
2020

21-
<a class="btn btn-primary btn-lg" href="/docs/get-started-with-appmap/">Get Started</a>
21+
<a class="btn btn-primary btn-lg" href="/docs/get-started-with-appmap/">Get Started</a> <a class="btn btn-secondary btn-lg" href="/docs/troubleshooting/">Troubleshooting</a>
2222

2323
![AppMap Navie with Sequence diagram in Visual Studio Code](/assets/img/docs/vscode-with-navie-prompt.webp)
2424
_AppMap Navie with Sequence diagram in Visual Studio Code_

docs/get-started-with-appmap/navie-ai-quickstart.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ After you complete the installation of AppMap for your code editor. Open the Nav
2929

3030
To open the Navie Chat, open the AppMap plugin in the sidebar menu for your code editor, and select the `New Navie Chat` option.
3131

32-
![Open Navie](/assets/img/open-navie.webp)
32+
![Open Navie](/assets/img/open-navie.png)
3333

3434
## Ask Navie about your App
3535

@@ -65,6 +65,24 @@ The Navie UI includes a standard chat window, and a context panel which will inc
6565

6666
![Navie Context Window](/assets/img/navie-context-window.webp)
6767

68+
## Review Your Code
69+
70+
You can also use Navie to review your code. This is a great way to get an overview of your codebase, identify potential issues, and improve the quality of your code.
71+
Navie uses the same types of data to perform code review as it does for answering questions, including code snippets, sequence diagrams, traces, and other I/O data.
72+
73+
To start a code review, click the `Review Your Code` button in the Navie sidebar. This will generate a list of suggested improvements for your codebase, including:
74+
75+
![Review Your Code](/assets/img/review_your_code_button.png)
76+
77+
- Potential bugs
78+
- SQL query optimizations
79+
- HTTP request optimizations
80+
- Security vulnerabilities
81+
- Performance improvements
82+
- Code design improvements and anti-patterns
83+
84+
... and more. Because Navie uses AppMap Data, it can provide more accurate and relevant suggestions than other code review tools.
85+
6886
## Improve Navie AI Responses with AppMap Data
6987

7088
Generate AppMap Data and you will greatly improve the quality of your Navie AI responses. With AppMap Data for your project, you can now ask much deeper architectural questions about your application. This is possible because of the additional context from AppMap Data and the higher accuracy and relevance of the code snippets which are relevant to your question.

docs/reference/appmap-airgapped-install.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,13 @@ To open the Output window, on the menu bar, choose View > Output, or in Windows
345345

346346
![Open View in VS Code](/assets/img/docs/vscode-output-1.webp)
347347

348+
When reviewing logs, pay attention to startup errors that might indicate:
349+
- System compatibility issues (e.g., GLIBC version requirements on Linux)
350+
- Permission problems (especially on Windows)
351+
- Temporary directory access restrictions
352+
353+
For detailed information about common error patterns and their solutions, see our [VS Code troubleshooting guide](/docs/troubleshooting/vscode).
354+
348355
Click on the output log dropdown in the right corner to view a list of all the available output logs.
349356

350357
![Open Output logs list](/assets/img/docs/vscode-output-2.webp)
@@ -369,10 +376,18 @@ Next, open `Help` > `Show Log...` will open the IDE log file.
369376

370377
## Support
371378

372-
For help with your offline install of AppMap Navie, please open a new support request by emailing [support@appmap.io](mailto:support@appmap.io)
379+
If you encounter startup issues with the VS Code extension, first check our [troubleshooting guide](/docs/troubleshooting/vscode) for solutions to common problems like:
380+
- Linux GLIBC version compatibility requirements
381+
- Windows temporary directory permissions
382+
- Extension startup failures
373383

374-
Include the following information in your support request.
384+
If you're still experiencing issues with your offline installation of AppMap Navie, please open a new support request by emailing [support@appmap.io](mailto:support@appmap.io)
375385

386+
Include the following information in your support request:
387+
- Any error messages from the VS Code Output panel (AppMap: Services channel)
388+
- Your operating system version and details:
389+
- For Linux: output of `ldd --version`
390+
- For Windows: OS build number and whether VS Code is running as administrator
376391
- Company Name
377392
- Code editor name and version (e.g. VS Code or JetBrains)
378393
- AppMap binary version

docs/reference/appmap-client-cli.md

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@ redirect_from: [docs/reference/appmap-swagger-ruby]
1717
- [Install AppMap CLI Precompiled Binary](#install-appmap-cli-precompiled-binary)
1818
- [Usage](#usage)
1919
- [`install`](#install)
20+
- [`index`](#index)
21+
- [`query`](#query)
22+
- [`rpc`](#rpc)
2023
- [`inspect`](#inspect)
2124
- [`sequence-diagram`](#sequence-diagram)
2225
- [`sequence-diagram-diff`](#sequence-diagram-diff)
2326
- [`openapi`](#openapi)
2427
- [`stats`](#stats)
2528
- [`prune`](#prune)
29+
- [`trim`](#trim)
2630
- [`archive`](#archive)
2731
- [`restore`](#restore)
2832
- [`compare`](#compare)
@@ -99,6 +103,167 @@ The installer changes your project's build process (yarn.lock for
99103
JavaScript, Gemfile for Ruby, etc) to run AppMap when the tests run
100104
and when developing locally. It will not be added to your production system.
101105

106+
## `index`
107+
108+
Use this command to compute fingerprints and update index files for all AppMap Data in a directory. Indexing also builds the query database (`query.db`) that the [`query`](#query) command reads.
109+
110+
### Usage
111+
112+
Run the command in your project directory. It will locate AppMap Data using the `appmap_dir:` setting in `appmap.yml` (or the `--appmap-dir` option), index every AppMap it finds, and exit:
113+
114+
```console
115+
$ appmap index
116+
```
117+
{: .example-code}
118+
119+
The query database is stored outside of your project, at `~/.appmap/data/<sha>/query.db`, where `<sha>` is derived from the resolved path of the AppMap directory. Each AppMap directory therefore gets its own query database. You can override this location with the `--query-db` option.
120+
121+
Re-run `appmap index` after recording new AppMap Data to bring the index and query database up to date. Alternatively, use the `--watch` option to keep the indexer running continuously; it will index new and changed AppMap files as they appear:
122+
123+
```console
124+
$ appmap index --watch
125+
```
126+
{: .example-code}
127+
128+
The `--port` option (which implies `--watch`) additionally starts a JSON-RPC server on the given port. This mode is used by the AppMap code editor extensions and Navie, and is not usually invoked directly.
129+
130+
### Arguments
131+
132+
```
133+
appmap index
134+
135+
Compute fingerprints and update index files for all appmaps in a directory
136+
137+
Options:
138+
--version Show version number [boolean]
139+
-v, --verbose Run with verbose logging [boolean]
140+
--help Show help [boolean]
141+
-d, --directory program working directory [string]
142+
--appmap-dir directory to recursively inspect for AppMaps
143+
-w, --watch watch the directory for changes to appmaps [boolean]
144+
-p, --port port to listen on for JSON-RPC requests [number]
145+
--query-db path to query.db (overrides default
146+
~/.appmap/data/<sha>/query.db) [string]
147+
--log-navie Log Navie events to stderr [boolean] [default: false]
148+
```
149+
150+
## `query`
151+
152+
Use this command to search and analyze indexed AppMap Data. `query` provides a family of subcommands ("verbs") that answer questions about recorded application behavior: which routes were exercised, which requests failed, which functions and SQL queries are slowest, how behavior differs between branches, and more.
153+
154+
`query` reads from the query database built by the [`index`](#index) command, so run `appmap index` first. If the query database is missing, `query` will exit with an error prompting you to build it.
155+
156+
### Query verbs
157+
158+
| Verb | Description |
159+
|------|-------------|
160+
| `endpoints` | Per-route summary table. A good first command for orienting yourself in a set of recordings. |
161+
| `find <type>` | Row-level search across recordings. Types: `appmaps` (alias `recordings`), `requests`, `queries`, `calls`, `exceptions`, `logs`. |
162+
| `tree <appmap>` | Render the call tree of one recording. |
163+
| `related <appmap>` | Rank recordings that are similar to the given recording. |
164+
| `hotspots` | Rank functions or SQL queries by cumulative elapsed time. |
165+
| `compare <branch-a> <branch-b>` | Per-route latency delta between two branches. |
166+
| `mcp` | Run an MCP (Model Context Protocol) server on stdio that exposes the query verbs as tools, for use by AI assistants. |
167+
| `ui` | Launch a local web UI for browsing the query database (dashboard, endpoints, hotspots, traces). |
168+
169+
Run any verb with `--help` for its full set of options:
170+
171+
```console
172+
$ appmap query find --help
173+
```
174+
{: .example-code}
175+
176+
### Common options
177+
178+
Most verbs accept `--appmap-dir` (directory containing the AppMap Data) and `--query-db` (explicit path to the query database), as well as `--json` to emit machine-readable output instead of a formatted table. The `find` verb supports a rich set of filters, including `--route`, `--class`, `--method`, `--status`, `--duration`, `--branch`, `--commit`, `--since`, `--until`, and `--table`.
179+
180+
### Examples
181+
182+
Summarize all recorded routes:
183+
184+
```console
185+
$ appmap query endpoints
186+
```
187+
{: .example-code}
188+
189+
Find failed requests:
190+
191+
```console
192+
$ appmap query find requests --status ">=500"
193+
```
194+
{: .example-code}
195+
196+
Find SQL queries that touch the `users` table, as JSON:
197+
198+
```console
199+
$ appmap query find queries --table users --json
200+
```
201+
{: .example-code}
202+
203+
Rank the slowest functions and SQL queries:
204+
205+
```console
206+
$ appmap query hotspots
207+
```
208+
{: .example-code}
209+
210+
## `rpc`
211+
212+
Use this command to run the AppMap JSON-RPC server. The server exposes AppMap Data and Navie AI methods over JSON-RPC, and is the integration point used by the AppMap code editor extensions. You can also run it directly to integrate AppMap and Navie into your own tools and scripts.
213+
214+
### Usage
215+
216+
```console
217+
$ appmap rpc
218+
```
219+
{: .example-code}
220+
221+
By default the server listens on a port chosen by the operating system (`--port 0`); the selected port number is printed to stdout on startup. Pass an explicit `--port` to use a fixed port.
222+
223+
The server provides JSON-RPC methods for:
224+
225+
- Searching AppMap Data and retrieving AppMap statistics, metadata, data, and sequence diagrams.
226+
- Asking Navie AI questions about your application (`explain`), including managing conversation threads, message attachments, and pinned items.
227+
- Getting and setting configuration, and listing and selecting Navie AI models.
228+
229+
To invoke a single RPC method from the command line without keeping a server running, use the companion `rpc-client` command:
230+
231+
```console
232+
$ appmap rpc-client <function> [request]
233+
```
234+
{: .example-code}
235+
236+
### Arguments
237+
238+
```
239+
appmap rpc
240+
241+
Run AppMap JSON-RPC server
242+
243+
Options:
244+
--version Show version number [boolean]
245+
--help Show help [boolean]
246+
--verbose Verbose output [boolean] [default: false]
247+
-d, --directory program working directory. May be repeated. [array]
248+
--log-navie Log Navie events to stderr [boolean] [default: false]
249+
--ai-option Specify an extended option to the AI provider, in the
250+
form of a key=value pair. May be repeated. [array]
251+
--prompt A file containing custom system prompts to send to the
252+
LLM [string]
253+
--code-editor Active code editor. This information is used to tune
254+
the @help responses. If unspecified, the code editor
255+
may be picked up from environment variables
256+
APPMAP_CODE_EDITOR, TERM_PROGRAM and
257+
TERMINAL_EMULATOR. [string]
258+
--thread-id The thread ID to use for the question. If not
259+
provided, a new thread ID will be allocated. [string]
260+
--trajectory-file File to write the LLM interaction history, in JSONL
261+
format [string]
262+
-p, --port port to listen on for JSON-RPC requests. Use port 0 to
263+
let the OS choose a port. The port number will be
264+
printed to stdout on startup. [number] [default: 0]
265+
```
266+
102267
## `inspect`
103268

104269
Search AppMap Data for references to a code object (package, function, class, query, route, etc) and print available event info.
@@ -463,6 +628,46 @@ $ appmap prune <APPMAP_FILE> --filter eyJjdXJyZW50VmlldyI6InZpZXdTZXF1ZW5jZSIsIm
463628
```
464629
{: .example-code}
465630

631+
## `trim`
632+
633+
Use this command to shrink AppMap files by truncating captured value strings — parameters, return values, receivers, log messages, and exceptions.
634+
635+
Unlike [`prune`](#prune), which removes events from an AppMap, `trim` keeps every event. Only the captured `value` strings are shortened; the call structure, code objects, SQL, and all other properties are untouched. A trimmed AppMap is therefore behaviorally identical to the original, but much smaller — which makes `trim` well suited to preparing AppMap Data for long-term storage, such as committing a baseline to a repository.
636+
637+
### Usage
638+
639+
Pass one or more AppMap files to trim. By default, each file is overwritten in place; use `--output-dir` to write the trimmed files to a different directory instead. The command reports the size reduction for each file:
640+
641+
```console
642+
$ appmap trim tmp/appmap/minitest/*.appmap.json
643+
trim tmp/appmap/minitest/Valid_login_redirect_after_login.appmap.json: 1548288 -> 216430 bytes (14%)
644+
```
645+
{: .example-code}
646+
647+
The `--max-length` option controls how aggressively values are truncated. Plain strings are capped at this length (default: 120 characters), while structured values (objects, arrays, hashes) are budgeted per field, so their overall shape remains readable.
648+
649+
### Arguments
650+
651+
```
652+
appmap trim <files..>
653+
654+
Shrink AppMaps by truncating captured parameter, return, receiver, and message
655+
values
656+
657+
Positionals:
658+
files AppMap file(s) to trim [string]
659+
660+
Options:
661+
--version Show version number [boolean]
662+
-v, --verbose Run with verbose logging [boolean]
663+
--help Show help [boolean]
664+
--max-length Maximum length of a captured value string (structured
665+
values are budgeted per field) [number] [default: 120]
666+
-o, --output-dir Write trimmed AppMaps here (default: overwrite each file in
667+
place) [string]
668+
-d, --directory Working directory for the command [string]
669+
```
670+
466671
## `archive`
467672

468673
Use this command to build a compressed archive of AppMap Data from a directory containing AppMap Data. Running this command without additional options will result in a "full" archive created at `.appmap/archive/full/{git revision}.tar`. Example: `.appmap/archive/full/028e610386f2fc132c93e613f57011825a8ae6e0.tar`

0 commit comments

Comments
 (0)