forgejo-contrib-forgejo-cli-wiki-issues.md
Watch20
Star402
Fork
You've already forked forgejo-cli
CodeIssues 44Pull requests 8Releases 11Packages 2WikiActivity
Page: Issues
ActionsAuthenticationBuildingHomeInstallationIssuesOrganizationsPRsRepositoriesUsers
HTTPS
No results
7 Issues Cyborus edited this page 2026-04-16 15:22:32 -04:00
#Table of Contents
An issues ID can either be its number, i.e. issue 42, or it can include the repo name, i.e. forgejo-contrib/forgejo-cli#42. All mentions of an "issue id" follow this format unless specified otherwise.
Create an issue with fj issue create. The title of the issue is a required argument. The text content can be set with the --body flag, but if that isn't used, your editor will be opened.
If you prefer to create an issue in the web browser, you can use fj issue create --web.
If the repository uses issue templates, you will have to pick one to use when creating an issue. This is done with the --template flag. It takes the file name of the template you want, which you can list with fj issue templates.
Content-based templates will pre-populate the body text with the template before opening your text editor. Form-based templates will be opened as a markdown-based form in your editor. For example, text boxes will be a markdown codeblock. Editing outside of the entry fields will cause the creation to fail.
If the repository has it enabled, you can use --no-template to create a default blank-slate issue.
Need to change what you wrote? Use fj issue edit to change an issue's text. fj issue edit <id> title and fj issue edit <id> body will modify the respective part of the issue. You can write the new contents on the command line, or leave it blank to write it in your editor.
Labels can be added to issues with fj issue edit labels, using the --add and --remove flags.
Closing an issue is done with fj issue close. A comment can be added before closing with the --with-msg flag. You can write the message on the command line, or leave it blank to write it in your editor.
fj issue create "Replace chocoearly with vanilla" --repo Bakery/recipes
# Whoops! It's choco-LATE not choco-EARLY
fj issue edit Bakery/recipes#16 title "Replace chocolate with vanilla"
fj issue close Bakery/recipes#16 --with-msg "Let's instead add a new vanilla version"
fj issue comment is for leaving a comment on an issue, fj edit comment is for editing one. Same behavior for writing its contents as issues, same way of specifying the issue.
Examples:
fj issue comment 16 "but I like chocolate!"
fj issue edit 16 comment 1 # opens the message contents in your editor
fj issue assign can be used to assign users to an issue. The first argument is the issue's number, then followed by a list of users to assign. fj issue unassign is the same, but to remove assignments.
fj pr assign and fj pr unassign do the same for pull requests, though the PR number is provided as a flag rather than a positional argument. If the number is not provided, it will be guessed.
fj issue view displays the issue in the terminal. fj issue view <id> comments displays all the comments on an issue. fj issue view <id> comment <idx> displays a specific comment
To list all issues on a repo, use fj issue search.
fj issue browse opens the issue in your browser.
Examples:
fj issue view 16
fj issue view 16 comments
fj issue browse Barkey/recipes#16