cli

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: MIT

README

Tripsy CLI

tripsy is a command-line client for the public Tripsy API at https://api.tripsy.app.

The CLI follows the same practical shape as Basecamp CLI:

  • usable human output in a terminal
  • JSON envelopes when piped or when --json is passed
  • breadcrumbs that suggest useful next commands
  • a command catalog for agents through tripsy commands --json and tripsy <command> --help --agent
  • local token storage under ~/.config/tripsy-cli

Quick Start

curl -fsSL https://raw.githubusercontent.com/tripsyapp/cli/main/scripts/install.sh | bash

This installs the latest GitHub release into ~/.local/bin, verifies the release checksum, and adds that directory to your shell PATH when needed.

Other Installation Methods

Install the latest published version with Go:

go install github.com/tripsyapp/cli/cmd/tripsy@latest

Install a specific release with the script:

curl -fsSL https://raw.githubusercontent.com/tripsyapp/cli/main/scripts/install.sh | TRIPSY_VERSION=1.2.3 bash

Install into a custom directory:

curl -fsSL https://raw.githubusercontent.com/tripsyapp/cli/main/scripts/install.sh | TRIPSY_BIN_DIR=/usr/local/bin bash

Build from a checkout:

make build
bin/tripsy --help

For development:

make check

Authentication

Login with Tripsy credentials:

tripsy auth login --username you@example.com

Interactive password prompts hide typed input on terminals. For automation, pass a token through TRIPSY_TOKEN or tripsy auth token set.

Or configure an existing token:

tripsy auth token set YOUR_TOKEN

Credentials are stored at:

~/.config/tripsy-cli/credentials.json

Environment overrides:

TRIPSY_TOKEN=...
TRIPSY_API_BASE=https://api.tripsy.app
TRIPSY_CONFIG_DIR=/custom/config/dir

Examples

tripsy me show
tripsy trips list
tripsy trips create --name Italy --starts-at 2026-06-01 --ends-at 2026-06-15 --timezone Europe/Rome
tripsy activities list --trip 42
tripsy activities create --trip 42 --name "Colosseum Tour" --activity-type sightseeing --starts-at 2026-06-03T09:00:00Z
tripsy transportations create --trip 42 --name "Flight to Rome" --transportation-type airplane --departure-description JFK --arrival-description FCO
tripsy expenses create --trip 42 --title Dinner --price 78.5 --currency EUR --date 2026-06-03T20:00:00Z
tripsy documents upload boarding-pass.pdf --trip 42 --parent transportation:303
tripsy request GET /v1/me --json

Output

When output is piped, or when --json is passed, commands emit an envelope:

{
  "ok": true,
  "data": {},
  "summary": "Current user",
  "breadcrumbs": [
    {
      "action": "show",
      "cmd": "tripsy trips show <id>"
    }
  ]
}

Use --quiet to print raw JSON data only.

Command Coverage

Friendly commands wrap the currently exposed public API:

  • auth/account: auth, me
  • trips: trips
  • trip subresources: hostings, activities, transportations, expenses, collaborators
  • email and automation inbox: emails, inbox
  • documents and uploads: documents, uploads

Use tripsy request METHOD PATH for any exposed API route that does not yet have a tailored command.

Publishing

This module is published as:

github.com/tripsyapp/cli

If the GitHub repository path changes, update go.mod and the go install command above before tagging a release.

The install script expects GitHub release assets named like:

tripsy_1.2.3_darwin_arm64.tar.gz
tripsy_1.2.3_linux_amd64.tar.gz
tripsy_1.2.3_windows_amd64.zip
checksums.txt

The release workflow creates these assets when a vX.Y.Z tag is pushed.

Directories

Path Synopsis
cmd
tripsy command
internal
api
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL