# Command list

A quick-reference guide to all core `pilso` CLI commands.

Use this when you want a fast reminder of syntax or options.

***

### Session Commands

| Command                        | Description                                        |
| ------------------------------ | -------------------------------------------------- |
| `npx pilso`                    | Start the interactive CLI                          |
| `npx pilso start -r <role>`    | Launch a new session with the specified agent role |
| `npx pilso sessions list`      | View past session logs                             |
| `npx pilso sessions view <id>` | View detailed history of a specific session        |

***

### Role Management

| Command                       | Description                         |
| ----------------------------- | ----------------------------------- |
| `npx pilso roles list`        | List all defined roles              |
| `npx pilso roles view <role>` | View the config for a specific role |
| `npx pilso roles add <name>`  | Create a new role via guided prompt |
| `npx pilso roles edit <name>` | Edit a role in your code editor     |

***

### Config Management

| Command                  | Description                          |
| ------------------------ | ------------------------------------ |
| `npx pilso config view`  | View the current `pilso.config.json` |
| `npx pilso config edit`  | Open your config file in the editor  |
| `npx pilso config reset` | Restore default config template      |

***

### Tool Execution

| Command                                      | Description                                                   |
| -------------------------------------------- | ------------------------------------------------------------- |
| `npx pilso call --tool <name> --args <json>` | Directly call any MCP tool without launching an agent session |

Example:

```bash
npx pilso call \
  --tool erc20.balanceOf \
  --args '{"wallet": "0xabc...", "token": "USDC"}'
```

***

### Debugging Flags

| Flag       | Description                                 |
| ---------- | ------------------------------------------- |
| `--log`    | Enable CLI session logging                  |
| `--trace`  | Show full tool call traces and responses    |
| `--silent` | Suppress CLI output (for scripts/pipelines) |

***

### Common Examples

```bash
# Start a deployer agent session
npx pilso start -r deployer

# Call a tool directly (bypass LLM)
npx pilso call --tool solc.compile --args '{"source": "contract A { uint x; }"}'

# View all roles
npx pilso roles list

# Reset config to default
npx pilso config reset
```


---

# 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://docs.pil.so/references/command-list.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.
