Back to Codeberg

Repositories

forgejo-contrib-forgejo-cli-wiki-repositories.md

latest5.3 KB
Original Source

forgejo-contrib/forgejo-cli

Watch20

Star402

Fork

You've already forked forgejo-cli

51

CodeIssues 44Pull requests 8Releases 11Packages 2WikiActivity

Page: Repositories

Pages

ActionsAuthenticationBuildingHomeInstallationIssuesOrganizationsPRsRepositoriesUsers

HTTPS

No results

8 Repositories Fluffinity edited this page 2026-06-15 23:15:30 +02:00

#Table of Contents

Creating, Forking, and Deleting

Creating a new repo can be done with fj repo create. Set its description with the --description flag, and make it private with the --private flag. If your current directory is a git repo, you can use the --remote flag to set the new repo as a remote locally, and use the --push flag to push the local repo. Using --push without --remote will add an origin remote.

You can fork a repo with fj repo fork. By default, the fork will have the same name as the original. You can change it with the --name flag.

Migrating a repository from another git provider is done with fj repo migrate <URL> <NAME>. If you only specify the repo name, it will migrate it into your account. You can migrate into an organization by specify the full name for the new repo, i.e. demo-org/demo-repo instead of just demo-repo.

By default, this will only migrate git data. A specific hosting service and be chosen with the --service flag, and migration items can be picked with the --include flag, which takes a comma-separated list of any of the following items:

  • lfs
  • wiki
  • issues
  • prs
  • milestones
  • labels
  • releases

Migrating anything other than lfs or wiki requires setting authentication with --token or --login. These flags read from stdin and do not take command line values. If LFS files live on a diffent url, that can be set with --lfs-endpoint.

A migration can be made a pull mirror with --mirror, and made private with --private.

Note, that migration is only supported to a Forgejo instance. If you want to migrate a repository from a Forgejo instance to Gitlab, Github etc you will need to their tools.

Deleting a repo is done with fj repo delete. Be careful, this cannot be undone!

Examples:

bash
fj repo create example-repo --description "This is an example!"
fj repo create example-repo-2 --push --remote codeberg
fj repo fork forgejo/forgejo --name forgejo-changes
fj repo delete Cyborus/example-repo
fj repo migrate https://codeberg.org/forgejo-contrib/forgejo-cli forgejo-cli --include wiki,releases --token

Editing a repo

Repo settings, such as whether it's private or archived, or its description, can be changed with fj repo edit. It takes various flag arguments for the various settings that can be changed.

Repo units, such as the issue tracker or the wiki, can be managed with fj repo units. Each unit has its own subcommand under it, such as fj repo units wiki. They take flag arguments to update their settings, similar to fj repo edit.

View a repo

fj repo view will show basic info about a repository, i.e. name, description, primary language, issues, etc.

fj repo readme will print out the repo's README.md or README.txt

fj repo browse opens the repo in your web browser.

fj repo clone will clone the repo to your machine, much like git clone. The new directory defaults to the repository's name, but can be specified with the [PATH] argument

Examples:

text
$ fj repo view forgejo-contrib/forgejo-cli
forgejo-contrib/forgejo-cli
> CLI application for interacting with Forgejo

Primary language is Rust
25 stars - 4 watching - 2 forks
6 issues - 0 PRs - 6 releases
bash
fj repo browse forgejo/forgejo
fj repo clone Cyborus/forgejo-api # Clones into ./forgejo-api
fj repo clone codeberg.org/forgejo-contrib/forgejo-cli fj # Clones into ./fj

Stars

You can add and remove stars from a repo with fj repo star and fj repo unstar

Examples:

bash
fj repo star forgejo-contrib/forgejo-cli # yay!
fj repo unstar forgejo-contrib/forgejo-cli # aww :(