Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Taylor Gagne

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,24 @@ vendor/ Vendored tree-sitter core and grammars
- Git
- vcpkg (a local copy is fine — see step 2). Dependencies `curl`, `igraph`,
`nlohmann-json`, and `utf8proc` are declared in `vcpkg.json` and built
automatically on first configure. `tree-sitter` is vendored under
`vendor/tree-sitter`.
automatically on first configure. `tree-sitter` is vendored as git
submodules under `vendor/tree-sitter` (see step 1).

### 1. Clone

```sh
git clone https://github.com/taylor009/CGraph.git
git clone --recurse-submodules https://github.com/taylor009/CGraph.git
cd CGraph
```

The tree-sitter core and grammars under `vendor/tree-sitter` are git
submodules — the build fails without them. If you already cloned without
`--recurse-submodules`, fetch them with:

```sh
git submodule update --init --recursive
```

### 2. Point CMake at vcpkg

The presets read the toolchain from `$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake`,
Expand Down
16 changes: 16 additions & 0 deletions src/cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,14 @@ std::filesystem::path supervisor_config_path() {

// cgraph daemon <install|sync|status|uninstall> [flags]
int run_daemon_command(int argc, char** argv) {
#if !defined(__APPLE__)
(void)argc;
(void)argv;
std::cerr << "cgraph daemon: launchd-based supervision is only supported on macOS. "
"On this platform run `graphd --root PATH` directly (or supervise it "
"with your init system, e.g. a systemd user unit).\n";
return 1;
#endif
const std::string sub = argc >= 3 ? argv[2] : "";
if (sub != "install" && sub != "sync" && sub != "status" && sub != "uninstall") {
std::cerr << "usage: cgraph daemon <install|sync|status|uninstall> "
Expand Down Expand Up @@ -683,6 +691,14 @@ int run_skills_command(int argc, char** argv) {
// cgraph drain <install|status|uninstall> [--interval SECONDS] [--chunk-cap N]
// [--script PATH] [--launch-agents-dir DIR] [--client PATH]
int run_drain_command(int argc, char** argv) {
#if !defined(__APPLE__)
(void)argc;
(void)argv;
std::cerr << "cgraph drain: the launchd-based enrichment drainer is only supported on "
"macOS. On this platform run integrations/always-on/cgraph-enrich-drain.sh "
"on a schedule (e.g. cron or a systemd timer).\n";
return 1;
#endif
const std::string sub = argc >= 3 ? argv[2] : "";
if (sub != "install" && sub != "status" && sub != "uninstall") {
std::cerr << "usage: cgraph drain <install|status|uninstall> [--interval SECONDS] "
Expand Down
Loading