# Docs

## How does it work?

Printfile makes a temporary file with the source of the target file in a directory in your home dir (`~/printfile`) which will be opened and you will be prompted to print. When you select an option, the file will be deleted.

## Install

```bash
npm i print-file # -g if you want a global CLI command, may require prepending sudo
```

## API Example

```javascript
const print = require('print-file')

print({ includeName:true })
```

### Parameters

<table><thead><tr><th>Name</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>options</td><td>Options object</td><td>object</td><td>false</td></tr><tr><td>options.includeName</td><td>Inculde file name at top of page</td><td>bool</td><td>false</td></tr><tr><td>options.file</td><td>File to print. If omitted, it will print the file the function is called from.</td><td>string</td><td>false</td></tr><tr><td>options.portOverride</td><td>Run printer on custom port. Defaults to <code>9991</code>.</td><td>number</td><td>false</td></tr></tbody></table>

## CLI

```bash
pf './file' includeName
```

### Parameters

<table><thead><tr><th>Name</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>file</td><td>The file to print</td><td>string</td><td>true</td></tr><tr><td>includeName</td><td>Inculde file name at top of page</td><td>bool</td><td>false</td></tr></tbody></table>


---

# 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://printfile.coolstone.dev/docs.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.
