Skip to content

Project Commands - Manage Bitbucket Projects

Manage Bitbucket Cloud projects — the grouping layer for repositories inside a workspace. Use these commands to discover the project keys you pass to bb repo create -p <KEY>.

Project commands operate at workspace scope (no repo context required). Use -w, --workspace <workspace> or set a default with bb config set defaultWorkspace <workspace> — see bb workspace list to discover your slugs.

Global options available on all project commands: --json [fields], --jq <expression>, --no-color, -w, --workspace.


List projects in a workspace.

Terminal window
bb project list [options]
OptionDescription
-w, --workspace <workspace>Workspace
--limit <number>Maximum number of projects (default: 25)
--allList all projects (overrides --limit)
--jsonOutput as JSON
Terminal window
bb project list
bb project list -w my-workspace
bb project list --all
# Project to specific fields (returns a flat array)
bb project list --json key,name
# Grab keys for scripting with built-in --jq
bb project list --json --jq '.projects[].key'

The --json envelope is { workspace, count, projects }, where projects is the array of project objects.

  • Long descriptions are truncated to 50 characters in the table (disable with the global --no-truncate); --json always carries the full values.
  • When the result is capped by --limit, a hint shows how many were listed; use a higher --limit or --all to see the rest (suppressed with --json).

View project details.

Terminal window
bb project view <key> [options]
ArgumentDescription
keyProject key (e.g. PROJ; lowercase input is uppercased automatically)
OptionDescription
-w, --workspace <workspace>Workspace
--jsonOutput as JSON
Terminal window
bb project view PROJ
bb project view PROJ -w my-workspace
# Stable JSON envelope: { workspace, project }
bb project view PROJ --json --jq '.project.name'
  • Bitbucket stores project keys uppercased, so bb project view proj resolves the same project as bb project view PROJ.
  • An unknown key returns Project <KEY> not found in workspace <workspace>. (exit code 1, --json gives a structured error envelope).

Create a new project in a workspace.

Terminal window
bb project create [options]
OptionDescription
-w, --workspace <workspace>Workspace
-k, --key <key>Project key, e.g. PROJ (required; uppercased automatically)
-n, --name <name>Project name (required)
-d, --description <description>Project description
--privateCreate a private project (default)
--publicCreate a public project
--jsonOutput as JSON
Terminal window
bb project create --key PROJ --name "My Project"
bb project create -k PROJ -n "My Project" -d "Team things" --public
# Then create repositories inside it
bb repo create my-repo -p PROJ
# Stable JSON envelope: { workspace, project }
bb project create -k PROJ -n "My Project" --json --jq '.project.key'
  • Projects are private by default; --private and --public cannot both be set. Note that private projects cannot contain public repositories.
  • Keys must start with a letter and contain only letters, digits, and underscores. Bitbucket requires uppercase keys, so lowercase input is uppercased automatically (the CLI prints a note when it does).
  • The command is fully non-interactive: all inputs are flags, so it is safe for scripts and automation.