Skip to main content

The Fulfil CLI — primary interface for humans and AI agents

Project description

Fulfil CLI

The command-line interface for Fulfil — query data, manage records, run reports, and automate workflows from the terminal.

Install

# Recommended: install with uv (https://docs.astral.sh/uv/)
uv tool install fulfil-cli

# Or with pipx
pipx install fulfil-cli

Don't have uv or pipx? Install uv first — it's a single command: curl -LsSf https://astral.sh/uv/install.sh | sh (macOS/Linux) or powershell -c "irm https://astral.sh/uv/install.ps1 | iex" (Windows). Then run uv tool install fulfil-cli.

Getting Started

# 1. Log in to your Fulfil workspace
fulfil auth login

# 2. List sales orders
fulfil sales_order list --fields reference,state,total_amount

# 3. Count products
fulfil product count

# 4. Look up a contact
fulfil contact list --where '{"name": "Acme Corp"}' --fields name,email

Authentication

The CLI stores your API key in the system keyring (macOS Keychain, GNOME Keyring, Windows Credential Locker).

# Interactive — prompts for workspace and API key
fulfil auth login

# Non-interactive
fulfil auth login --workspace acme.fulfil.io --api-key sk_live_...

# Check current auth
fulfil auth status

# List all configured workspaces
fulfil workspaces

# Switch workspace
fulfil auth use other-workspace.fulfil.io

# Log out
fulfil auth logout

Environment variables (useful for CI/scripts):

export FULFIL_API_KEY=sk_live_...
export FULFIL_WORKSPACE=acme.fulfil.io

Priority: --token flag > FULFIL_API_KEY env var > system keyring.

Working with Records

Any Fulfil model name is a valid command. Each model supports: list, get, create, update, delete, count, call, and describe.

Listing records

# List with specific fields
fulfil sales_order list --fields reference,state,total_amount

# Filter with MongoDB-style queries
fulfil sales_order list --where '{"state": "confirmed"}'
fulfil sales_order list --where '{"total_amount": {"gte": 1000}}'
fulfil sales_order list --where '{"or": [{"state": "draft"}, {"state": "confirmed"}]}'

# Sort results
fulfil sales_order list --order sale_date:desc
fulfil sales_order list --order total_amount:desc,reference:asc

# Control page size
fulfil sales_order list --limit 50

# Paginate — the CLI prints the full command for the next page
fulfil sales_order list --cursor <token-from-previous-response>

Available filter operators: gt, gte, lt, lte, ne, in, not_in, contains, startswith, endswith.

Getting records by ID

fulfil sales_order get 42
fulfil sales_order get 1,2,3

Creating records

# Single record
fulfil contact create --data '{"name": "Acme Corp"}'

# Record with nested lines (e.g. contact with addresses)
fulfil contact create --data '{"name": "Acme Corp", "addresses": [{"street": "100 Broadway", "city": "New York"}, {"street": "45 Industrial Pkwy", "city": "Newark"}]}'

# Multiple records at once
fulfil contact create --data '[{"name": "Alice"}, {"name": "Bob"}]'

Updating records

fulfil sales_order update 42 --data '{"comment": "Approved by finance"}'

Deleting records

fulfil sales_order delete 42         # asks for confirmation
fulfil sales_order delete 42 --yes   # skip confirmation

Counting records

fulfil product count
fulfil sales_order count --where '{"state": "draft"}'

Calling custom methods

fulfil sales_order call confirm --ids 1,2,3
fulfil sales_order call process --ids 42 --data '{"warehouse": 1}'

Exploring models

# List all models you have access to
fulfil models

# Search for models by name
fulfil models --search shipment

# See fields and endpoints for a model
fulfil sales_order describe
fulfil sales_order describe confirm

Reports

# List available reports
fulfil reports

# Run a report with parameters
fulfil reports price_list_report execute --params '{"date_from": "2024-01-01"}'

# Interactive — prompts for each parameter
fulfil reports price_list_report execute -i

# See what parameters a report accepts
fulfil reports price_list_report describe

Raw JSON-RPC

For full control, send raw JSON-RPC requests:

fulfil api '{"method": "system.version", "params": {}}'

# Pipe from stdin
echo '{"method": "model.product.count", "params": {}}' | fulfil api -

Output

Context Format
Terminal Rich tables with colors
Piped / redirected / CI JSON (automatic)
--json flag JSON (forced)
# Force JSON and pipe to jq
fulfil sales_order list --fields reference,state --json | jq '.data[].reference'

# Force JSON via env var
FULFIL_JSON=1 fulfil sales_order list

Configuration

fulfil config set key value
fulfil config get key
fulfil config list

Config file location: ~/.config/fulfil/config.toml

Global Options

--token TEXT        API key (overrides env and keyring)
--workspace TEXT    Workspace domain (e.g. acme.fulfil.io)
--debug            Show HTTP request/response details
--quiet, -q        Suppress hints and decorative output
--json             Force JSON output
-h, --help         Show help

Exit Codes

Code Meaning
0 Success
2 Bad arguments
3 Configuration error
4 Authentication error
5 Not found
6 Forbidden
7 Validation error
8 Rate limited
9 Server error
10 Network error

Shell Completion

fulfil completion   # auto-detects zsh/bash/fish

AI Agent Integration

The CLI is designed for programmatic use:

  • JSON output by default when stdout is piped or redirected
  • Structured exit codes for error handling
  • Errors on stderr, data on stdout — safe to parse stdout directly
  • Environment variable auth — no interactive prompts: FULFIL_API_KEY + FULFIL_WORKSPACE

See AGENTS.md for the full agent guide.

Development

git clone https://github.com/fulfilio/fulfil-cli.git
cd fulfil-cli
uv sync --dev
pytest
uv run ruff check .
uv run pre-commit install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fulfil_cli-0.1.1.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fulfil_cli-0.1.1-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

Details for the file fulfil_cli-0.1.1.tar.gz.

File metadata

  • Download URL: fulfil_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fulfil_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 23e01aa0bd70805755b550f71bb5c0c12cf5ef86d2b43945b9095b3a26e1fd6e
MD5 1c0dd2347ea855c1380593d4a3e6e1bd
BLAKE2b-256 919a436976eef862c0a027ed5f18e5d50c1522206392e03d032c80978740d3e6

See more details on using hashes here.

File details

Details for the file fulfil_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fulfil_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 32.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fulfil_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1622ae934515207f39ea8397aab13dc5e54dfe794ae93825b556c9d5461fd9d5
MD5 a7a8eba9fd54e0266292c1dd09b99d39
BLAKE2b-256 fbc4b15a65d357d7606f3cf68ed570c199bec042554282839df78bfd1639f1c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page