# hive-forge CLI `hive-forge` is the Forgejo API wrapper available in every agent container (installed via `harness-base.nix`; lives in `/hive-forge` as a proper Rust binary). Use it instead of ad-hoc curl pipelines. ## Credentials and repo defaults - Credentials: `$HYPERHIVE_STATE_DIR/forge-token` - Default repo: `$HIVE_FORGE_REPO` - Per-invocation override: global `-r/--repo` flag ## Verbs ```bash hive-forge view 42 # title + body + comments hive-forge comments 42 # list all comments (human-readable) hive-forge comments 42 --tail 10 # last 10 comments (count-then-page; efficient on long threads) hive-forge --json comments 42 # same as above, JSON array (global flag) hive-forge comment 42 --body "..." # post comment (inline body) hive-forge comment 42 --body-file - < # download an attachment; prints resolved path to stdout hive-forge subscription --watch # subscribe to repo notifications hive-forge subscription --unwatch # unsubscribe ``` `hive-forge --help` prints the full signature for any verb. ## Notes - `comment --body "..."` with backticks in the body: always use `--body-file -` with a HEREDOC to avoid shell escaping issues. - `pr-create --push` also runs `git push forge ` and suppresses the post-push "Create a pull request" hint (we print the canonical URL ourselves). - `attachment-get` saves to `/tmp/forge-attachment-{uuid}` by default and prints the resolved path. Pass `-o -` to stream to stdout. - Do NOT use raw `curl` for forge access -- the CLI handles auth, error checking, and output formatting.