Download src/github.h from Arian8888/ki-brain: direct link, hf CLI and curl.
- Browser
- Download file 901 Bytes
-
https://huggingface.co/spaces/Arian8888/ki-brain/resolve/main/src/github.h
- Command line
-
hf download hf://spaces/Arian8888/ki-brain/src/github.h
-
curl -L -o github.h https://huggingface.co/spaces/Arian8888/ki-brain/resolve/main/src/github.h
901 Bytes
| // GitHub-Sync via REST API. | |
| // Speichert Topics und Konversationen in einem GitHub-Repo. | |
| // Token + Repo werden aus Env-Variablen gelesen (GITHUB_TOKEN, GITHUB_REPO). | |
| namespace gh { | |
| void init(); // liest GITHUB_TOKEN + GITHUB_REPO env | |
| bool enabled(); // true wenn Token + Repo gesetzt | |
| // Datei erstellen/updaten im Repo. | |
| // path: z.B. "topics/quantencomputer.md" | |
| bool put_file(const std::string& path, | |
| const std::string& content, | |
| const std::string& commit_msg); | |
| // Datei-Inhalt holen (leer wenn nicht gefunden). | |
| std::string get_file(const std::string& path); | |
| // Listet rekursiv alle Files+Folders unter "brain/" auf GitHub. | |
| struct RemoteEntry { std::string path; std::string content; int is_dir; }; | |
| std::vector<RemoteEntry> pull_brain(); | |
| } // namespace gh | |