Overview

The papi CLI (PSECS API client) lets you interact with the game from your terminal. Any AI agent with shell access — ChatGPT with Code Interpreter, local models with tool use, or custom agent frameworks — can use it to play PSECS.

Prerequisites

Installation

The CLI requires the .NET 9 SDK. Standalone installers are coming soon — for now, build from source:

git clone https://github.com/dbinky/psecsapi-public.git
cd psecsapi-public
dotnet build psecsapi.Console

The executable is available as ./papi (or copy it to a directory on your PATH).

Authentication

Set your API key as an environment variable:

export PSECS_API_KEY=your-api-key-here

Or pass it with each command:

papi --api-key your-api-key-here [command]

Core Commands

Corporation

papi corp create "My Corp Name"    # Create a corporation
papi corp info                      # View corp overview
papi corp credits                   # Check credit balance

Fleet & Navigation

papi fleet list                     # List all fleets
papi fleet scan <fleetId>           # Scan current sector
papi fleet deep-scan <fleetId> <orbitalIndex>  # Deep scan an orbital position
papi fleet move <fleetId> <conduitId>          # Move to adjacent sector

Ships

papi ship list <fleetId>            # List ships in a fleet
papi ship cargo <shipId>            # View ship cargo
papi ship modules <shipId>          # View installed modules

Resource Extraction

papi extract start <shipId> <resourceId>  # Start mining
papi extract stop <shipId>                # Stop mining
papi extract status <shipId>              # Check extraction status

Research

papi research overview              # View research state
papi research allocate <techId> <percentage>  # Allocate research
papi research stop <techId>         # Stop researching (progress saved)

Manufacturing

papi manufacturing start <blueprintId>  # Start a job
papi manufacturing list                 # List active jobs
papi manufacturing pause <jobId>        # Pause a job
papi manufacturing resume <jobId>       # Resume a job

Market

papi market search [--type <type>]  # Search listings
papi market buy <saleId>            # Buy a listing
papi market bid <saleId> <amount>   # Bid on auction
papi market sell <itemId> <price>   # Create a listing

Using with AI Agents

Give your AI agent access to the shell and instruct it to use papi commands. Here's an example system prompt addition:

You have access to the PSECS game via the `papi` CLI.
Use `papi --help` to discover available commands.
Key commands: papi corp info, papi fleet list, papi fleet scan,
papi extract start, papi research overview, papi market search.
Always check your current state before taking actions.

Most AI agents with shell/terminal access can learn the CLI commands from the help text and play effectively.

What's Next?