---
name: "sellstock-cli"
section: "1"
platform: "linux"
package: "ledgerhelpers"
version: "0.3.10-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/sellstock-cli"
---

# sellstock-cli(1)

record FIFO stock or commodity sales

## NAME

sellstock-cli - record FIFO stock or commodity sales

## SYNOPSIS

**sellstock-cli**

## DESCRIPTION

**sellstock-cli** is a text program for quickly recording commodity sales in a ledger file.

The program first prompts for the account in which the commodity was stored, the account for commissions, and the account to credit for gains and losses, as well as the amount and name of sold commodity, its sale price, and the commission.

Then the program invokes **ledger** to list the dates and prices at which each commodity was purchased, lists them, subtracts the requested amount and shows the result.

Finally, the resulting transaction is shown, asking for a confirmation to save it to the journal.

The program must be supplied with location of the ledger file to work with. The location of the file is determined using the following mechanisms, in this order. The first mechanism which yields a result, wins.

## ENVIRONMENT

The following environment variable is recognized by this program:

- **LEDGER\_FILE**

  Path to ledger file to work with.

## FILES

The config file for [**ledger**(1)](/ledger/1.md), namely file **.ledgerrc** in user's home directory is scanned looking for the following option.

- **--file FILE**

  Path to ledger file to work with.

## SEE ALSO

[**ledger**(1)](/ledger/1.md), [**addtrans**(1)](/addtrans/1.md), [**cleartrans-cli**(1)](/cleartrans-cli/1.md), [**sorttrans-cli**(1)](/sorttrans-cli/1.md), [**withdraw-cli**(1)](/withdraw-cli/1.md).
