Project Linking

Many CLI commands operate on a specific project. Project linking lets the CLI automatically know which project you mean based on your current directory.

shipchart init

Run shipchart init in any project directory to link it to a Shipchart project:

cd ~/projects/my-saas
shipchart init

The CLI will show your projects and let you pick one. You can also specify it directly:

shipchart init --project my-saas

.shipchart.yml

Running init creates a .shipchart.yml file in your project root:

project_id: 01JDEF1234ABCDE5678FGHIJK

This file can be committed to version control so every team member gets automatic project linking. You can also add it to .gitignore if you prefer.

To overwrite an existing link, use --force:

shipchart init --force

Project resolution order

When a command needs a project, the CLI resolves it in this order:

  1. 1.-p / --project flag — explicit project ID or name passed on the command line.
  2. 2..shipchart.yml — in the current directory or any parent directory.
  3. 3. Config default — a default project saved in ~/.shipchart/config.json.
  4. 4. Error — if no project can be resolved, the CLI asks you to specify one.
# Explicit flag always wins
shipchart roadmap list --project my-other-project

# Uses .shipchart.yml in current directory
shipchart roadmap list

# Works from any subdirectory
cd src/components && shipchart roadmap list

Auto-detection from git remote

During shipchart init, the CLI checks your git remote URL and tries to match it to an existing Shipchart project that has a connected GitHub integration. If a match is found, it's pre-selected for you.