Skip to content

feat(cli): set a project's name, description and default branch - #272

Merged
kalaspuff merged 1 commit into
mainfrom
fctl/285-fix-https-github-com-hyperstructure-fctl
Oct 25, 2026
Merged

kalaspuff merged 1 commit into
mainfrom
fctl/285-fix-https-github-com-hyperstructure-fctl

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

fctl projects set now takes --name, --description ("" clears it) and --default-branch, each with --json, so scripts and agents can change what the web app's Settings → Project changes without calling the HTTP API. The control plane already took these fields, so only the CLI and its docs change: docs/cli.md shows the flags, and docs/llms.txt's project recipe mentions them.

fctl projects set also sends the project's settings only when a flag changes them. Until now every call sent all of them back as it had read them, so a rename would have undone a settings change someone made in the meantime. The confirmation lines show the name, description and branch as the server stored them (it trims and collapses spaces), and "Sessions take the change when they next start or resume" shows only when settings changed.

Verified with a unit test of the new flags and end to end against cargo xtask dev, through a proxy that logged each request. Each flag alone sends only its field ({"name": …}, {"description": ""}, {"default_branch": "develop"}) and leaves the settings as they were. Combined with a setting, it sends both. The server's refusals (a blank or 81-character name, a 501-character description, bad..branch) come back as errors with exit code 1. cargo xtask check --quick passes.

Worth confirming

  • Decision: --default-branch checks only that the name is a valid branch name, as the web app does; nothing checks that the repository has the branch. A session whose base branch is missing starts its branch empty, with only a warning in its log (crates/fctl-agent/src/workspace.rs), so a typo leaves agents working on an empty branch. Checking it needs the control plane to ask GitHub, so this pull request leaves it out: Sessions start on an empty branch when the project's default branch isn't in its repository #273 records it.

Fixes #271

fctl session

fctl projects set takes --name, --description ("" clears it) and
--default-branch, which PATCH /api/v1/projects/{id} has taken all along
and the web app's Settings → Project changes. It sends the project's
settings only when a flag changes them, so a rename leaves settings that
someone changed since the CLI read them as they are.

Refs #271
@kalaspuff
kalaspuff merged commit feb559b into main Oct 25, 2026
10 of 11 checks passed
@kalaspuff
kalaspuff deleted the fctl/285-fix-https-github-com-hyperstructure-fctl branch October 25, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

The CLI can't rename a project, or change its description or default branch

1 participant