Understanding Project IDs and CLI Interaction

Author:Esadax
Updated:May 28, 2025

Learn what a Project ID is, why it matters, and how you can use it effectively to interact with your projects via the command line interface (CLI).

Table of Contents

  1. What is a Project ID?
  2. Difference Between Project Name and Project ID
  3. Why Use Project IDs?
  4. Using Project IDs in CLI Commands
  5. Best Practices for Managing Project IDs
  6. Troubleshooting Common Issues
  7. Glossary

What is a Project ID?

A Project ID is a unique, immutable identifier assigned to each project upon creation. Unlike project names, which can be changed or duplicated across namespaces, the Project ID is guaranteed to be unique and persistent.

Think of the Project ID as the project's fingerprint — a way to reliably identify and interact with the project programmatically.


Difference Between Project Name and Project ID

Aspect Project Name Project ID
Uniqueness Unique per namespace Globally unique
Mutability Can be changed Immutable
Human-friendly Yes, usually readable Typically a UUID or hash
Usage Display, URLs API calls, CLI commands

Why Use Project IDs?

  • Reliability: Avoid ambiguity when referencing projects, especially if names change.
  • Automation: Scripts and CI/CD pipelines can use Project IDs to interact consistently.
  • Security: Project IDs can be harder to guess, reducing accidental or unauthorized access.
  • Integration: APIs and third-party tools often require Project IDs for precise actions.

Using Project IDs in CLI Commands

When using the CLI to manage projects, you typically need to reference your project by its ID. Here are some common examples:

# List all projects to find the ID
cli-tool projects list

# Get detailed info about a project
cli-tool projects get --id <project-id>

# Deploy a build to a project using its ID
cli-tool deploy --project-id <project-id> --env production

# Delete a project by its ID
cli-tool projects delete --id <project-id>