CLI Reference
The gf command-line tool lets you manage repositories, authentication, and tokens from your terminal.
Installation
npm install -g @gitforge/clibrew install gitforge/tap/gfcurl -fsSL https://gitforge.dev/install.sh | shVerify installation:
gf --versionCommands
gf auth login
Authenticate with your GitForge account. Opens a browser for OAuth flow or accepts a PAT via stdin.
Interactive login
gf auth loginLogin with PAT
gf auth login --token gf_YOUR_PATLogin to custom instance
gf auth login --host https://git.mycompany.comgf auth status
Show the currently authenticated user and instance.
Check auth status
gf auth statusgf auth logout
Remove stored credentials for the current or specified host.
Logout
gf auth logoutgf repo list
List repositories you have access to.
List all repos
gf repo listList as JSON
gf repo list --jsonOnly public repos
gf repo list --visibility publicgf repo create
Create a new repository.
Create a private repo
gf repo create --name my-projectCreate and clone
gf repo create --name my-project --cloneCreate public repo
gf repo create --name oss-lib --visibility public --description "Open source library"gf repo clone
Clone a repository. Automatically configures authentication.
Clone a repo
gf repo clone my-org/my-projectShallow clone
gf repo clone my-org/my-project --depth 1gf repo delete
Delete a repository. Requires confirmation.
Delete a repo
gf repo delete my-org/my-projectDelete without prompt
gf repo delete my-org/my-project --yesgf token create
Create a new Personal Access Token.
Create a token
gf token create --name ci-deployToken with expiry
gf token create --name ci-deploy --expiry 30Token with scopes
gf token create --name read-only --scopes repo:readgf token list
List your Personal Access Tokens.
List tokens
gf token listgf token revoke
Revoke a Personal Access Token by name or ID.
Revoke a token
gf token revoke ci-deploygf status
Show connection status, authenticated user, and current repository info.
Check status
gf statusgf init
Initialize a new Git repository with GitForge remote preconfigured.
Init and link
gf init --name my-project