Core Commands
This page summarizes the most common non‑stack workflows.
Repository
Section titled “Repository”och repo create my-repo --private --description "My repo"och repo clone owner/my-repooch repo listShorthand:
och init --url http://localhost:3000och push --branch mainPull requests
Section titled “Pull requests”och pr create --base main --title "Fix auth" --body "Adds token checks"och pr list --state openoch pr view 42och pr merge 42 --squashoch pr checkout 42och pr diff 42och pr ready 42Issues
Section titled “Issues”och issue create --title "Crash on login" --body "Steps to reproduce..."och issue list --state openoch issue view 12och issue comment 12 --body "I can reproduce"och issue close 12 --comment "Fixed in #34"och issue reopen 12Branches
Section titled “Branches”och branch listoch branch create feature/notes --checkoutoch branch rename feature/notes feature/release-notesoch branch delete feature/notes --remoteoch ci list --branch mainoch ci view 101 --jobsoch ci trace 809 --followReleases
Section titled “Releases”och release create v1.2.0 --title "1.2.0" --generate-notesoch release listoch release view v1.2.0och release delete v1.2.0Search
Section titled “Search”och search repos "opencode"och search issues "crash" --state openoch search prs "refactor" --state openSecrets
Section titled “Secrets”# repo secretprintf "s3cr3t" | och secret set API_TOKEN
# environment secretprintf "s3cr3t" | och secret set API_TOKEN --env production
# org secretprintf "s3cr3t" | och secret set API_TOKEN --org my-org
och secret listoch secret delete API_TOKEN --yesSSH keys
Section titled “SSH keys”och ssh-key add --file ~/.ssh/id_ed25519.puboch ssh-key listoch ssh-key delete <key-id>Direct API calls
Section titled “Direct API calls”och api /useroch api /repos/owner/name -X PATCH -F "description=New description"All commands support
--helpfor full options.