Skip to content

Commit

Permalink
Add guide for command-line usage
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktide082 committed Apr 29, 2024
1 parent 4a3a3b2 commit 46e6614
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/faqs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
tags:
- help
- questions
Expand Down
4 changes: 4 additions & 0 deletions docs/guides/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Guides",
"position": 2
}
51 changes: 51 additions & 0 deletions docs/guides/command-line.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Command Line

You can launch Agent from the command line by running the `agent` executable from your terminal.

## Usage

```
Usage:
agent [options]
Options:
--target="path to executable" Path to executable (run)
--script="path to script" Path to script
--args="command line" Arguments to the executable
--delay=0 [optional] Wait (ms)
--pname="process name" [optional] Attach to process name instead target
```

:::warning

Paths in the `--args` flag need to be escaped, for example `-g \"C:\\path\\to\\game.nsp\"`.

:::

## Examples


### Yuzu

```bash
agent --target="C:\path\to\yuzu.exe" --script="C:\path\to\script.js" --args="-g \"C:\\path\\to\\game.nsp\""
```

### Ryujinx

```bash
agent --target="C:\path\to\Ryujinx.exe" --script="C:\path\to\script.js" --args="\"C:\\path\\to\\game.nsp\""
```

### PC

```bash
# Run -> wait 3s -> attach (for PC games)
agent --target="C:\path\to\game.exe" --script="C:\path\to\script.js" --delay=3000

# Run -> wait 3s -> attach game.bin
agent --target="C:\path\to\game.exe" --script="C:\path\to\script.js" --delay=3000 --pname="game.bin"

# Attach to an existing process
agent --script="C:\path\to\script.js" --pname="<process-name>"
```
2 changes: 1 addition & 1 deletion docs/troubleshooting/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 4
tags:
- help
- troubleshooting
Expand Down

0 comments on commit 46e6614

Please sign in to comment.