Add Shell Commands

2026-03-27 10:44:37 +00:00
parent 1bc8955382
commit b456bc6912

42
Shell-Commands.md Normal file

@@ -0,0 +1,42 @@
<h1>Shell Commands</h1>
<p>The interactive shell runs in the same terminal as the HTTP server. Type <code>help</code> to see available commands at any time.</p>
<h2>Reference</h2>
Command | Description
-- | --
add-company | Add a new company interactively
list-companies | List all companies with price and share count
add-currency | Add a new currency interactively
list-currency | List all currencies with their IDs
add-revenue | Add a revenue entry interactively
list-revenue | List revenue entries for a company/period
help | Show all available commands
exit | Quit
<h2>Example Session</h2>
<pre><code>&gt; add-currency
Code: DKK
Name: Danish Krone
Currency added.
&gt; list-currency
ID Code Name
1 DKK Danish Krone
&gt; add-company
Name: Novo Nordisk
Shares outstanding: 4442064180
Price: 251.00
Currency ID: 1
Company added.
&gt; list-companies
ID Name Price Shares Outstanding Currency
1 Novo Nordisk 251.00 4442064180 1
</code></pre>
<h2>Notes</h2>
<ul>
<li>The shell and HTTP API share the same database connection — changes made via either are immediately visible to the other.</li>
<li><code>sum-revenue</code> is listed in the <code>help</code> output but is not yet wired to a shell handler; use the REST API for revenue queries in the meantime.</li>
</ul>